WO2019196274A1 - 网页页面测试方法、装置、电子设备和介质 - Google Patents
网页页面测试方法、装置、电子设备和介质 Download PDFInfo
- Publication number
- WO2019196274A1 WO2019196274A1 PCT/CN2018/099282 CN2018099282W WO2019196274A1 WO 2019196274 A1 WO2019196274 A1 WO 2019196274A1 CN 2018099282 W CN2018099282 W CN 2018099282W WO 2019196274 A1 WO2019196274 A1 WO 2019196274A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- tested
- operation element
- error
- event
- page
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Definitions
- the present application relates to the field of testing technologies, and in particular, to a webpage page testing method, apparatus, electronic device, and medium.
- the test for the robustness and stability of the web page to be tested is usually focused on the interface API (Application Programming Interface) layer, and only the function integrity of the UI (User Interface) layer is concerned. Sex, but rarely directly targeted to the UI layer robustness test.
- interface API Application Programming Interface
- UI User Interface
- a webpage page testing method comprising:
- the error information is output.
- a webpage page testing device comprising:
- a startup unit for launching a browser with an automated testing tool and launching a URL to be tested
- An obtaining unit configured to acquire an operation element on the page of the website to be tested and an operation event of the operation element
- a selecting unit configured to select an operation element to be tested from the acquired operation elements
- a sending unit configured to send an operation event of the operation element to be tested and the operation element to be tested to a page of the website to be tested for testing
- a determining unit configured to determine whether the page of the website to be tested has error information
- an output unit configured to output the error information when the page of the website to be tested has error information.
- An electronic device comprising:
- a memory storing at least one instruction
- a non-volatile readable storage medium having stored therein at least one instruction executed by a processor in an electronic device to implement the web page test method.
- the application starts the browser by using an automated testing tool, and starts the website to be tested; acquires an operation element on the page of the website to be tested and an operation event of the operation element; Selecting an operation element to be tested from the operation element; sending an operation event of the operation element to be tested and the operation element to be tested to a page of the website to be tested for testing, thereby performing a targeted robustness test on the webpage, Determining whether the page of the website to be tested has error information; when the page of the website to be tested has error information, outputting the error information, because the above test solution is targeted, it does not cause other functions of the test system.
- the effect is to ensure the stability of the system to be tested and the integrity of the function of the system to be tested.
- FIG. 1 is a flow chart of a preferred embodiment of a method for testing a web page of the present application.
- FIG. 2 is a functional block diagram of a preferred embodiment of the web page page testing device of the present application.
- FIG. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of a method for testing a web page of the present application.
- FIG. 1 is a flow chart of a preferred embodiment of a web page test method of the present application. The order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.
- the webpage page testing method is applied to one or more electronic devices, which are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, the hardware including but not It is limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, and the like.
- ASIC application specific integrated circuit
- FPGA field-programmable gate array
- DSP digital signal processor
- embedded device an embedded device, and the like.
- the electronic device can be any electronic product that can interact with a user, such as a personal computer, a tablet, a smart phone, a personal digital assistant (PDA), a game machine, an interactive network television ( Internet Protocol Television (IPTV), smart wearable devices, etc.
- a personal computer such as a personal computer, a tablet, a smart phone, a personal digital assistant (PDA), a game machine, an interactive network television ( Internet Protocol Television (IPTV), smart wearable devices, etc.
- PDA personal digital assistant
- IPTV Internet Protocol Television
- smart wearable devices etc.
- the electronic device may also include a network device and/or a user device.
- the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud computing-based cloud composed of a large number of hosts or network servers.
- the network in which the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
- the Internet includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
- VPN virtual private network
- the electronic device starts the browser by using an automated testing tool, and starts the website to be tested.
- the computer software automated testing technology Selenium WebDriver has a strong visual automatic interaction function, which simulates the interaction between a person and a webpage through programming, thereby triggering dynamic data loading and acquiring dynamically generated data. That is, Selenium WebDriver technology can realistically simulate the actions performed by users on web pages, such as clicking "View More”, “Auto Login”, “Click Link”, “Fill Form”, “scroll mouse”, “mouse drag”, When you scroll down after the page is loaded, click on the page, save the screenshot, and so on, use Ajax technology to request more data from the server in real time, and then dynamically generate the content and load it using JavaScript scripts.
- the browser is opened by the Selenium tool, and the link (URL) of the website of the data to be tested is input in the browser, and the Selenium Web page tool invokes the get() method of the WebDriver to open the user input.
- the electronic device can open the webpage page corresponding to the XX webpage through the program language driver.get("http://www.XX"), and the input box data can be cleared by the programming language elem.clear(), through the programming language elem .send_keys(Keys.RETURN) can simulate the click of the Enter button, and the browser driver can be turned off by the program language driver.close().
- WebDriver directly controls the browser through native browser support or browser extensions. And WebDriver is developed for each browser, and tight integration with the browser can support the creation of more advanced tests, avoiding the limitations caused by the JavaScript security model.
- the electronic device acquires an operation element on a page of the website to be tested and an operation event of the operation element.
- the operation elements include, but are not limited to, one or a combination of the following:
- Hyperlink elements input box elements, button elements, drop-down selection box elements, radio button elements, multi-selection box elements, and more.
- the operation event of the operation element includes, but is not limited to, one or a combination of the following:
- the operation event corresponding to the hyperlink element includes a click event.
- the electronic device acquires an operation event corresponding to the hyperlink element as a click event, that is, when the electronic device When the device acquires a signal that the user clicks on the hyperlink element, the electronic device performs a task corresponding to the hyperlink, thereby linking to another webpage, or a specified location on a page linked to the website to be tested.
- the operation events corresponding to the input box element include inputting a random text event, and clearing the text event.
- the electronic device acquires an operation event corresponding to the input box element as inputting a random text event or clearing a text event
- the electronic device may enter text in the input box element or empty the text.
- the operation event corresponding to the button element includes a click event.
- the electronic device acquires an operation event corresponding to the button element as a click event, that is, when the electronic device When the user clicks the signal of the button element, the electronic device executes the task corresponding to the button element, for example, start running, pause running, stop running, and the like.
- the operation event corresponding to the pull-down selection box element includes selecting an option event.
- the electronic device acquires The operation event corresponding to the pull-down selection box element is an option event selected, that is, after the electronic device acquires the option A in the drop-down selection box element selected by the user, the electronic device selects the option A is displayed as a selection of the user on the page of the website to be tested.
- the operation event corresponding to the pull-down selection box element is an option event selected, that is, after the electronic device acquires the option A in the drop-down selection box element selected by the user, the electronic device selects the option A is displayed as a selection of the user on the page of the website to be tested.
- the operation event corresponding to the radio button element includes a selected event.
- the electronic device acquires The operation event corresponding to the radio button element is a selected event, that is, after the electronic device acquires the option A in the radio button element selected by the user, the electronic device selects the option A The selection as the user is displayed on the page of the website to be tested.
- a radio button element eg, the radio button element includes option A, option B, and option C
- the electronic device acquires The operation event corresponding to the radio button element is a selected event, that is, after the electronic device acquires the option A in the radio button element selected by the user, the electronic device selects the option A The selection as the user is displayed on the page of the website to be tested.
- the operation event corresponding to the multi-selection box element includes a selected event.
- the electronic device acquires The operation event corresponding to the multi-selection box element is a selected event, that is, after the electronic device acquires the option A and the option B in the multi-selection box element, the electronic device Displaying the option A and the option B as the user's selection on the page of the website to be tested.
- the operation elements and the operation events of the operation elements may have other forms, which are not limited in the application.
- the electronic device selects an operation element to be tested from the acquired operation elements.
- the selecting, by the electronic device, the operating elements to be tested from the acquired operating elements includes, but is not limited to, one or more of the following combinations:
- the electronic device acquires the number of uses of the acquired operation element, and determines an operation element whose usage count is greater than or equal to a preset number of times as the operation element to be tested.
- the electronic device may determine an operation element whose usage count is greater than or equal to the preset number of times 200 times as the operation element to be tested.
- the preset number of times may be customized by the user according to actual conditions, which is not limited in this application.
- the electronic device acquires the number of uses of the acquired operation element, sorts the used times of the acquired operation elements in order of increasing order, and sets the operation elements of the preset number of bits Determined as the operation element to be tested.
- the electronic device acquires the number of uses of the acquired operation element, and sorts the used times of the acquired operation elements in a descending order, and the electronic device will be ranked in the preset number of bits.
- the first 20 operating elements are determined as the operating elements to be tested.
- the preset number of bits can be customized by the user according to actual conditions, which is not limited in this application.
- the electronic device acquires an error rate of the acquired operation element, and determines an operation element whose error rate is greater than or equal to the preset error rate as the operation element to be tested.
- the electronic device determines an operation element whose error rate is greater than or equal to a preset error rate of 75% as the operation element to be tested.
- the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
- the electronic device acquires an error rate of the acquired operation element, sorts the error rate of the acquired operation element in descending order, and sets the operation element of the preset number of bits Determined as the operation element to be tested.
- the electronic device acquires an error rate of the acquired operation element, and sorts the error rate of the acquired operation element in descending order, and the electronic device will rank the previous preset number of bits.
- the first 20 operating elements are determined as the operating elements to be tested.
- the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
- the electronic device After acquiring the selected operation element to be tested, the electronic device acquires the associated operation element of the selected operation element to be tested, and determines the associated operation element as the operation element to be tested.
- the electronic device After acquiring the selected operation element X to be tested, the electronic device acquires the associated operation elements of the operation element X to be tested as Y and Z, and the electronic device simultaneously determines the Y and Z as the The operating element to be tested.
- the electronic device acquires a current test module, where the current test module corresponds to a user group, and the electronic device acquires an operation element corresponding to the current test module from the acquired operation element, and the The corresponding operation element is determined as the operation element to be tested.
- the website to be tested has a plurality of modules, and each module corresponds to a different user group.
- each module corresponds to a different user group.
- a financial website there are personal user modules used by individuals and enterprise user modules used by enterprises. At the time of testing, you can test only one module.
- the electronic device determines the corresponding operation element as the to-be-tested Operational element.
- the above-mentioned (1)-(2) can be used to filter out the use frequency.
- the operation element is used as the operation element to be tested; and since some operation elements have a low error rate or are not erroneous, the operation elements with higher error rate can be selected by the above methods (3)-(4) as The operation element to be tested; and because some of the operation elements are related to each other, when the operation event of an operation element is executed, the operation event of the associated operation element will continue to be executed, and therefore, the method of (5) above can be The associated operation event is directly determined as the operation element to be tested, and the complicated screening process is avoided; and since a test module only needs to test a part of the operation elements on one page, the method of (6) above can be directly The operation event corresponding to the current test module is retrieved as the operation element to be tested.
- the electronic device sends an operation event of the operation element to be tested and the operation element to be tested to a page of the website to be tested for testing.
- the electronic device can test the page of the website to be tested according to the operation event of the operation element to be tested and the operation event of the operation element to be tested, and the test method is not limited.
- the electronic device may send the selected operation element hyperlink element to be tested, and an operation event click event corresponding to the hyperlink element to the page of the website to be tested for testing.
- the electronic device determines whether the page of the website to be tested has error information.
- the electronic device when the page of the website to be tested has an error, the electronic device will issue an error message.
- the error information may be displayed on the page in the form of a prompt box, or may be displayed on the page by using a preset mark, which is not limited in the application.
- the method further includes:
- the electronic device acquires a log corresponding to the error information, and takes a screenshot of the log by using the automated testing tool to obtain a screenshot of the log, and the electronic device saves the screenshot of the log to a specified location.
- the driver of the Selenium tool instructs the browser to execute the command, and finally the browser saves the screenshot in the kernel, and the final effect is exactly the same as the user uses the mouse to capture the image on the page and save the effect.
- the electronic device may also name the log screenshot according to the content or time of the screenshot of the log, so as to facilitate subsequent logging of the log. Screenshot for query.
- the electronic device parses the log, obtains a category of error points and error points, and sends each type of error point to the corresponding maintenance personnel according to the category of the error point.
- the electronic device parses the log to obtain an error point, including:
- the electronic device acquires an error point from the log using a trained error recognition model.
- the electronic device training the error recognition model includes:
- the electronic device configures the error point training sample data of the different error categories, and distributes different types of training sample data into different folders. For example, the distribution of the training sample data of the first category into the first folder; the training sample data of the second category is distributed to the second folder; the training sample data of the third category is distributed to the third folder; The training sample data of the category is distributed to the fourth folder.
- the electronic device extracts a first preset ratio from each of the different folders, for example, 70% of the training sample data is used as training data to perform training of the error recognition model, and the electronic device takes each of the different folders.
- the second preset ratio for example, 30% of the training sample data is used as test data to verify the accuracy of the generated error recognition model.
- the electronic device increases the number of acquisitions of the different types of training sample data, and repeats the generation process of the error recognition model described above. Until the generated error recognition model accuracy rate is greater than or equal to the preset accuracy rate, for example, 99%.
- the error information of the corresponding category can be sent to the corresponding maintenance personnel, which is not only more targeted, but also improves maintenance efficiency and saves time loss caused by matching maintenance personnel.
- the electronic device acquires the maintenance personnel I corresponding to H, and the electronic device sends an error message to the maintenance personnel I for the maintenance personnel to perform maintenance immediately.
- the electronic device may send each type of error information to a corresponding maintenance personnel by means of a short message or an email, which is not limited in this application.
- the application can start an browser with an automated testing tool, and start a website to be tested; obtain an operation element on the page of the website to be tested and an operation event of the operation element; and obtain an operation element from the operation element. Selecting an operation element to be tested; sending an operation event of the operation element to be tested and the operation element to be tested to a page of the website to be tested for testing, thereby performing a targeted robustness test on the webpage, and determining the location Whether the page of the website to be tested has error information; when the page of the website to be tested has error information, the error information is output, and since the test solution is targeted, it does not affect other functions of the test system. Thereby ensuring the stability of the system to be tested and the integrity of the function of the system to be tested.
- the webpage page testing apparatus 11 includes an activation unit 110, an acquisition unit 111, a selection unit 112, a transmission unit 113, a determination unit 114, an output unit 115, a screenshot unit 116, an analysis unit 117, and a training unit 118.
- a module/unit referred to in this application refers to a series of computer readable instruction segments that can be executed by the processor 13 and that are capable of performing fixed functions, which are stored in the memory 12. In this embodiment, the functions of the respective modules/units will be detailed in the subsequent embodiments.
- the startup unit 110 starts the browser with an automated test tool and launches the URL to be tested.
- the computer software automated testing technology Selenium WebDriver has a strong visual automatic interaction function, which simulates the interaction between a person and a webpage through programming, thereby triggering dynamic data loading and acquiring dynamically generated data. That is, Selenium WebDriver technology can realistically simulate the actions performed by users on web pages, such as clicking "View More”, “Auto Login”, “Click Link”, “Fill Form”, “scroll mouse”, “mouse drag”, When you scroll down after the page is loaded, click on the page, save the screenshot, and so on, use Ajax technology to request more data from the server in real time, and then dynamically generate the content and load it using JavaScript scripts.
- the browser is opened by the Selenium tool, and the link (URL) of the website of the data to be tested is input in the browser, and the Selenium Web page tool invokes the get() method of the WebDriver to open the user input.
- the startup unit 110 can open the webpage page corresponding to the XX webpage through the program language driver.get("http://www.XX"), and the input box data can be cleared by the programming language elem.clear(), through the programming language. Elem.send_keys(Keys.RETURN) can simulate the click of the Enter button, and the browser driver can be turned off by the program language driver.close().
- WebDriver directly controls the browser through native browser support or browser extensions. And WebDriver is developed for each browser, and tight integration with the browser can support the creation of more advanced tests, avoiding the limitations caused by the JavaScript security model.
- the obtaining unit 111 acquires an operation element on the page of the website to be tested and an operation event of the operation element.
- the operation elements include, but are not limited to, one or a combination of the following:
- Hyperlink elements input box elements, button elements, drop-down selection box elements, radio button elements, multi-selection box elements, and more.
- the operation event of the operation element includes, but is not limited to, one or a combination of the following:
- the operation event corresponding to the hyperlink element includes a click event.
- the acquiring unit 111 acquires an operation event corresponding to the hyperlink element as a click event, that is, when When the obtaining unit 111 acquires a signal that the user clicks on the hyperlink element, the electronic device performs a task corresponding to the hyperlink, thereby linking to another webpage, or specifying a page linked to the website to be tested. position.
- the operation events corresponding to the input box element include inputting a random text event, and clearing the text event.
- the acquiring unit 111 acquires an operation event corresponding to the input box element as an input random text event or clears a text event.
- the electronic device can input text in the input box element or clear the text.
- the operation event corresponding to the button element includes a click event.
- the acquiring unit 111 acquires an operation event corresponding to the button element as a click event, that is, when the When the obtaining unit 111 acquires a signal that the user clicks on the button element, the electronic device executes a task corresponding to the button element, for example, starting a run, suspending a run, stopping a run, and the like.
- the operation event corresponding to the pull-down selection box element includes selecting an option event.
- the acquiring unit 111 obtains the operation element on the page of the website to be tested as a drop-down selection box element (eg, the pull-down selection box element includes option A, option B, and option C)
- the obtaining unit 111 Obtaining an operation event corresponding to the pull-down selection box element is selecting an option event, that is, after the obtaining unit 111 acquires the option A in the pull-down selection box element, the electronic device will The option A is displayed on the page of the website to be tested as a selection of the user.
- the operation event corresponding to the radio button element includes a selected event.
- the acquiring unit 111 acquires an operation element on the page of the website to be tested as a radio button element (eg, the radio button element includes option A, option B, and option C)
- the obtaining unit 111 Obtaining an operation event corresponding to the radio button element is a selected event, that is, after the obtaining unit 111 acquires the option A in the radio button element selected by the user, the electronic device
- the option A is displayed as a selection of the user on the page of the website to be tested.
- the operation event corresponding to the multi-selection box element includes a selected event.
- the acquiring unit 111 obtains the operation element on the page of the website to be tested as a multi-selection box element (for example, the multi-select box element includes the option A, the option B, and the option C)
- the obtaining unit 111 Obtaining an operation event corresponding to the multi-selection box element is a selected event, that is, after the obtaining unit 111 acquires the option A and the option B in the multi-selection box element,
- the electronic device displays the option A and the option B as the user's selection on the page of the website to be tested.
- the operation elements and the operation events of the operation elements may have other forms, which are not limited in the application.
- the selecting unit 112 selects an operation element to be tested from the acquired operation elements.
- the selecting unit 112 selects the operating elements to be tested from the acquired operating elements, including but not limited to the following one or more combinations:
- the selecting unit 112 acquires the number of uses of the acquired operation element, and determines an operation element whose usage count is greater than or equal to a preset number of times as the operation element to be tested.
- the selecting unit 112 may determine an operation element whose usage count is greater than or equal to the preset number of times 200 times as the operation element to be tested.
- the preset number of times may be customized by the user according to actual conditions, which is not limited in this application.
- the selecting unit 112 acquires the number of times of using the acquired operation element, sorts the used times of the acquired operation elements in order of increasing order, and performs the operation of pre-setting the number of bits.
- the element is determined as the operation element to be tested.
- the selecting unit 112 acquires the number of uses of the acquired operation element, and sorts the used times of the acquired operation elements in a descending order, and the selecting unit 112 will pre-set the preset.
- the first 20 bits of the operation element of the number of bits are determined as the operation element to be tested.
- the preset number of bits can be customized by the user according to actual conditions, which is not limited in this application.
- the selecting unit 112 acquires an error rate of the acquired operation element, and determines an operation element whose error rate is greater than or equal to the preset error rate as the operation element to be tested.
- the selecting unit 112 determines an operation element whose error rate is greater than or equal to a preset error rate of 75% as the operation element to be tested.
- the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
- the selecting unit 112 acquires an error rate of the acquired operation element, sorts the error rate of the acquired operation element in descending order, and performs an operation of pre-setting the number of bits.
- the element is determined as the operation element to be tested.
- the selecting unit 112 acquires an error rate of the acquired operation element, and sorts the error rate of the acquired operation element in descending order, and the selecting unit 112 will pre-set the preset.
- the first 20 bits of the operation element of the number of bits are determined as the operation element to be tested.
- the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
- the selecting unit 112 After obtaining the selected operation element to be tested, the selecting unit 112 acquires the associated operation element of the selected operation element to be tested, and determines the associated operation element as the operation element to be tested.
- the selection unit 112 acquires the associated operation elements of the operation element X to be tested as Y and Z, and the selection unit 112 simultaneously determines the Y and Z as The operation element to be tested.
- the selection unit 112 acquires a current test module, and the current test module corresponds to a user group, and the selection unit 112 acquires an operation element corresponding to the current test module from the acquired operation element, and The corresponding operation element is determined as the operation element to be tested.
- the website to be tested has a plurality of modules, and each module corresponds to a different user group.
- each module corresponds to a different user group.
- a financial website there are personal user modules used by individuals and enterprise user modules used by enterprises. At the time of testing, you can test only one module.
- the selection unit 112 determines the corresponding operation element as the The operating element to be tested.
- the above-mentioned (1)-(2) can be used to filter out the use frequency.
- the operation element is used as the operation element to be tested; and since some operation elements have a low error rate or are not erroneous, the operation elements with higher error rate can be selected by the above methods (3)-(4) as The operation element to be tested; and because some of the operation elements are related to each other, when the operation event of an operation element is executed, the operation event of the associated operation element will continue to be executed, and therefore, the method of (5) above can be The associated operation event is directly determined as the operation element to be tested, and the complicated screening process is avoided; and since a test module only needs to test a part of the operation elements on one page, the method of (6) above can be directly The operation event corresponding to the current test module is retrieved as the operation element to be tested.
- the sending unit 113 sends the operation event of the operation element to be tested and the operation event of the operation element to be tested to the page of the website to be tested for testing.
- the electronic device can test the page of the website to be tested according to the operation event of the operation element to be tested and the operation element to be tested, and the test method is not limited.
- the sending unit 113 may send the selected operation element hyperlink element to be tested, and an operation event click event corresponding to the hyperlink element to the page of the website to be tested for testing.
- the determining unit 114 determines whether the page of the website to be tested has error information.
- the determining unit 114 when the page of the website to be tested has an error, the determining unit 114 will issue an error message.
- the error information may be displayed on the page in the form of a prompt box, or may be displayed on the page by using a preset mark, which is not limited in the application.
- the output unit 115 When the page of the website to be tested has error information, the output unit 115 outputs the error information.
- the method further includes:
- the obtaining unit 111 acquires a log corresponding to the error information, and the screenshot unit 116 takes a screenshot of the log through the automated testing tool to obtain a screenshot of the log, and the screenshot unit 116 saves the screenshot of the log to a specified location.
- the driver of the Selenium tool instructs the browser to execute the command, and finally the browser saves the screenshot in the kernel, and the final effect is exactly the same as the user uses the mouse to capture the image on the page and save the effect.
- the screenshot unit 116 saves the log screenshot to a specified location (such as a specified folder), the screenshot may be named according to the content or time of the screenshot of the log, so as to facilitate subsequent Log screenshots for query.
- the parsing unit 117 parses the log to obtain a category of error points and error points, and the sending unit 113 sends each type of error point to the corresponding maintenance personnel according to the category of the error point.
- the parsing unit 117 parses the log, and obtaining error points includes:
- the parsing unit 117 acquires an error point from the log using the trained error recognition model.
- the training unit 118 training the error recognition model includes:
- the training unit 118 configures the error point training sample data of the different error categories, and distributes the different types of training sample data into different folders. For example, the distribution of the training sample data of the first category into the first folder; the training sample data of the second category is distributed to the second folder; the training sample data of the third category is distributed to the third folder; The training sample data of the category is distributed to the fourth folder.
- the training unit 118 extracts a first preset ratio from each of the different folders, for example, 70% of the training sample data is used as training data to perform training of the error recognition model, and the training unit 118 takes each of the different folders. The remaining second preset ratio, for example, 30% of the training sample data is used as test data to verify the accuracy of the generated error recognition model.
- the training unit 118 increases the number of acquisitions of the different types of training sample data, and repeats the generation process of the error recognition model described above. Until the generated error recognition model accuracy rate is greater than or equal to the preset accuracy rate, for example, 99%.
- the sending unit 113 sends each type of error point to the corresponding maintenance personnel according to the category of the error point.
- the error information of the corresponding category can be sent to the corresponding maintenance personnel, which is not only more targeted, but also improves maintenance efficiency and saves time loss caused by matching maintenance personnel.
- the sending unit 113 acquires the maintenance personnel I corresponding to the H, and the sending unit 113 sends the error information to the maintenance personnel I for the maintenance personnel to perform maintenance immediately.
- the sending unit 113 may send each type of error information to a corresponding maintenance personnel by means of a short message or an email, which is not limited in this application.
- the application can start an browser with an automated testing tool, and start a website to be tested; obtain an operation element on the page of the website to be tested and an operation event of the operation element; and obtain an operation element from the operation element. Selecting an operation element to be tested; sending an operation event of the operation element to be tested and the operation element to be tested to a page of the website to be tested for testing, thereby performing a targeted robustness test on the webpage, and determining the location Whether the page of the website to be tested has error information; when the page of the website to be tested has error information, the error information is output, and since the test solution is targeted, it does not affect other functions of the test system. Thereby ensuring the stability of the system to be tested and the integrity of the function of the system to be tested.
- FIG. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the method for testing a web page of the present application.
- the electronic device 1 is a device capable of automatically performing numerical calculation and/or information processing according to an instruction set or stored in advance, and the hardware includes, but not limited to, a microprocessor, an application specific integrated circuit (ASIC). ), Field-Programmable Gate Array (FPGA), Digital Signal Processor (DSP), embedded devices, etc.
- ASIC application specific integrated circuit
- FPGA Field-Programmable Gate Array
- DSP Digital Signal Processor
- the electronic device 1 can also be, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device, such as a personal computer, a tablet, or a smart phone. , Personal Digital Assistant (PDA), game consoles, Internet Protocol Television (IPTV), smart wearable devices, etc.
- PDA Personal Digital Assistant
- IPTV Internet Protocol Television
- the electronic device 1 can also be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the network in which the electronic device 1 is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
- the Internet includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
- VPN virtual private network
- the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions stored in the memory 12 and executable on the processor 13. , for example, a web page test program.
- the schematic diagram is merely an example of the electronic device 1, does not constitute a limitation on the electronic device 1, may include more or less components than those illustrated, or combine some components, or different. Components such as the electronic device 1 may also include input and output devices, network access devices, buses, and the like.
- the processor 13 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
- the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 13 is an operation core and a control center of the electronic device 1, and connects the entire electronic device by using various interfaces and lines. Each part of 1 and an operating system of the electronic device 1 and various installed applications, program codes, and the like.
- the processor 13 executes an operating system of the electronic device 1 and various types of installed applications.
- the processor 13 executes the application to implement the steps in the foregoing various web page test method embodiments, such as steps S10, S11, S12, S13, S14, and S15 shown in FIG.
- the processor 13 implements the functions of each module/unit in each device embodiment when the computer readable instructions are executed, for example, starting an browser with an automated testing tool, and starting a website to be tested; An operation element on the page of the URL and an operation event of the operation element; selecting an operation element to be tested from the acquired operation element; and transmitting an operation event of the operation element to be tested and the operation element to be tested to the The page of the website to be tested is tested; whether the page of the website to be tested has error information; and when the page of the website to be tested has error information, the error information is output.
- the computer readable instructions may be partitioned into one or more modules/units, the one or more modules/units being stored in the memory 12 and executed by the processor 13 to Complete this application.
- the one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function for describing the execution of the computer readable instructions in the electronic device 1.
- the computer readable instructions may be divided into an activation unit 110, an acquisition unit 111, a selection unit 112, a transmission unit 113, a determination unit 114, an output unit 115, a screenshot unit 116, an analysis unit 117, and a training unit 118.
- the memory 12 can be used to store the computer readable instructions and/or modules, which are stored or executed in a memory 12 by running or executing computer readable instructions and/or modules stored in the memory 12.
- the internal data implements various functions of the electronic device 1.
- the memory 12 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; Stores data created based on the use of the phone (such as audio data, phone book, etc.).
- the memory 12 may include a high-speed random access memory, and may also include a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), and a secure digital (SD).
- a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), and a secure digital (SD).
- SSD secure digital
- flash card at least one disk storage device, flash device, or other volatile solid state storage device.
- the memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a circuit having a storage function in a physical form, such as a RAM (Random-Access Memory), a FIFO (First In First Out), or the like. Alternatively, the memory 12 may also be a memory having a physical form such as a memory stick, a TF card, or the like.
- the modules/units integrated by the electronic device 1 can be stored in a non-volatile readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer-readable instructions, which may be stored in a non-volatile manner. In reading a storage medium, the computer readable instructions, when executed by a processor, implement the steps of the various method embodiments described above.
- the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like.
- the computer readable medium can include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read-Only) Memory), random access memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media.
- computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media Does not include electrical carrier signals and telecommunication signals.
- the memory 12 in the electronic device 1 stores a plurality of instructions to implement a webpage page testing method
- the processor 13 can execute the plurality of instructions to implement: launching a browser with an automated testing tool And starting the website to be tested; acquiring an operation element on the page of the website to be tested and an operation event of the operation element; selecting an operation element to be tested from the obtained operation element; The operation event of the operation element to be tested is sent to the page of the website to be tested for testing; the page of the website to be tested is determined to have error information; and when the page of the website to be tested has error information, the output is Error message.
- the operational element comprises one or more of the following combinations:
- Hyperlink elements input box elements, button elements, drop-down selection box elements, radio button elements, multi-selection box elements;
- the operational events of the operational elements include one or more of the following combinations:
- the operation event corresponding to the hyperlink element includes a click event
- the operation events corresponding to the input box element include inputting a random text event, clearing a text event; and/or
- the operation event corresponding to the button element includes a click event
- the operation event corresponding to the pull-down selection box element includes selecting an option event;
- the operation event corresponding to the radio button element includes a selected event
- the operation event corresponding to the multiple selection box element includes a selected event.
- the processor 13 further executes a plurality of instructions including:
- Obtaining a current test module and acquiring an operation element corresponding to the current test module from the acquired operation element, and determining the corresponding operation element as the operation element to be tested, where the current test module corresponds to A group of users.
- the processor 13 further executes a plurality of instructions including:
- the log is taken by the automated test tool, a log screenshot is obtained, and the log screenshot is saved to a specified location.
- the processor 13 further executes a plurality of instructions including:
- each type of error point is sent to the corresponding maintenance personnel.
- the processor 13 further executes a plurality of instructions including:
- the error point is obtained from the log using the trained error recognition model.
- the processor 13 further executes a plurality of instructions including:
- the training the error recognition model includes:
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software function modules.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请提供一种网页页面测试方法、装置、电子设备和介质。所述网页页面测试方法包括:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。
Description
本申请要求于2018年04月10日提交中国专利局,申请号为201810316068.9发明名称为“网页页面测试方法、装置、电子设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及测试技术领域,尤其涉及一种网页页面测试方法、装置、电子设备和介质。
现有技术方案中,针对待测试网页健壮性及稳定性的测试,通常集中在接口API(Application Programming Interface,应用程序编程接口)层,对于UI(User Interface,用户界面)层仅关注功能的完整性,而很少直接对UI层进行有针对性的健壮性测试。
发明内容
鉴于以上内容,有必要提供一种网页页面测试方法、装置、电子设备和介质,能对网页进行有针对性的健壮性测试,同时保证了待测试系统的稳定性及待测试系统功能的完整性。
一种网页页面测试方法,所述方法包括:
采用自动化测试工具启动浏览器,并启动待测网址;
获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;
从所述获取的操作元素中选取待测操作元素;
将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;
判断所述待测网址的页面是否有报错信息;
当所述待测网址的页面有报错信息时,输出所述报错信息。
一种网页页面测试装置,所述装置包括:
启动单元,用于采用自动化测试工具启动浏览器,并启动待测网址;
获取单元,用于获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;
选取单元,用于从所述获取的操作元素中选取待测操作元素;
发送单元,用于将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;
判断单元,用于判断所述待测网址的页面是否有报错信息;
输出单元,用于当所述待测网址的页面有报错信息时,输出所述报错信息。
一种电子设备,所述电子设备包括:
存储器,存储至少一个指令;及
处理器,执行所述存储器中存储的指令以实现所述网页页面测试方法。
一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现所述网页页面测试方法。
由以上技术方案可以看出,本申请采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。
图1是本申请网页页面测试方法的较佳实施例的流程图。
图2是本申请网页页面测试装置的较佳实施例的功能模块图。
图3是本申请实现网页页面测试方法的较佳实施例的电子设备的结构示意图。
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本申请进行详细描述。
如图1所示,是本申请网页页面测试方法的较佳实施例的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。
所述网页页面测试方法应用于一个或者多个电子设备中,所述电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述电子设备可以是任何一种可与用户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。
所述电子设备还可以包括网络设备和/或用户设备。其中,所述网络设备包括,但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(Cloud Computing)的由大量主机或网络服务器构成的云。
所述电子设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。
S10,所述电子设备采用自动化测试工具启动浏览器,并启动待测网址。
具体地,计算机软件自动化测试技术Selenium WebDriver具有较强的可视化自动交互功能,通过编程来模拟人与网页的交互,从而触发动态数据加载,获取动态生成的数据。即Selenium WebDriver技术能够真实的模拟用户在网页上执行的操作,例如点击“查看更多”、“自动登录”、“点击链接”、“填写表单”、“滚动鼠标”、“鼠标拖拽”、“页面加载完成后向下滚动”、“点击翻页”、“截图保存”等功能时,实时地使用Ajax技术向服务器请求更多的数据,再使用JavaScript脚本动态生成内容并加载显示出来。
在本实施例中,用户调用Selenium后,通过Selenium工具打开浏览器,在浏览器中输入待测数据的网站的链接(URL),Selenium Web页面工具调用WebDriver的get()方法打开用户输入的待测数据的网站的Web页面。
例如:所述电子设备通过程序语言driver.get("http://www.XX")可以打开XX网址对应的网页页面,通过程序语言elem.clear()可以清除输入框数据,通过程序语言elem.send_keys(Keys.RETURN)可以模拟点击回车按钮,通过程序语言driver.close()可以关闭浏览器驱动等。
在本实施例中,WebDriver通过原生浏览器支持或者浏览器扩展直接控制浏览器。并且WebDriver是针对各个浏览器而开发,与浏览器的紧密集成可以支持创建更高级的测试,避免了JavaScript安全模型导致的限制。
S11,所述电子设备获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件。
在本实施例中,所述操作元素包括,但不限于以下一种或者多种的组合:
超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素等等。
进一步地,对应于所述操作元素,所述操作元素的操作事件包括,但不限于以下一种或者多种的组合:
(1)所述超链接元素对应的操作事件包括点击事件。
例如:当所述电子设备获取到待测网址的页面上的操作元素为超链接元素后,所述电子设备获取所述超链接元素对应的操作事件为点击事件,也就是说,当所述电子设备获取到用户点击所述超链接元素的信号时,所述电子设备执行所述超链接对应的任务,从而链接到其他网页,或者是链接到所述待测网址的页面上的指定位置。
(2)所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件。
例如:当所述电子设备获取到待测网址的页面上的操作元素为输入框元素后,所述电子设备获取到所述输入框元素对应的操作事件为输入随机文本事件或者清空文本事件,则所述电子设备可以在所述输入框元素中输入文本,或者是清空文本。
(3)所述按钮元素对应的操作事件包括点击事件。
例如:当所述电子设备获取到待测网址的页面上的操作元素为按钮元素后,所述电子设备获取到所述按钮元素对应的操作事件为点击事件,也就是 说,当所述电子设备获取到用户点击所述按钮元素的信号时,所述电子设备执行所述按钮元素对应的任务,例如:开始运行、暂停运行、停止运行等等。
(4)所述下拉选择框元素对应的操作事件包括选中某一选项事件。
例如:当所述电子设备获取到待测网址的页面上的操作元素为下拉选择框元素(如:所述下拉选择框元素包括选项A、选项B及选项C)后,所述电子设备获取到所述下拉选择框元素对应的操作事件为选中某一选项事件,也就是说,当所述电子设备获取到用户选中所述下拉选择框元素中的选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所述待测网址的页面上。
(5)所述单选按钮元素对应的操作事件包括选中事件。
例如:当所述电子设备获取到待测网址的页面上的操作元素为单选按钮元素(如:所述单选按钮元素包括选项A、选项B及选项C)后,所述电子设备获取到所述单选按钮元素对应的操作事件为选中事件,也就是说,当所述电子设备获取到用户选中所述单选按钮元素中的所述选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所述待测网址的页面上。
(6)所述多选框元素对应的操作事件包括选中事件。
例如:当所述电子设备获取到待测网址的页面上的操作元素为多选框元素(如:所述多选框元素包括选项A、选项B及选项C)后,所述电子设备获取到所述多选框元素对应的操作事件为选中事件,也就是说,当所述电子设备获取到用户选中所述多选框元素中的所述选项A及所述选项B后,所述电子设备将所述选项A及所述选项B作为所述用户的选择显示在所述待测网址的页面上。
当然,在其他实施例中,所述操作元素以及所述操作元素的操作事件也可以有其他形式,本申请不作限制。
S12,所述电子设备从所述获取的操作元素中选取待测操作元素。
优选地,所述电子设备从所述获取的操作元素中选取待测操作元素包括,但不限于以下一种或者多种的组合:
(1)所述电子设备获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素。
例如:所述电子设备获取所述获取的操作元素的使用次数后,所述电子设备即可将使用次数大于或者等于预设次数200次的操作元素确定为所述待测操作元素。
具体地,所述预设次数可以根据实际情况由用户进行自定义设置,本申请不作限制。
(2)所述电子设备获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。
例如:所述电子设备获取所述获取的操作元素的使用次数,并将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,所述电子设备将排在前预设位数前20位的操作元素确定为所述待测操作元素。
具体地,所述预设位数可以根据实际情况由用户进行自定义设置,本申请不作限制。
(3)所述电子设备获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素。
例如:所述电子设备获取所述获取的操作元素的错误率后,所述电子设备将错误率大于或者等于预设错误率75%的操作元素确定为所述待测操作元素。
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。
(4)所述电子设备获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。
例如:所述电子设备获取所述获取的操作元素的错误率,并将所述获取的操作元素的错误率按照由高到低的顺序进行排序,所述电子设备将排在前预设位数前20位的操作元素确定为所述待测操作元素。
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。
(5)当获取到选取的待测操作元素后,所述电子设备获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素。
例如:当获取到选取的待测操作元素X后,所述电子设备获取所述待测操作元素X的关联操作元素为Y及Z,所述电子设备同时将所述Y及Z确定为所述待测操作元素。
(6)所述电子设备获取当前测试模块,所述当前测试模块对应一类用户群体,所述电子设备从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素。
具体地,所述待测网址上有多个模块,每个模块对应不同的用户群体,例如一个金融类网址中,有个人使用的个人用户模块、企业使用的企业用户模块。在测试的时候,可以只测试一个模块。
例如:如果所述电子设备获取到当前测试模块为W,再从所述获取的操作元素中获取所述W对应的操作元素,所述电子设备将所述对应的操作元素确定为所述待测操作元素。
可以理解的是,由于一个页面上可以包括大量的操作元素,但是有些操作元素是用户几乎不会用到的,因此,通过上述(1)-(2)的方式可以筛选出使用频率较高的操作元素作为所述待测操作元素;又由于有些操作元素是出错率很低或者是不出错的,因此,通过上述(3)-(4)的方式可以筛选出错误率较高的操作元素作为所述待测操作元素;又由于有些操作元素间是相互关联的,当执行完一个操作元素的操作事件后,将继续执行关联的操作元素的操作事件,因此,通过上述(5)的方式可以直接将关联的操作事件确定为所述待测操作元素,避免复杂的筛选过程;又由于一个测试模块中只需对 应测试一个页面上的部分操作元素,因此,通过上述(6)的方式可以直接调取当前测试模块对应的操作事件作为所述待测操作元素。
这样,既可以避免由于多余的测试工作影响测试的效率,又可以节约测试的成本。
S13,所述电子设备将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试。
通过上述实施方式,所述电子设备根据所述待测操作元素及所述待测操作元素的操作事件,即可对所述待测网址的页面进行测试,测试方法不作限制。
例如:所述电子设备可以将选取的待测操作元素超链接元素,及所述超链接元素对应的操作事件点击事件发送至所述待测网址的页面进行测试。
S14,所述电子设备判断所述待测网址的页面是否有报错信息。
在本实施例中,当所述待测网址的页面有错误时,所述电子设备将发出报错信息。
例如:当对所述超链接元素进行点击操作时,如果没有链接到其他网页,或者是链接到所述待测网址的页面上的指定位置,则说明在所述待测网址的页面中,所述超链接元素位置出现错误,所述电子设备将发出报错信息。
具体地,所述报错信息可能以提示框的形式显示在所述页面上,也可能以预设标记显示在所述页面上,本申请不作限制。
S15,当所述待测网址的页面有报错信息时,所述电子设备输出所述报错信息。
优选地,当所述待测网址的页面有报错信息时,所述方法还包括:
所述电子设备获取所述报错信息对应的日志,通过所述自动化测试工具对所述日志进行截图,得到日志截图,所述电子设备将所述日志截图保存至指定位置。
具体地,Selenium工具的驱动程序指示浏览器执行命令,最后由浏览器在内核中进行截图保存操作,最终的效果与用户使用鼠标在页面上截取图片并保存的效果完全相同。
进一步地,所述电子设备将所述日志截图保存至指定位置(如指定文件夹)后,还可以根据所述日志截图的内容或者时间等信息为所述日志截图命名,方便后续对所述日志截图进行查询。
优选地,所述电子设备解析所述日志,得到错误点及错误点的类别,并根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
优选地,所述电子设备解析所述日志,得到错误点包括:
所述电子设备利用训练好的错误识别模型从所述日志中获取错误点。
在本实施例中,所述电子设备训练所述错误识别模型包括:
所述电子设备配置所述不同错误类别的错误点训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里。例如,第一类别的训练样本数据的分发到第一文件夹里;第二类别的训练样本数据分发到第二文件夹里;第三类别的训练样本数据分发到第三文件夹里;第四类别的训练样本数据分发 到第四文件夹里。所述电子设备从不同文件夹下各提取第一预设比例,例如,70%的训练样本数据作为训练数据进行所述错误识别模型的训练,所述电子设备从不同文件夹下各取剩下的第二预设比例,例如,30%的训练样本数据作为测试数据以对生成的所述错误识别模型进行准确性验证。
若生成的所述错误识别模型准确率小于预设准确率,例如,99%,则所述电子设备增加所述不同类别的训练样本数据的获取数量,重复上述所述错误识别模型的生成过程,直到生成的所述错误识别模型准确率大于等于预设准确率,例如,99%。
通过上述实施方式,可以将对应类别的错误信息发送给对应的维护人员,不仅更加有针对性,同时提高了维护效率,节约了由于匹配维护人员造成的时间损失。
例如:当确定错误类别为H时,所述电子设备获取H对应的维护人员I,所述电子设备将错误信息发送给所述维护人员I,以供所述维护人员I即时进行维护。
具体地,所述电子设备可以以短信或者邮件等方式将每类的错误信息发送至对应的维护人员,本申请不作限制。
综上所述,本申请能采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。
如图2所示,是本申请网页页面测试装置的较佳实施例的功能模块图。所述网页页面测试装置11包括启动单元110、获取单元111、选取单元112、发送单元113、判断单元114、输出单元115、截图单元116、解析单元117及训练单元118。本申请所称的模块/单元是指一种能够被处理器13所执行,并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器12中。在本实施例中,关于各模块/单元的功能将在后续的实施例中详述。
启动单元110采用自动化测试工具启动浏览器,并启动待测网址。
具体地,计算机软件自动化测试技术Selenium WebDriver具有较强的可视化自动交互功能,通过编程来模拟人与网页的交互,从而触发动态数据加载,获取动态生成的数据。即Selenium WebDriver技术能够真实的模拟用户在网页上执行的操作,例如点击“查看更多”、“自动登录”、“点击链接”、“填写表单”、“滚动鼠标”、“鼠标拖拽”、“页面加载完成后向下滚动”、“点击翻页”、“截图保存”等功能时,实时地使用Ajax技术向服务器请求更多的数据,再使用JavaScript脚本动态生成内容并加载显示出来。
在本实施例中,用户调用Selenium后,通过Selenium工具打开浏览器, 在浏览器中输入待测数据的网站的链接(URL),Selenium Web页面工具调用WebDriver的get()方法打开用户输入的待测数据的网站的Web页面。
例如:所述启动单元110通过程序语言driver.get("http://www.XX")可以打开XX网址对应的网页页面,通过程序语言elem.clear()可以清除输入框数据,通过程序语言elem.send_keys(Keys.RETURN)可以模拟点击回车按钮,通过程序语言driver.close()可以关闭浏览器驱动等。
在本实施例中,WebDriver通过原生浏览器支持或者浏览器扩展直接控制浏览器。并且WebDriver是针对各个浏览器而开发,与浏览器的紧密集成可以支持创建更高级的测试,避免了JavaScript安全模型导致的限制。
获取单元111获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件。
在本实施例中,所述操作元素包括,但不限于以下一种或者多种的组合:
超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素等等。
进一步地,对应于所述操作元素,所述操作元素的操作事件包括,但不限于以下一种或者多种的组合:
(1)所述超链接元素对应的操作事件包括点击事件。
例如:当所述获取单元111获取到待测网址的页面上的操作元素为超链接元素后,所述获取单元111获取所述超链接元素对应的操作事件为点击事件,也就是说,当所述获取单元111获取到用户点击所述超链接元素的信号时,所述电子设备执行所述超链接对应的任务,从而链接到其他网页,或者是链接到所述待测网址的页面上的指定位置。
(2)所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件。
例如:当所述获取单元111获取到待测网址的页面上的操作元素为输入框元素后,所述获取单元111获取到所述输入框元素对应的操作事件为输入随机文本事件或者清空文本事件,则所述电子设备可以在所述输入框元素中输入文本,或者是清空文本。
(3)所述按钮元素对应的操作事件包括点击事件。
例如:当所述获取单元111获取到待测网址的页面上的操作元素为按钮元素后,所述获取单元111获取到所述按钮元素对应的操作事件为点击事件,也就是说,当所述获取单元111获取到用户点击所述按钮元素的信号时,所述电子设备执行所述按钮元素对应的任务,例如:开始运行、暂停运行、停止运行等等。
(4)所述下拉选择框元素对应的操作事件包括选中某一选项事件。
例如:当所述获取单元111获取到待测网址的页面上的操作元素为下拉选择框元素(如:所述下拉选择框元素包括选项A、选项B及选项C)后,所述获取单元111获取到所述下拉选择框元素对应的操作事件为选中某一选项事件,也就是说,当所述获取单元111获取到用户选中所述下拉选择框元素中的选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所 述待测网址的页面上。
(5)所述单选按钮元素对应的操作事件包括选中事件。
例如:当所述获取单元111获取到待测网址的页面上的操作元素为单选按钮元素(如:所述单选按钮元素包括选项A、选项B及选项C)后,所述获取单元111获取到所述单选按钮元素对应的操作事件为选中事件,也就是说,当所述获取单元111获取到用户选中所述单选按钮元素中的所述选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所述待测网址的页面上。
(6)所述多选框元素对应的操作事件包括选中事件。
例如:当所述获取单元111获取到待测网址的页面上的操作元素为多选框元素(如:所述多选框元素包括选项A、选项B及选项C)后,所述获取单元111获取到所述多选框元素对应的操作事件为选中事件,也就是说,当所述获取单元111获取到用户选中所述多选框元素中的所述选项A及所述选项B后,所述电子设备将所述选项A及所述选项B作为所述用户的选择显示在所述待测网址的页面上。
当然,在其他实施例中,所述操作元素以及所述操作元素的操作事件也可以有其他形式,本申请不作限制。
选取单元112从所述获取的操作元素中选取待测操作元素。
优选地,所述选取单元112从所述获取的操作元素中选取待测操作元素包括,但不限于以下一种或者多种的组合:
(1)所述选取单元112获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素。
例如:所述选取单元112获取所述获取的操作元素的使用次数后,所述选取单元112即可将使用次数大于或者等于预设次数200次的操作元素确定为所述待测操作元素。
具体地,所述预设次数可以根据实际情况由用户进行自定义设置,本申请不作限制。
(2)所述选取单元112获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。
例如:所述选取单元112获取所述获取的操作元素的使用次数,并将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,所述选取单元112将排在前预设位数前20位的操作元素确定为所述待测操作元素。
具体地,所述预设位数可以根据实际情况由用户进行自定义设置,本申请不作限制。
(3)所述选取单元112获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素。
例如:所述选取单元112获取所述获取的操作元素的错误率后,所述选取单元112将错误率大于或者等于预设错误率75%的操作元素确定为所述待测操作元素。
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。
(4)所述选取单元112获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。
例如:所述选取单元112获取所述获取的操作元素的错误率,并将所述获取的操作元素的错误率按照由高到低的顺序进行排序,所述选取单元112将排在前预设位数前20位的操作元素确定为所述待测操作元素。
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。
(5)当获取到选取的待测操作元素后,所述选取单元112获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素。
例如:当获取到选取的待测操作元素X后,所述选取单元112获取所述待测操作元素X的关联操作元素为Y及Z,所述选取单元112同时将所述Y及Z确定为所述待测操作元素。
(6)所述选取单元112获取当前测试模块,所述当前测试模块对应一类用户群体,所述选取单元112从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素。
具体地,所述待测网址上有多个模块,每个模块对应不同的用户群体,例如一个金融类网址中,有个人使用的个人用户模块、企业使用的企业用户模块。在测试的时候,可以只测试一个模块。
例如:如果所述选取单元112获取到当前测试模块为W,再从所述获取的操作元素中获取所述W对应的操作元素,所述选取单元112将所述对应的操作元素确定为所述待测操作元素。
可以理解的是,由于一个页面上可以包括大量的操作元素,但是有些操作元素是用户几乎不会用到的,因此,通过上述(1)-(2)的方式可以筛选出使用频率较高的操作元素作为所述待测操作元素;又由于有些操作元素是出错率很低或者是不出错的,因此,通过上述(3)-(4)的方式可以筛选出错误率较高的操作元素作为所述待测操作元素;又由于有些操作元素间是相互关联的,当执行完一个操作元素的操作事件后,将继续执行关联的操作元素的操作事件,因此,通过上述(5)的方式可以直接将关联的操作事件确定为所述待测操作元素,避免复杂的筛选过程;又由于一个测试模块中只需对应测试一个页面上的部分操作元素,因此,通过上述(6)的方式可以直接调取当前测试模块对应的操作事件作为所述待测操作元素。
这样,既可以避免由于多余的测试工作影响测试的效率,又可以节约测试的成本。
发送单元113将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试。
通过上述实施方式,所述电子设备根据所述待测操作元素及所述待测操 作元素的操作事件,即可对所述待测网址的页面进行测试,测试方法不作限制。
例如:所述发送单元113可以将选取的待测操作元素超链接元素,及所述超链接元素对应的操作事件点击事件发送至所述待测网址的页面进行测试。
判断单元114判断所述待测网址的页面是否有报错信息。
在本实施例中,当所述待测网址的页面有错误时,所述判断单元114将发出报错信息。
例如:当对所述超链接元素进行点击操作时,如果没有链接到其他网页,或者是链接到所述待测网址的页面上的指定位置,则说明在所述待测网址的页面中,所述超链接元素位置出现错误,所述判断单元114将发出报错信息。
具体地,所述报错信息可能以提示框的形式显示在所述页面上,也可能以预设标记显示在所述页面上,本申请不作限制。
当所述待测网址的页面有报错信息时,输出单元115输出所述报错信息。
优选地,当所述待测网址的页面有报错信息时,所述方法还包括:
所述获取单元111获取所述报错信息对应的日志,截图单元116通过所述自动化测试工具对所述日志进行截图,得到日志截图,所述截图单元116将所述日志截图保存至指定位置。
具体地,Selenium工具的驱动程序指示浏览器执行命令,最后由浏览器在内核中进行截图保存操作,最终的效果与用户使用鼠标在页面上截取图片并保存的效果完全相同。
进一步地,所述截图单元116将所述日志截图保存至指定位置(如指定文件夹)后,还可以根据所述日志截图的内容或者时间等信息为所述日志截图命名,方便后续对所述日志截图进行查询。
优选地,解析单元117解析所述日志,得到错误点及错误点的类别,所述发送单元113根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
优选地,所述解析单元117解析所述日志,得到错误点包括:
所述解析单元117利用训练好的错误识别模型从所述日志中获取错误点。
在本实施例中,训练单元118训练所述错误识别模型包括:
所述训练单元118配置所述不同错误类别的错误点训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里。例如,第一类别的训练样本数据的分发到第一文件夹里;第二类别的训练样本数据分发到第二文件夹里;第三类别的训练样本数据分发到第三文件夹里;第四类别的训练样本数据分发到第四文件夹里。所述训练单元118从不同文件夹下各提取第一预设比例,例如,70%的训练样本数据作为训练数据进行所述错误识别模型的训练,所述训练单元118从不同文件夹下各取剩下的第二预设比例,例如,30%的训练样本数据作为测试数据以对生成的所述错误识别模型进行准确性验证。
若生成的所述错误识别模型准确率小于预设准确率,例如,99%,则所 述训练单元118增加所述不同类别的训练样本数据的获取数量,重复上述所述错误识别模型的生成过程,直到生成的所述错误识别模型准确率大于等于预设准确率,例如,99%。
所述发送单元113根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
通过上述实施方式,可以将对应类别的错误信息发送给对应的维护人员,不仅更加有针对性,同时提高了维护效率,节约了由于匹配维护人员造成的时间损失。
例如:当确定错误类别为H时,所述发送单元113获取H对应的维护人员I,所述发送单元113将错误信息发送给所述维护人员I,以供所述维护人员I即时进行维护。
具体地,所述发送单元113可以以短信或者邮件等方式将每类的错误信息发送至对应的维护人员,本申请不作限制。
综上所述,本申请能采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。
如图3所示,是本申请实现网页页面测试方法的较佳实施例的电子设备的结构示意图。
所述电子设备1是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述电子设备1还可以是但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。
所述电子设备1还可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。
所述电子设备1所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。
在本申请的一个实施例中,所述电子设备1包括,但不限于,存储器12、处理器13,以及存储在所述存储器12中并可在所述处理器13上运行的计算 机可读指令,例如网页页面测试程序。
本领域技术人员可以理解,所述示意图仅仅是电子设备1的示例,并不构成对电子设备1的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备1还可以包括输入输出设备、网络接入设备、总线等。
所称处理器13可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器13是所述电子设备1的运算核心和控制中心,利用各种接口和线路连接整个电子设备1的各个部分,及执行所述电子设备1的操作系统以及安装的各类应用程序、程序代码等。
所述处理器13执行所述电子设备1的操作系统以及安装的各类应用程序。所述处理器13执行所述应用程序以实现上述各个网页页面测试方法实施例中的步骤,例如图1所示的步骤S10、S11、S12、S13、S14及S15。
或者,所述处理器13执行所述计算机可读指令时实现上述各装置实施例中各模块/单元的功能,例如:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。
示例性的,所述计算机可读指令可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令在所述电子设备1中的执行过程。例如,所述计算机可读指令可以被分割成启动单元110、获取单元111、选取单元112、发送单元113、判断单元114、输出单元115、截图单元116、解析单元117及训练单元118。
所述存储器12可用于存储所述计算机可读指令和/或模块,所述处理器13通过运行或执行存储在所述存储器12内的计算机可读指令和/或模块,以及调用存储在存储器12内的数据,实现所述电子设备1的各种功能。所述存储器12可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器12可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一 个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
所述存储器12可以是电子设备1的外部存储器和/或内部存储器。进一步地,所述存储器12可以是集成电路中没有实物形式的具有存储功能的电路,如RAM(Random-Access Memory,随机存取存储器)、FIFO(First In First Out,)等。或者,所述存储器12也可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)等等。
所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。
其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
结合图1,所述电子设备1中的所述存储器12存储多个指令以实现一种网页页面测试方法,所述处理器13可执行所述多个指令从而实现:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。
根据本申请优选实施例,所述操作元素包括以下一种或者多种的组合:
超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素;
所述操作元素的操作事件包括以下一种或者多种的组合:
所述超链接元素对应的操作事件包括点击事件;及/或
所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或
所述按钮元素对应的操作事件包括点击事件;及/或
所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或
所述单选按钮元素对应的操作事件包括选中事件;及/或
所述多选框元素对应的操作事件包括选中事件。
根据本申请优选实施例,所述处理器13还执行多个指令包括:
获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或
获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或
获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或
获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或
当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或
获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。
根据本申请优选实施例,所述处理器13还执行多个指令包括:
获取所述报错信息对应的日志;
通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。
根据本申请优选实施例,所述处理器13还执行多个指令包括:
解析所述日志,得到错误点及错误点的类别;
根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
根据本申请优选实施例,所述处理器13还执行多个指令包括:
利用训练好的错误识别模型从所述日志中获取错误点。
根据本申请优选实施例,所述处理器13还执行多个指令包括:
在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;
所述训练所述错误识别模型包括:
配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。
具体地,所述处理器13对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可 以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种网页页面测试方法,其特征在于,所述方法包括:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。
- 如权利要求1所述的网页页面测试方法,其特征在于,所述操作元素包括以下一种或者多种的组合:超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素;所述操作元素的操作事件包括以下一种或者多种的组合:所述超链接元素对应的操作事件包括点击事件;及/或所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或所述按钮元素对应的操作事件包括点击事件;及/或所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或所述单选按钮元素对应的操作事件包括选中事件;及/或所述多选框元素对应的操作事件包括选中事件。
- 如权利要求1所述的网页页面测试方法,其特征在于,所述从所述获取的操作元素中选取待测操作元素包括以下一种或者多种的组合:获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。
- 如权利要求1所述的网页页面测试方法,其特征在于,所述方法还包 括:获取所述报错信息对应的日志;通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。
- 如权利要求4所述的网页页面测试方法,其特征在于,所述方法还包括:解析所述日志,得到错误点及错误点的类别;根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
- 如权利要求5所述的网页页面测试方法,其特征在于,所述解析所述日志,得到错误点包括:利用训练好的错误识别模型从所述日志中获取错误点。
- 如权利要求6所述的网页页面测试方法,其特征在于,所述方法还包括:在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;所述训练所述错误识别模型包括:配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。
- 一种网页页面测试装置,其特征在于,所述装置包括:启动单元,用于采用自动化测试工具启动浏览器,并启动待测网址;获取单元,用于获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;选取单元,用于从所述获取的操作元素中选取待测操作元素;发送单元,用于将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断单元,用于判断所述待测网址的页面是否有报错信息;输出单元,用于当所述待测网址的页面有报错信息时,输出所述报错信息。
- 一种电子设备,其特征在于,所述电子设备包括存储器及处理器,所述存储器用于存储至少一个计算机可读指令,所述处理器用于执行所述至少一个计算机可读指令以实现以下步骤:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。
- 如权利要求9所述的电子设备,其特征在于,所述操作元素包括以下一种或者多种的组合:超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素;所述操作元素的操作事件包括以下一种或者多种的组合:所述超链接元素对应的操作事件包括点击事件;及/或所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或所述按钮元素对应的操作事件包括点击事件;及/或所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或所述单选按钮元素对应的操作事件包括选中事件;及/或所述多选框元素对应的操作事件包括选中事件。
- 如权利要求9所述的电子设备,其特征在于,所述从所述获取的操作元素中选取待测操作元素包括以下一种或者多种的组合:获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。
- 如权利要求9所述的电子设备,其特征在于,所述处理器还用于执行所述至少一个计算机可读指令,以实现以下步骤:获取所述报错信息对应的日志;通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。
- 如权利要求9所述的电子设备,其特征在于,所述处理器还用于执行所述至少一个计算机可读指令,以实现以下步骤:解析所述日志,得到错误点及错误点的类别;根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
- 如权利要求9所述的电子设备,其特征在于,所述处理器还用于执行所述至少一个计算机可读指令,以实现以下步骤:在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;所述训练所述错误识别模型包括:配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。
- 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质中存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。
- 如权利要求15所述的存储介质,其特征在于,所述操作元素包括以下一种或者多种的组合:超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素;所述操作元素的操作事件包括以下一种或者多种的组合:所述超链接元素对应的操作事件包括点击事件;及/或所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或所述按钮元素对应的操作事件包括点击事件;及/或所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或所述单选按钮元素对应的操作事件包括选中事件;及/或所述多选框元素对应的操作事件包括选中事件。
- 如权利要求15所述的存储介质,其特征在于,所述从所述获取的操作元素中选取待测操作元素包括以下一种或者多种的组合:获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。
- 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时,还实现以下步骤:获取所述报错信息对应的日志;通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。
- 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时,还实现以下步骤:解析所述日志,得到错误点及错误点的类别;根据所述错误点的类别,将每类的错误点发送至对应的维护人员。
- 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时,还实现以下步骤:在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;所述训练所述错误识别模型包括:配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810316068.9A CN108628741B (zh) | 2018-04-10 | 2018-04-10 | 网页页面测试方法、装置、电子设备和介质 |
| CN201810316068.9 | 2018-04-10 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019196274A1 true WO2019196274A1 (zh) | 2019-10-17 |
Family
ID=63705027
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/099282 Ceased WO2019196274A1 (zh) | 2018-04-10 | 2018-08-08 | 网页页面测试方法、装置、电子设备和介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108628741B (zh) |
| WO (1) | WO2019196274A1 (zh) |
Cited By (25)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110888709A (zh) * | 2019-12-04 | 2020-03-17 | 中山市凯能集团有限公司 | 监控屏的智能操作方法、装置、计算机设备和存储介质 |
| CN111026648A (zh) * | 2019-11-21 | 2020-04-17 | 汉海信息技术(上海)有限公司 | 应用程序页面测试方法、装置、电子设备及存储介质 |
| CN111045934A (zh) * | 2019-11-29 | 2020-04-21 | 北京三快在线科技有限公司 | 页面分析方法、装置、客户端、存储介质及电子设备 |
| CN111104308A (zh) * | 2019-11-12 | 2020-05-05 | 贝壳技术有限公司 | 显示页面的测试方法和装置、存储介质、电子设备 |
| CN111159028A (zh) * | 2019-12-23 | 2020-05-15 | 望海康信(北京)科技股份公司 | 网页测试方法及装置 |
| CN111488539A (zh) * | 2020-04-08 | 2020-08-04 | 中国银行股份有限公司 | 页面调整方法及装置 |
| CN112231214A (zh) * | 2020-10-16 | 2021-01-15 | 百度国际科技(深圳)有限公司 | 页面测试方法、装置、电子设备和介质 |
| CN112256984A (zh) * | 2020-10-22 | 2021-01-22 | 上海悦易网络信息技术有限公司 | 一种网页对应的接口托底截图的获取方法及设备 |
| CN112649717A (zh) * | 2020-09-15 | 2021-04-13 | 广州市几米物联科技有限公司 | 一种测试方法、装置、终端设备及存储介质 |
| CN112671615A (zh) * | 2020-12-29 | 2021-04-16 | 中国平安财产保险股份有限公司 | 前端用户操作行为数据的收集方法、系统及存储介质 |
| CN113220596A (zh) * | 2021-06-17 | 2021-08-06 | 中国农业银行股份有限公司 | 应用的测试方法、装置、设备、存储介质及程序产品 |
| CN113238958A (zh) * | 2021-06-01 | 2021-08-10 | 广东好太太智能家居有限公司 | 一种大数据可视化平台的自动测试方法及装置、电子设备 |
| CN113360366A (zh) * | 2020-03-05 | 2021-09-07 | 北京金山云网络技术有限公司 | Web页面测试方法、测试装置、电子设备及存储介质 |
| CN113760721A (zh) * | 2021-01-13 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 一种页面测试方法和装置 |
| CN113791968A (zh) * | 2021-08-10 | 2021-12-14 | 武汉光庭信息技术股份有限公司 | 一种ui自动化测试方法、系统、电子设备及存储介质 |
| CN113849416A (zh) * | 2021-10-29 | 2021-12-28 | 北京字节跳动网络技术有限公司 | 测试方法、装置、存储介质及电子设备 |
| CN113868125A (zh) * | 2021-09-17 | 2021-12-31 | 招银云创信息技术有限公司 | 组件测试方法、装置、计算机设备和存储介质 |
| CN114077537A (zh) * | 2020-08-14 | 2022-02-22 | 福建天泉教育科技有限公司 | 一种ui自动化测试框架的优化方法及其系统 |
| CN114372001A (zh) * | 2022-01-07 | 2022-04-19 | 上海银行股份有限公司 | 一种个人网上银行WebUI自动化测试系统 |
| CN114968687A (zh) * | 2022-06-09 | 2022-08-30 | 腾讯科技(深圳)有限公司 | 遍历测试方法、装置、电子设备、程序产品以及存储介质 |
| CN115277396A (zh) * | 2022-08-04 | 2022-11-01 | 北京智慧星光信息技术有限公司 | 一种用于模拟浏览器操作的消息驱动方法和系统 |
| CN115292187A (zh) * | 2022-08-18 | 2022-11-04 | 中国工商银行股份有限公司 | 无编码的页面自动测试方法、装置、电子设备和介质 |
| CN115774675A (zh) * | 2022-12-06 | 2023-03-10 | 斑马网络技术有限公司 | 页面测试方法、装置、服务器及存储介质 |
| CN117370203A (zh) * | 2023-10-27 | 2024-01-09 | 华润数字科技有限公司 | 自动化测试方法、系统、电子设备及存储介质 |
| CN118643812A (zh) * | 2024-07-30 | 2024-09-13 | 金财数科(北京)信息技术有限公司 | 一种报表自动填报方法及系统 |
Families Citing this family (27)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109542763A (zh) * | 2018-10-16 | 2019-03-29 | 深圳壹账通智能科技有限公司 | 页面监测方法、装置、计算机设备和存储介质 |
| CN109783168B (zh) * | 2018-12-13 | 2023-07-18 | 平安科技(深圳)有限公司 | 个性化选择用户界面元素的方法、装置、介质、电子设备 |
| CN109828900A (zh) * | 2018-12-14 | 2019-05-31 | 深圳壹账通智能科技有限公司 | 测试脚本自动生成方法、装置、电子设备及存储介质 |
| CN109710528B (zh) * | 2018-12-25 | 2022-03-01 | 中国人民财产保险股份有限公司 | 一种测试脚本生成方法、装置、设备和介质 |
| CN111694725A (zh) * | 2019-03-15 | 2020-09-22 | 北京奇虎科技有限公司 | 一种web页面的稳定性测试方法及装置 |
| CN111831536B (zh) * | 2019-04-17 | 2025-05-27 | 北京京东尚科信息技术有限公司 | 一种自动化测试方法和装置 |
| CN111949510B (zh) * | 2019-05-17 | 2024-05-14 | 百度在线网络技术(北京)有限公司 | 测试处理方法、装置、电子设备及可读存储介质 |
| CN110287108A (zh) * | 2019-05-31 | 2019-09-27 | 北京随信云链科技有限公司 | 一种页面测试方法、计算设备和存储介质 |
| CN112152823B (zh) * | 2019-06-26 | 2022-09-02 | 北京易真学思教育科技有限公司 | 网站运行错误监控方法、装置及计算机存储介质 |
| CN112347244B (zh) * | 2019-08-08 | 2023-07-25 | 四川大学 | 基于混合特征分析的涉黄、涉赌网站检测方法 |
| CN112579948B (zh) * | 2019-09-29 | 2024-06-21 | 北京国双科技有限公司 | 网页截图方法、装置及存储介质、电子设备 |
| CN111061526B (zh) * | 2019-10-12 | 2023-12-01 | 天航长鹰(江苏)科技有限公司 | 自动化测试方法、装置、计算机设备及存储介质 |
| CN110781089B (zh) * | 2019-10-31 | 2022-08-19 | 睿云联(厦门)网络通讯技术有限公司 | 一种设备ui自动化测试方法、装置、电子设备和介质 |
| CN111258904A (zh) * | 2020-01-16 | 2020-06-09 | 恩亿科(北京)数据科技有限公司 | 一种网页元素测试方法和相关装置 |
| CN111983429B (zh) * | 2020-08-19 | 2023-07-18 | Oppo广东移动通信有限公司 | 芯片验证系统、芯片验证方法、终端及存储介质 |
| CN113722634B (zh) * | 2020-11-17 | 2025-10-21 | 北京沃东天骏信息技术有限公司 | 数据处理方法、装置、电子设备和计算机可读介质 |
| CN112395125A (zh) * | 2020-11-18 | 2021-02-23 | 平安普惠企业管理有限公司 | 页面报错的通知方法、装置、计算机设备及存储介质 |
| CN112631704A (zh) * | 2020-12-26 | 2021-04-09 | 深圳集智数字科技有限公司 | 一种界面元素识别方法、装置、存储介质及电子设备 |
| CN112685253B (zh) * | 2020-12-29 | 2024-09-27 | 深圳神拳互动科技有限公司 | 前端报错日志采集方法、装置、设备及存储介质 |
| CN113342637A (zh) * | 2021-05-08 | 2021-09-03 | 深圳奥哲网络科技有限公司 | 基于元数据的应用测试方法、系统、设备及存储介质 |
| CN113254018B (zh) * | 2021-07-14 | 2021-11-02 | 广州易方信息科技股份有限公司 | 网页视图的自动化操作方法及装置 |
| CN113656319A (zh) * | 2021-08-25 | 2021-11-16 | 广东三维家信息科技有限公司 | 一种回归测试方法、装置、电子设备及存储介质 |
| CN115033486B (zh) * | 2022-06-17 | 2026-04-10 | 中国平安财产保险股份有限公司 | 测试案例报错的处理方法及其相关设备 |
| CN115426277A (zh) * | 2022-08-30 | 2022-12-02 | 杭州安恒信息技术股份有限公司 | 一种质量安全检测方法、装置、设备及可读存储介质 |
| CN115202762B (zh) * | 2022-09-13 | 2023-03-10 | 北京达佳互联信息技术有限公司 | 应用程序控制方法、装置、电子设备及存储介质 |
| CN115904934A (zh) * | 2022-09-22 | 2023-04-04 | 超聚变数字技术有限公司 | 一种网页测试方法及相关装置 |
| CN116680495A (zh) * | 2023-05-26 | 2023-09-01 | 太平金融科技服务(上海)有限公司深圳分公司 | 一种页面转换方法、装置、电子设备及储存介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102521121A (zh) * | 2011-11-18 | 2012-06-27 | 华为技术有限公司 | 一种页面测试方法和页面测试装置 |
| US20140351796A1 (en) * | 2013-05-24 | 2014-11-27 | Microsoft Corporation | Accessibility compliance testing using code injection |
| CN105843734A (zh) * | 2016-03-18 | 2016-08-10 | 厦门美图移动科技有限公司 | 一种自动化测试方法、装置及计算设备 |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102768641B (zh) * | 2012-06-15 | 2015-06-17 | 深圳中兴网信科技有限公司 | 网页测试要素选择装置和网页测试要素选择方法 |
| CN104461855B (zh) * | 2013-09-22 | 2019-03-26 | 腾讯科技(北京)有限公司 | 一种Web自动化测试方法、系统及装置 |
| CN103678120B (zh) * | 2013-11-12 | 2016-07-06 | 北京京东尚科信息技术有限公司 | 基于建模的web应用自动化测试方法 |
| US9336126B1 (en) * | 2014-06-24 | 2016-05-10 | Amazon Technologies, Inc. | Client-side event logging for heterogeneous client environments |
| CN105653444B (zh) * | 2015-12-23 | 2018-07-13 | 北京大学 | 基于互联网日志数据的软件缺陷故障识别方法和系统 |
| CN105677615B (zh) * | 2016-01-04 | 2018-11-23 | 北京邮电大学 | 一种基于weka接口的分布式机器学习方法 |
| CN107203464B (zh) * | 2016-03-17 | 2020-09-08 | 阿里巴巴集团控股有限公司 | 业务问题的定位方法以及装置 |
| CN106126413B (zh) * | 2016-06-16 | 2019-02-19 | 南通大学 | 基于类不平衡学习和遗传算法的包裹式特征选择的软件缺陷预测方法 |
| CN107665165A (zh) * | 2016-07-27 | 2018-02-06 | 中兴通讯股份有限公司 | 背景噪声生成方法和装置、压力测试方法和装置 |
-
2018
- 2018-04-10 CN CN201810316068.9A patent/CN108628741B/zh active Active
- 2018-08-08 WO PCT/CN2018/099282 patent/WO2019196274A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102521121A (zh) * | 2011-11-18 | 2012-06-27 | 华为技术有限公司 | 一种页面测试方法和页面测试装置 |
| US20140351796A1 (en) * | 2013-05-24 | 2014-11-27 | Microsoft Corporation | Accessibility compliance testing using code injection |
| CN105843734A (zh) * | 2016-03-18 | 2016-08-10 | 厦门美图移动科技有限公司 | 一种自动化测试方法、装置及计算设备 |
Non-Patent Citations (1)
| Title |
|---|
| LI MEIYI: "Use of Selenium", SOFTWARE TESTING, 31 May 2016 (2016-05-31), pages 129 - 131 * |
Cited By (31)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111104308A (zh) * | 2019-11-12 | 2020-05-05 | 贝壳技术有限公司 | 显示页面的测试方法和装置、存储介质、电子设备 |
| CN111026648A (zh) * | 2019-11-21 | 2020-04-17 | 汉海信息技术(上海)有限公司 | 应用程序页面测试方法、装置、电子设备及存储介质 |
| CN111045934A (zh) * | 2019-11-29 | 2020-04-21 | 北京三快在线科技有限公司 | 页面分析方法、装置、客户端、存储介质及电子设备 |
| CN110888709A (zh) * | 2019-12-04 | 2020-03-17 | 中山市凯能集团有限公司 | 监控屏的智能操作方法、装置、计算机设备和存储介质 |
| CN111159028A (zh) * | 2019-12-23 | 2020-05-15 | 望海康信(北京)科技股份公司 | 网页测试方法及装置 |
| CN113360366A (zh) * | 2020-03-05 | 2021-09-07 | 北京金山云网络技术有限公司 | Web页面测试方法、测试装置、电子设备及存储介质 |
| CN111488539A (zh) * | 2020-04-08 | 2020-08-04 | 中国银行股份有限公司 | 页面调整方法及装置 |
| CN111488539B (zh) * | 2020-04-08 | 2023-04-21 | 中国银行股份有限公司 | 页面调整方法及装置 |
| CN114077537A (zh) * | 2020-08-14 | 2022-02-22 | 福建天泉教育科技有限公司 | 一种ui自动化测试框架的优化方法及其系统 |
| CN112649717A (zh) * | 2020-09-15 | 2021-04-13 | 广州市几米物联科技有限公司 | 一种测试方法、装置、终端设备及存储介质 |
| CN112231214A (zh) * | 2020-10-16 | 2021-01-15 | 百度国际科技(深圳)有限公司 | 页面测试方法、装置、电子设备和介质 |
| CN112231214B (zh) * | 2020-10-16 | 2023-09-26 | 百度国际科技(深圳)有限公司 | 页面测试方法、装置、电子设备和介质 |
| CN112256984A (zh) * | 2020-10-22 | 2021-01-22 | 上海悦易网络信息技术有限公司 | 一种网页对应的接口托底截图的获取方法及设备 |
| CN112256984B (zh) * | 2020-10-22 | 2022-09-30 | 上海万物新生环保科技集团有限公司 | 一种网页对应的接口托底截图的获取方法及设备 |
| CN112671615A (zh) * | 2020-12-29 | 2021-04-16 | 中国平安财产保险股份有限公司 | 前端用户操作行为数据的收集方法、系统及存储介质 |
| CN112671615B (zh) * | 2020-12-29 | 2023-07-07 | 中国平安财产保险股份有限公司 | 前端用户操作行为数据的收集方法、系统及存储介质 |
| CN113760721A (zh) * | 2021-01-13 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 一种页面测试方法和装置 |
| CN113238958A (zh) * | 2021-06-01 | 2021-08-10 | 广东好太太智能家居有限公司 | 一种大数据可视化平台的自动测试方法及装置、电子设备 |
| CN113220596A (zh) * | 2021-06-17 | 2021-08-06 | 中国农业银行股份有限公司 | 应用的测试方法、装置、设备、存储介质及程序产品 |
| CN113220596B (zh) * | 2021-06-17 | 2024-04-30 | 中国农业银行股份有限公司 | 应用的测试方法、装置、设备、存储介质及程序产品 |
| CN113791968A (zh) * | 2021-08-10 | 2021-12-14 | 武汉光庭信息技术股份有限公司 | 一种ui自动化测试方法、系统、电子设备及存储介质 |
| CN113868125A (zh) * | 2021-09-17 | 2021-12-31 | 招银云创信息技术有限公司 | 组件测试方法、装置、计算机设备和存储介质 |
| CN113849416A (zh) * | 2021-10-29 | 2021-12-28 | 北京字节跳动网络技术有限公司 | 测试方法、装置、存储介质及电子设备 |
| CN114372001A (zh) * | 2022-01-07 | 2022-04-19 | 上海银行股份有限公司 | 一种个人网上银行WebUI自动化测试系统 |
| CN114968687A (zh) * | 2022-06-09 | 2022-08-30 | 腾讯科技(深圳)有限公司 | 遍历测试方法、装置、电子设备、程序产品以及存储介质 |
| CN115277396A (zh) * | 2022-08-04 | 2022-11-01 | 北京智慧星光信息技术有限公司 | 一种用于模拟浏览器操作的消息驱动方法和系统 |
| CN115277396B (zh) * | 2022-08-04 | 2024-03-26 | 北京智慧星光信息技术有限公司 | 一种用于模拟浏览器操作的消息驱动方法和系统 |
| CN115292187A (zh) * | 2022-08-18 | 2022-11-04 | 中国工商银行股份有限公司 | 无编码的页面自动测试方法、装置、电子设备和介质 |
| CN115774675A (zh) * | 2022-12-06 | 2023-03-10 | 斑马网络技术有限公司 | 页面测试方法、装置、服务器及存储介质 |
| CN117370203A (zh) * | 2023-10-27 | 2024-01-09 | 华润数字科技有限公司 | 自动化测试方法、系统、电子设备及存储介质 |
| CN118643812A (zh) * | 2024-07-30 | 2024-09-13 | 金财数科(北京)信息技术有限公司 | 一种报表自动填报方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108628741A (zh) | 2018-10-09 |
| CN108628741B (zh) | 2021-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019196274A1 (zh) | 网页页面测试方法、装置、电子设备和介质 | |
| US10387292B2 (en) | Determining application test results using screenshot metadata | |
| JP5821678B2 (ja) | ウェブ・アプリケーションのブラウザに依存しない自動互換性チェックのためのウェブ・サービス | |
| CN107193743B (zh) | 一种应用测评方法、装置、计算机设备及存储介质 | |
| CN108830383B (zh) | 用于展示机器学习建模过程的方法及系统 | |
| JP2022039973A (ja) | 品質を管理するための方法及び装置、電子機器、記憶媒体、並びに、コンピュータプログラム | |
| WO2021109928A1 (zh) | 机器学习方案模板的创建方法、使用方法及装置 | |
| US20150106723A1 (en) | Tools for locating, curating, editing, and using content of an online library | |
| EP3381158B1 (en) | Machine learning based identification of broken network connections | |
| CN108959068A (zh) | 软件界面测试方法、设备及存储介质 | |
| US20180131779A1 (en) | Recording And Triggering Web And Native Mobile Application Events With Mapped Data Fields | |
| US20240256429A1 (en) | Techniques for automatically triaging and describing issues detected during use of a software application | |
| CN108898229B (zh) | 用于构建机器学习建模过程的方法及系统 | |
| JP2022019524A (ja) | モデリングパラメータの設定方法、装置、デバイス、コンピュータ記憶媒体、及びコンピュータプログラム | |
| CN106815142A (zh) | 一种软件测试方法和系统 | |
| CN104601672A (zh) | 基于不同应用客户端的分享网络资源的方法和装置 | |
| US11360973B2 (en) | Generating multilingual queries | |
| JP2014532942A (ja) | ソーシャルページのトリガー | |
| US9104573B1 (en) | Providing relevant diagnostic information using ontology rules | |
| CN112965711B (zh) | 作业测试方法和装置、电子设备和存储介质 | |
| CN106569949A (zh) | 用于执行测试用例的方法和装置 | |
| CN113609370A (zh) | 数据处理方法、装置、电子设备及存储介质 | |
| CN112906387A (zh) | 风险内容识别方法、装置、设备、介质和计算机程序产品 | |
| US20170161610A1 (en) | Operation of a computer based on optimal problem solutions | |
| CN119166526A (zh) | 基于智能体的测试方法、装置、电子设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18914705 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.01.2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18914705 Country of ref document: EP Kind code of ref document: A1 |