WO2019196274A1 - Web page testing method and apparatus, electronic device, and medium - Google Patents

Web page testing method and apparatus, electronic device, and medium Download PDF

Info

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
Application number
PCT/CN2018/099282
Other languages
French (fr)
Chinese (zh)
Inventor
彭明强
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019196274A1 publication Critical patent/WO2019196274A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test 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

Provided are a web page testing method and apparatus, an electronic device, and a medium. The web page testing method comprises: using an automatic testing tool to start a browser and start a website to be tested; acquiring operation elements on a page of the website to be tested, and operation events of the operation elements; selecting an operation element to be tested from the acquired operation elements; sending the operation element to be tested and an operation event of the operation element to be tested to the page of the website to be tested for testing, and thus carrying out targeted robustness testing on a web page to determine whether the page of the website to be tested contains error information; and when the page of the website to be tested contains error information, outputting the error information. Since the above-mentioned testing scheme is pertinent, the other functions of a system to be tested cannot be affected, thus ensuring the stability of the system to be tested and the integrity of the functions of the system to be tested.

Description

网页页面测试方法、装置、电子设备和介质Web page test method, device, electronic device and medium
本申请要求于2018年04月10日提交中国专利局,申请号为201810316068.9发明名称为“网页页面测试方法、装置、电子设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201101316068.9, entitled "Web Page Test Method, Apparatus, Electronic Device, and Medium", which is incorporated by reference in its entirety. In this application.
技术领域Technical field
本申请涉及测试技术领域,尤其涉及一种网页页面测试方法、装置、电子设备和介质。The present application relates to the field of testing technologies, and in particular, to a webpage page testing method, apparatus, electronic device, and medium.
背景技术Background technique
现有技术方案中,针对待测试网页健壮性及稳定性的测试,通常集中在接口API(Application Programming Interface,应用程序编程接口)层,对于UI(User Interface,用户界面)层仅关注功能的完整性,而很少直接对UI层进行有针对性的健壮性测试。In the prior art solution, 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.
发明内容Summary of the invention
鉴于以上内容,有必要提供一种网页页面测试方法、装置、电子设备和介质,能对网页进行有针对性的健壮性测试,同时保证了待测试系统的稳定性及待测试系统功能的完整性。In view of the above, it is necessary to provide a web page test method, device, electronic device and medium, which can perform targeted robustness test on the webpage, and ensure the stability of the system to be tested and the integrity of the function of the system to be tested. .
一种网页页面测试方法,所述方法包括:A webpage page testing method, the method comprising:
采用自动化测试工具启动浏览器,并启动待测网址;Launch the browser with an automated test tool and launch the URL to be tested;
获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;Obtaining 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 acquired operation elements;
将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;And 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;
判断所述待测网址的页面是否有报错信息;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, the error information is output.
一种网页页面测试装置,所述装置包括:A webpage page testing device, the 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;
输出单元,用于当所述待测网址的页面有报错信息时,输出所述报错信息。And an output unit, configured to output the error information when the page of the website to be tested has error information.
一种电子设备,所述电子设备包括:An electronic device, the electronic device comprising:
存储器,存储至少一个指令;及a memory storing at least one instruction; and
处理器,执行所述存储器中存储的指令以实现所述网页页面测试方法。And executing, by the processor, instructions stored in the memory to implement the webpage page testing method.
一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现所述网页页面测试方法。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.
由以上技术方案可以看出,本申请采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。It can be seen from the above technical solution that 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.
附图说明DRAWINGS
图1是本申请网页页面测试方法的较佳实施例的流程图。1 is a flow chart of a preferred embodiment of a method for testing a web page of the present application.
图2是本申请网页页面测试装置的较佳实施例的功能模块图。2 is a functional block diagram of a preferred embodiment of the web page page testing device of the present application.
图3是本申请实现网页页面测试方法的较佳实施例的电子设备的结构示意图。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.
具体实施方式detailed description
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本申请进行详细描述。In order to make the objects, technical solutions, and advantages of the present application more clear, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments.
如图1所示,是本申请网页页面测试方法的较佳实施例的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。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.
所述网页页面测试方法应用于一个或者多个电子设备中,所述电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。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.
所述电子设备可以是任何一种可与用户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。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.
所述电子设备还可以包括网络设备和/或用户设备。其中,所述网络设备包括,但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(Cloud Computing)的由大量主机或网络服务器构成的云。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.
所述电子设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。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.
S10,所述电子设备采用自动化测试工具启动浏览器,并启动待测网址。S10. The electronic device starts the browser by using an automated testing tool, and starts the website to be tested.
具体地,计算机软件自动化测试技术Selenium WebDriver具有较强的可视化自动交互功能,通过编程来模拟人与网页的交互,从而触发动态数据加载,获取动态生成的数据。即Selenium WebDriver技术能够真实的模拟用户在网页上执行的操作,例如点击“查看更多”、“自动登录”、“点击链接”、“填写表单”、“滚动鼠标”、“鼠标拖拽”、“页面加载完成后向下滚动”、“点击翻页”、“截图保存”等功能时,实时地使用Ajax技术向服务器请求更多的数据,再使用JavaScript脚本动态生成内容并加载显示出来。Specifically, 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.
在本实施例中,用户调用Selenium后,通过Selenium工具打开浏览器,在浏览器中输入待测数据的网站的链接(URL),Selenium Web页面工具调用WebDriver的get()方法打开用户输入的待测数据的网站的Web页面。In this embodiment, after the user calls Selenium, 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 web page of the website that measures the data.
例如:所述电子设备通过程序语言driver.get("http://www.XX")可以打开XX网址对应的网页页面,通过程序语言elem.clear()可以清除输入框数据,通过程序语言elem.send_keys(Keys.RETURN)可以模拟点击回车按钮,通过程序语言driver.close()可以关闭浏览器驱动等。For example, 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通过原生浏览器支持或者浏览器扩展直接控制浏览器。并且WebDriver是针对各个浏览器而开发,与浏览器的紧密集成可以支持创建更高级的测试,避免了JavaScript安全模型导致的限制。In this embodiment, 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.
S11,所述电子设备获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件。S11. The electronic device acquires an operation element on a page of the website to be tested and an operation event of the operation element.
在本实施例中,所述操作元素包括,但不限于以下一种或者多种的组合:In this embodiment, 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.
进一步地,对应于所述操作元素,所述操作元素的操作事件包括,但不限于以下一种或者多种的组合:Further, corresponding to the operation element, the operation event of the operation element includes, but is not limited to, one or a combination of the following:
(1)所述超链接元素对应的操作事件包括点击事件。(1) The operation event corresponding to the hyperlink element includes a click event.
例如:当所述电子设备获取到待测网址的页面上的操作元素为超链接元素后,所述电子设备获取所述超链接元素对应的操作事件为点击事件,也就是说,当所述电子设备获取到用户点击所述超链接元素的信号时,所述电子设备执行所述超链接对应的任务,从而链接到其他网页,或者是链接到所述待测网址的页面上的指定位置。For example, after the electronic device acquires the operation element on the page of the website to be tested as a hyperlink element, 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.
(2)所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件。(2) The operation events corresponding to the input box element include inputting a random text event, and clearing the text event.
例如:当所述电子设备获取到待测网址的页面上的操作元素为输入框元素后,所述电子设备获取到所述输入框元素对应的操作事件为输入随机文本事件或者清空文本事件,则所述电子设备可以在所述输入框元素中输入文本,或者是清空文本。For example, after the electronic device acquires an operation element on the page of the website to be tested as an input box element, 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.
(3)所述按钮元素对应的操作事件包括点击事件。(3) The operation event corresponding to the button element includes a click event.
例如:当所述电子设备获取到待测网址的页面上的操作元素为按钮元素后,所述电子设备获取到所述按钮元素对应的操作事件为点击事件,也就是 说,当所述电子设备获取到用户点击所述按钮元素的信号时,所述电子设备执行所述按钮元素对应的任务,例如:开始运行、暂停运行、停止运行等等。For example, when the operation element on the page of the web site to be tested is the button element, 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.
(4)所述下拉选择框元素对应的操作事件包括选中某一选项事件。(4) The operation event corresponding to the pull-down selection box element includes selecting an option event.
例如:当所述电子设备获取到待测网址的页面上的操作元素为下拉选择框元素(如:所述下拉选择框元素包括选项A、选项B及选项C)后,所述电子设备获取到所述下拉选择框元素对应的操作事件为选中某一选项事件,也就是说,当所述电子设备获取到用户选中所述下拉选择框元素中的选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所述待测网址的页面上。For example, when the operation element on the page of the electronic device acquiring the website to be tested is a drop-down selection box element (eg, the pull-down selection box element includes option A, option B, and option C), 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.
(5)所述单选按钮元素对应的操作事件包括选中事件。(5) The operation event corresponding to the radio button element includes a selected event.
例如:当所述电子设备获取到待测网址的页面上的操作元素为单选按钮元素(如:所述单选按钮元素包括选项A、选项B及选项C)后,所述电子设备获取到所述单选按钮元素对应的操作事件为选中事件,也就是说,当所述电子设备获取到用户选中所述单选按钮元素中的所述选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所述待测网址的页面上。For example, when the operation element on the page of the electronic device acquiring the website to be tested is 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.
(6)所述多选框元素对应的操作事件包括选中事件。(6) The operation event corresponding to the multi-selection box element includes a selected event.
例如:当所述电子设备获取到待测网址的页面上的操作元素为多选框元素(如:所述多选框元素包括选项A、选项B及选项C)后,所述电子设备获取到所述多选框元素对应的操作事件为选中事件,也就是说,当所述电子设备获取到用户选中所述多选框元素中的所述选项A及所述选项B后,所述电子设备将所述选项A及所述选项B作为所述用户的选择显示在所述待测网址的页面上。For example, when the operation element on the page that the electronic device acquires the website to be tested is a multi-selection box element (eg, the multi-selection box element includes option A, option B, and option C), 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.
当然,在其他实施例中,所述操作元素以及所述操作元素的操作事件也可以有其他形式,本申请不作限制。Of course, in other embodiments, the operation elements and the operation events of the operation elements may have other forms, which are not limited in the application.
S12,所述电子设备从所述获取的操作元素中选取待测操作元素。S12. The electronic device selects an operation element to be tested from the acquired operation elements.
优选地,所述电子设备从所述获取的操作元素中选取待测操作元素包括,但不限于以下一种或者多种的组合:Preferably, 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:
(1)所述电子设备获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素。(1) 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.
例如:所述电子设备获取所述获取的操作元素的使用次数后,所述电子设备即可将使用次数大于或者等于预设次数200次的操作元素确定为所述待测操作元素。For example, after the electronic device acquires the used number of times of the acquired operation element, 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.
具体地,所述预设次数可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset number of times may be customized by the user according to actual conditions, which is not limited in this application.
(2)所述电子设备获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。(2) 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.
例如:所述电子设备获取所述获取的操作元素的使用次数,并将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,所述电子设备将排在前预设位数前20位的操作元素确定为所述待测操作元素。For example, 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.
具体地,所述预设位数可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset number of bits can be customized by the user according to actual conditions, which is not limited in this application.
(3)所述电子设备获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素。(3) 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.
例如:所述电子设备获取所述获取的操作元素的错误率后,所述电子设备将错误率大于或者等于预设错误率75%的操作元素确定为所述待测操作元素。For example, after the electronic device acquires the error rate of the acquired operation element, 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.
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
(4)所述电子设备获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。(4) 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.
例如:所述电子设备获取所述获取的操作元素的错误率,并将所述获取的操作元素的错误率按照由高到低的顺序进行排序,所述电子设备将排在前预设位数前20位的操作元素确定为所述待测操作元素。For example, 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.
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
(5)当获取到选取的待测操作元素后,所述电子设备获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素。(5) 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.
例如:当获取到选取的待测操作元素X后,所述电子设备获取所述待测操作元素X的关联操作元素为Y及Z,所述电子设备同时将所述Y及Z确定为所述待测操作元素。For example, 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.
(6)所述电子设备获取当前测试模块,所述当前测试模块对应一类用户群体,所述电子设备从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素。(6) 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.
具体地,所述待测网址上有多个模块,每个模块对应不同的用户群体,例如一个金融类网址中,有个人使用的个人用户模块、企业使用的企业用户模块。在测试的时候,可以只测试一个模块。Specifically, the website to be tested has a plurality of modules, and each module corresponds to a different user group. For example, in 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.
例如:如果所述电子设备获取到当前测试模块为W,再从所述获取的操作元素中获取所述W对应的操作元素,所述电子设备将所述对应的操作元素确定为所述待测操作元素。For example, if the electronic device acquires the current test module as W, and obtains the operation element corresponding to the W from the acquired operation element, the electronic device determines the corresponding operation element as the to-be-tested Operational element.
可以理解的是,由于一个页面上可以包括大量的操作元素,但是有些操作元素是用户几乎不会用到的,因此,通过上述(1)-(2)的方式可以筛选出使用频率较高的操作元素作为所述待测操作元素;又由于有些操作元素是出错率很低或者是不出错的,因此,通过上述(3)-(4)的方式可以筛选出错误率较高的操作元素作为所述待测操作元素;又由于有些操作元素间是相互关联的,当执行完一个操作元素的操作事件后,将继续执行关联的操作元素的操作事件,因此,通过上述(5)的方式可以直接将关联的操作事件确定为所述待测操作元素,避免复杂的筛选过程;又由于一个测试模块中只需对 应测试一个页面上的部分操作元素,因此,通过上述(6)的方式可以直接调取当前测试模块对应的操作事件作为所述待测操作元素。It can be understood that since a page can include a large number of operation elements, some operation elements are hardly used by the user, and therefore, 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.
这样,既可以避免由于多余的测试工作影响测试的效率,又可以节约测试的成本。In this way, it is possible to avoid the efficiency of the test due to redundant test work, and the cost of the test can be saved.
S13,所述电子设备将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试。S13. 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.
通过上述实施方式,所述电子设备根据所述待测操作元素及所述待测操作元素的操作事件,即可对所述待测网址的页面进行测试,测试方法不作限制。According to the foregoing embodiment, 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.
例如:所述电子设备可以将选取的待测操作元素超链接元素,及所述超链接元素对应的操作事件点击事件发送至所述待测网址的页面进行测试。For example, 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.
S14,所述电子设备判断所述待测网址的页面是否有报错信息。S14. The electronic device determines whether the page of the website to be tested has error information.
在本实施例中,当所述待测网址的页面有错误时,所述电子设备将发出报错信息。In this embodiment, when the page of the website to be tested has an error, the electronic device will issue an error message.
例如:当对所述超链接元素进行点击操作时,如果没有链接到其他网页,或者是链接到所述待测网址的页面上的指定位置,则说明在所述待测网址的页面中,所述超链接元素位置出现错误,所述电子设备将发出报错信息。For example, when a click operation is performed on the hyperlink element, if there is no link to another webpage, or a specified location on the page linked to the website to be tested, it means that in the page of the website to be tested, If there is an error in the location of the hyperlink element, the electronic device will issue an error message.
具体地,所述报错信息可能以提示框的形式显示在所述页面上,也可能以预设标记显示在所述页面上,本申请不作限制。Specifically, 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.
S15,当所述待测网址的页面有报错信息时,所述电子设备输出所述报错信息。S15. When the page of the website to be tested has error information, the electronic device outputs the error information.
优选地,当所述待测网址的页面有报错信息时,所述方法还包括:Preferably, when the page of the website to be tested has error information, 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.
具体地,Selenium工具的驱动程序指示浏览器执行命令,最后由浏览器在内核中进行截图保存操作,最终的效果与用户使用鼠标在页面上截取图片并保存的效果完全相同。Specifically, 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.
进一步地,所述电子设备将所述日志截图保存至指定位置(如指定文件夹)后,还可以根据所述日志截图的内容或者时间等信息为所述日志截图命名,方便后续对所述日志截图进行查询。Further, after saving the log screenshot to a specified location (such as a specified folder), 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.
优选地,所述电子设备解析所述日志,得到错误点及错误点的类别,并根据所述错误点的类别,将每类的错误点发送至对应的维护人员。Preferably, 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.
优选地,所述电子设备解析所述日志,得到错误点包括:Preferably, 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.
在本实施例中,所述电子设备训练所述错误识别模型包括:In this embodiment, the electronic device training the error recognition model includes:
所述电子设备配置所述不同错误类别的错误点训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里。例如,第一类别的训练样本数据的分发到第一文件夹里;第二类别的训练样本数据分发到第二文件夹里;第三类别的训练样本数据分发到第三文件夹里;第四类别的训练样本数据分发 到第四文件夹里。所述电子设备从不同文件夹下各提取第一预设比例,例如,70%的训练样本数据作为训练数据进行所述错误识别模型的训练,所述电子设备从不同文件夹下各取剩下的第二预设比例,例如,30%的训练样本数据作为测试数据以对生成的所述错误识别模型进行准确性验证。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.
若生成的所述错误识别模型准确率小于预设准确率,例如,99%,则所述电子设备增加所述不同类别的训练样本数据的获取数量,重复上述所述错误识别模型的生成过程,直到生成的所述错误识别模型准确率大于等于预设准确率,例如,99%。If the accuracy of the generated error recognition model is less than a preset accuracy, for example, 99%, 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%.
通过上述实施方式,可以将对应类别的错误信息发送给对应的维护人员,不仅更加有针对性,同时提高了维护效率,节约了由于匹配维护人员造成的时间损失。Through the foregoing implementation manner, 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.
例如:当确定错误类别为H时,所述电子设备获取H对应的维护人员I,所述电子设备将错误信息发送给所述维护人员I,以供所述维护人员I即时进行维护。For example, when it is determined that the error category is H, 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.
具体地,所述电子设备可以以短信或者邮件等方式将每类的错误信息发送至对应的维护人员,本申请不作限制。Specifically, 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.
综上所述,本申请能采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。In summary, 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.
如图2所示,是本申请网页页面测试装置的较佳实施例的功能模块图。所述网页页面测试装置11包括启动单元110、获取单元111、选取单元112、发送单元113、判断单元114、输出单元115、截图单元116、解析单元117及训练单元118。本申请所称的模块/单元是指一种能够被处理器13所执行,并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器12中。在本实施例中,关于各模块/单元的功能将在后续的实施例中详述。2 is a functional block diagram of a preferred embodiment of the web page test device of the present application. 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.
启动单元110采用自动化测试工具启动浏览器,并启动待测网址。The startup unit 110 starts the browser with an automated test tool and launches the URL to be tested.
具体地,计算机软件自动化测试技术Selenium WebDriver具有较强的可视化自动交互功能,通过编程来模拟人与网页的交互,从而触发动态数据加载,获取动态生成的数据。即Selenium WebDriver技术能够真实的模拟用户在网页上执行的操作,例如点击“查看更多”、“自动登录”、“点击链接”、“填写表单”、“滚动鼠标”、“鼠标拖拽”、“页面加载完成后向下滚动”、“点击翻页”、“截图保存”等功能时,实时地使用Ajax技术向服务器请求更多的数据,再使用JavaScript脚本动态生成内容并加载显示出来。Specifically, 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.
在本实施例中,用户调用Selenium后,通过Selenium工具打开浏览器, 在浏览器中输入待测数据的网站的链接(URL),Selenium Web页面工具调用WebDriver的get()方法打开用户输入的待测数据的网站的Web页面。In this embodiment, after the user calls Selenium, 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 web page of the website that measures the data.
例如:所述启动单元110通过程序语言driver.get("http://www.XX")可以打开XX网址对应的网页页面,通过程序语言elem.clear()可以清除输入框数据,通过程序语言elem.send_keys(Keys.RETURN)可以模拟点击回车按钮,通过程序语言driver.close()可以关闭浏览器驱动等。For example, 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通过原生浏览器支持或者浏览器扩展直接控制浏览器。并且WebDriver是针对各个浏览器而开发,与浏览器的紧密集成可以支持创建更高级的测试,避免了JavaScript安全模型导致的限制。In this embodiment, 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.
获取单元111获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件。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.
在本实施例中,所述操作元素包括,但不限于以下一种或者多种的组合:In this embodiment, 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.
进一步地,对应于所述操作元素,所述操作元素的操作事件包括,但不限于以下一种或者多种的组合:Further, corresponding to the operation element, the operation event of the operation element includes, but is not limited to, one or a combination of the following:
(1)所述超链接元素对应的操作事件包括点击事件。(1) The operation event corresponding to the hyperlink element includes a click event.
例如:当所述获取单元111获取到待测网址的页面上的操作元素为超链接元素后,所述获取单元111获取所述超链接元素对应的操作事件为点击事件,也就是说,当所述获取单元111获取到用户点击所述超链接元素的信号时,所述电子设备执行所述超链接对应的任务,从而链接到其他网页,或者是链接到所述待测网址的页面上的指定位置。For example, after the acquiring unit 111 acquires the operation element on the page of the website to be tested as a hyperlink element, 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.
(2)所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件。(2) The operation events corresponding to the input box element include inputting a random text event, and clearing the text event.
例如:当所述获取单元111获取到待测网址的页面上的操作元素为输入框元素后,所述获取单元111获取到所述输入框元素对应的操作事件为输入随机文本事件或者清空文本事件,则所述电子设备可以在所述输入框元素中输入文本,或者是清空文本。For example, after the acquiring unit 111 acquires an operation element on the page of the website to be tested as an input box element, 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. And the electronic device can input text in the input box element or clear the text.
(3)所述按钮元素对应的操作事件包括点击事件。(3) The operation event corresponding to the button element includes a click event.
例如:当所述获取单元111获取到待测网址的页面上的操作元素为按钮元素后,所述获取单元111获取到所述按钮元素对应的操作事件为点击事件,也就是说,当所述获取单元111获取到用户点击所述按钮元素的信号时,所述电子设备执行所述按钮元素对应的任务,例如:开始运行、暂停运行、停止运行等等。For example, after the acquiring unit 111 acquires the operation element on the page of the website to be tested as a button element, 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.
(4)所述下拉选择框元素对应的操作事件包括选中某一选项事件。(4) The operation event corresponding to the pull-down selection box element includes selecting an option event.
例如:当所述获取单元111获取到待测网址的页面上的操作元素为下拉选择框元素(如:所述下拉选择框元素包括选项A、选项B及选项C)后,所述获取单元111获取到所述下拉选择框元素对应的操作事件为选中某一选项事件,也就是说,当所述获取单元111获取到用户选中所述下拉选择框元素中的选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所 述待测网址的页面上。For example, after 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.
(5)所述单选按钮元素对应的操作事件包括选中事件。(5) The operation event corresponding to the radio button element includes a selected event.
例如:当所述获取单元111获取到待测网址的页面上的操作元素为单选按钮元素(如:所述单选按钮元素包括选项A、选项B及选项C)后,所述获取单元111获取到所述单选按钮元素对应的操作事件为选中事件,也就是说,当所述获取单元111获取到用户选中所述单选按钮元素中的所述选项A后,所述电子设备将所述选项A作为所述用户的选择显示在所述待测网址的页面上。For example, after 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.
(6)所述多选框元素对应的操作事件包括选中事件。(6) The operation event corresponding to the multi-selection box element includes a selected event.
例如:当所述获取单元111获取到待测网址的页面上的操作元素为多选框元素(如:所述多选框元素包括选项A、选项B及选项C)后,所述获取单元111获取到所述多选框元素对应的操作事件为选中事件,也就是说,当所述获取单元111获取到用户选中所述多选框元素中的所述选项A及所述选项B后,所述电子设备将所述选项A及所述选项B作为所述用户的选择显示在所述待测网址的页面上。For example, after 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.
当然,在其他实施例中,所述操作元素以及所述操作元素的操作事件也可以有其他形式,本申请不作限制。Of course, in other embodiments, the operation elements and the operation events of the operation elements may have other forms, which are not limited in the application.
选取单元112从所述获取的操作元素中选取待测操作元素。The selecting unit 112 selects an operation element to be tested from the acquired operation elements.
优选地,所述选取单元112从所述获取的操作元素中选取待测操作元素包括,但不限于以下一种或者多种的组合:Preferably, 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:
(1)所述选取单元112获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素。(1) 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.
例如:所述选取单元112获取所述获取的操作元素的使用次数后,所述选取单元112即可将使用次数大于或者等于预设次数200次的操作元素确定为所述待测操作元素。For example, after the selecting unit 112 acquires the used number of times of the acquired operation element, 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.
具体地,所述预设次数可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset number of times may be customized by the user according to actual conditions, which is not limited in this application.
(2)所述选取单元112获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。(2) 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.
例如:所述选取单元112获取所述获取的操作元素的使用次数,并将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,所述选取单元112将排在前预设位数前20位的操作元素确定为所述待测操作元素。For example, 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.
具体地,所述预设位数可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset number of bits can be customized by the user according to actual conditions, which is not limited in this application.
(3)所述选取单元112获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素。(3) 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.
例如:所述选取单元112获取所述获取的操作元素的错误率后,所述选取单元112将错误率大于或者等于预设错误率75%的操作元素确定为所述待测操作元素。For example, after the selecting unit 112 acquires the error rate of the acquired operation element, 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.
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
(4)所述选取单元112获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素。(4) 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.
例如:所述选取单元112获取所述获取的操作元素的错误率,并将所述获取的操作元素的错误率按照由高到低的顺序进行排序,所述选取单元112将排在前预设位数前20位的操作元素确定为所述待测操作元素。For example, 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.
具体地,所述预设错误率可以根据实际情况由用户进行自定义设置,本申请不作限制。Specifically, the preset error rate may be customized by the user according to actual conditions, which is not limited in this application.
(5)当获取到选取的待测操作元素后,所述选取单元112获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素。(5) 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.
例如:当获取到选取的待测操作元素X后,所述选取单元112获取所述待测操作元素X的关联操作元素为Y及Z,所述选取单元112同时将所述Y及Z确定为所述待测操作元素。For example, after the selected operation element X to be tested is acquired, 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.
(6)所述选取单元112获取当前测试模块,所述当前测试模块对应一类用户群体,所述选取单元112从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素。(6) 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.
具体地,所述待测网址上有多个模块,每个模块对应不同的用户群体,例如一个金融类网址中,有个人使用的个人用户模块、企业使用的企业用户模块。在测试的时候,可以只测试一个模块。Specifically, the website to be tested has a plurality of modules, and each module corresponds to a different user group. For example, in 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.
例如:如果所述选取单元112获取到当前测试模块为W,再从所述获取的操作元素中获取所述W对应的操作元素,所述选取单元112将所述对应的操作元素确定为所述待测操作元素。For example, if the selection unit 112 obtains the current test module as W and then acquires the operation element corresponding to the W from the acquired operation element, the selection unit 112 determines the corresponding operation element as the The operating element to be tested.
可以理解的是,由于一个页面上可以包括大量的操作元素,但是有些操作元素是用户几乎不会用到的,因此,通过上述(1)-(2)的方式可以筛选出使用频率较高的操作元素作为所述待测操作元素;又由于有些操作元素是出错率很低或者是不出错的,因此,通过上述(3)-(4)的方式可以筛选出错误率较高的操作元素作为所述待测操作元素;又由于有些操作元素间是相互关联的,当执行完一个操作元素的操作事件后,将继续执行关联的操作元素的操作事件,因此,通过上述(5)的方式可以直接将关联的操作事件确定为所述待测操作元素,避免复杂的筛选过程;又由于一个测试模块中只需对应测试一个页面上的部分操作元素,因此,通过上述(6)的方式可以直接调取当前测试模块对应的操作事件作为所述待测操作元素。It can be understood that since a page can include a large number of operation elements, some operation elements are hardly used by the user, and therefore, 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.
这样,既可以避免由于多余的测试工作影响测试的效率,又可以节约测试的成本。In this way, it is possible to avoid the efficiency of the test due to redundant test work, and the cost of the test can be saved.
发送单元113将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试。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.
通过上述实施方式,所述电子设备根据所述待测操作元素及所述待测操 作元素的操作事件,即可对所述待测网址的页面进行测试,测试方法不作限制。According to the above embodiment, 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.
例如:所述发送单元113可以将选取的待测操作元素超链接元素,及所述超链接元素对应的操作事件点击事件发送至所述待测网址的页面进行测试。For example, 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.
判断单元114判断所述待测网址的页面是否有报错信息。The determining unit 114 determines whether the page of the website to be tested has error information.
在本实施例中,当所述待测网址的页面有错误时,所述判断单元114将发出报错信息。In this embodiment, when the page of the website to be tested has an error, the determining unit 114 will issue an error message.
例如:当对所述超链接元素进行点击操作时,如果没有链接到其他网页,或者是链接到所述待测网址的页面上的指定位置,则说明在所述待测网址的页面中,所述超链接元素位置出现错误,所述判断单元114将发出报错信息。For example, when a click operation is performed on the hyperlink element, if there is no link to another webpage, or a specified location on the page linked to the website to be tested, it means that in the page of the website to be tested, An error occurs in the location of the hyperlink element, and the judgment unit 114 will issue an error message.
具体地,所述报错信息可能以提示框的形式显示在所述页面上,也可能以预设标记显示在所述页面上,本申请不作限制。Specifically, 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.
当所述待测网址的页面有报错信息时,输出单元115输出所述报错信息。When the page of the website to be tested has error information, the output unit 115 outputs the error information.
优选地,当所述待测网址的页面有报错信息时,所述方法还包括:Preferably, when the page of the website to be tested has error information, the method further includes:
所述获取单元111获取所述报错信息对应的日志,截图单元116通过所述自动化测试工具对所述日志进行截图,得到日志截图,所述截图单元116将所述日志截图保存至指定位置。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.
具体地,Selenium工具的驱动程序指示浏览器执行命令,最后由浏览器在内核中进行截图保存操作,最终的效果与用户使用鼠标在页面上截取图片并保存的效果完全相同。Specifically, 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.
进一步地,所述截图单元116将所述日志截图保存至指定位置(如指定文件夹)后,还可以根据所述日志截图的内容或者时间等信息为所述日志截图命名,方便后续对所述日志截图进行查询。Further, after 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.
优选地,解析单元117解析所述日志,得到错误点及错误点的类别,所述发送单元113根据所述错误点的类别,将每类的错误点发送至对应的维护人员。Preferably, 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.
优选地,所述解析单元117解析所述日志,得到错误点包括:Preferably, the parsing unit 117 parses the log, and obtaining error points includes:
所述解析单元117利用训练好的错误识别模型从所述日志中获取错误点。The parsing unit 117 acquires an error point from the log using the trained error recognition model.
在本实施例中,训练单元118训练所述错误识别模型包括:In this embodiment, the training unit 118 training the error recognition model includes:
所述训练单元118配置所述不同错误类别的错误点训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里。例如,第一类别的训练样本数据的分发到第一文件夹里;第二类别的训练样本数据分发到第二文件夹里;第三类别的训练样本数据分发到第三文件夹里;第四类别的训练样本数据分发到第四文件夹里。所述训练单元118从不同文件夹下各提取第一预设比例,例如,70%的训练样本数据作为训练数据进行所述错误识别模型的训练,所述训练单元118从不同文件夹下各取剩下的第二预设比例,例如,30%的训练样本数据作为测试数据以对生成的所述错误识别模型进行准确性验证。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.
若生成的所述错误识别模型准确率小于预设准确率,例如,99%,则所 述训练单元118增加所述不同类别的训练样本数据的获取数量,重复上述所述错误识别模型的生成过程,直到生成的所述错误识别模型准确率大于等于预设准确率,例如,99%。If the accuracy of the generated error recognition model is less than a preset accuracy, for example, 99%, 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%.
所述发送单元113根据所述错误点的类别,将每类的错误点发送至对应的维护人员。The sending unit 113 sends each type of error point to the corresponding maintenance personnel according to the category of the error point.
通过上述实施方式,可以将对应类别的错误信息发送给对应的维护人员,不仅更加有针对性,同时提高了维护效率,节约了由于匹配维护人员造成的时间损失。Through the foregoing implementation manner, 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.
例如:当确定错误类别为H时,所述发送单元113获取H对应的维护人员I,所述发送单元113将错误信息发送给所述维护人员I,以供所述维护人员I即时进行维护。For example, when it is determined that the error category is H, 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.
具体地,所述发送单元113可以以短信或者邮件等方式将每类的错误信息发送至对应的维护人员,本申请不作限制。Specifically, 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.
综上所述,本申请能采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试,从而对网页进行有针对性的健壮性测试,判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息,由于上述测试方案具有针对性,因此不会对待测试系统的其他功能造成影响,从而保证了待测试系统的稳定性及待测试系统功能的完整性。In summary, 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.
如图3所示,是本申请实现网页页面测试方法的较佳实施例的电子设备的结构示意图。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.
所述电子设备1是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。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.
所述电子设备1还可以是但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。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.
所述电子设备1还可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。The electronic device 1 can also be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
所述电子设备1所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。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.
在本申请的一个实施例中,所述电子设备1包括,但不限于,存储器12、处理器13,以及存储在所述存储器12中并可在所述处理器13上运行的计算 机可读指令,例如网页页面测试程序。In one embodiment of the present application, 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.
本领域技术人员可以理解,所述示意图仅仅是电子设备1的示例,并不构成对电子设备1的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备1还可以包括输入输出设备、网络接入设备、总线等。It will be understood by those skilled in the art that 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.
所称处理器13可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器13是所述电子设备1的运算核心和控制中心,利用各种接口和线路连接整个电子设备1的各个部分,及执行所述电子设备1的操作系统以及安装的各类应用程序、程序代码等。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.
所述处理器13执行所述电子设备1的操作系统以及安装的各类应用程序。所述处理器13执行所述应用程序以实现上述各个网页页面测试方法实施例中的步骤,例如图1所示的步骤S10、S11、S12、S13、S14及S15。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.
或者,所述处理器13执行所述计算机可读指令时实现上述各装置实施例中各模块/单元的功能,例如:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。Alternatively, 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.
示例性的,所述计算机可读指令可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令在所述电子设备1中的执行过程。例如,所述计算机可读指令可以被分割成启动单元110、获取单元111、选取单元112、发送单元113、判断单元114、输出单元115、截图单元116、解析单元117及训练单元118。Illustratively, 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. For example, 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.
所述存储器12可用于存储所述计算机可读指令和/或模块,所述处理器13通过运行或执行存储在所述存储器12内的计算机可读指令和/或模块,以及调用存储在存储器12内的数据,实现所述电子设备1的各种功能。所述存储器12可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器12可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一 个磁盘存储器件、闪存器件、或其他易失性固态存储器件。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.). In addition, 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). Card, flash card, at least one disk storage device, flash device, or other volatile solid state storage device.
所述存储器12可以是电子设备1的外部存储器和/或内部存储器。进一步地,所述存储器12可以是集成电路中没有实物形式的具有存储功能的电路,如RAM(Random-Access Memory,随机存取存储器)、FIFO(First In First Out,)等。或者,所述存储器12也可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)等等。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.
所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。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.
其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。Wherein, 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. It should be noted that the content contained in the 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.
结合图1,所述电子设备1中的所述存储器12存储多个指令以实现一种网页页面测试方法,所述处理器13可执行所述多个指令从而实现:采用自动化测试工具启动浏览器,并启动待测网址;获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;从所述获取的操作元素中选取待测操作元素;将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;判断所述待测网址的页面是否有报错信息;当所述待测网址的页面有报错信息时,输出所述报错信息。Referring to FIG. 1, the memory 12 in the electronic device 1 stores a plurality of instructions to implement a webpage page testing method, and 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.
根据本申请优选实施例,所述操作元素包括以下一种或者多种的组合:According to a preferred embodiment of the present application, 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; and/or
所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或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; and/or
所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或The operation event corresponding to the pull-down selection box element includes selecting an option event; and/or
所述单选按钮元素对应的操作事件包括选中事件;及/或The operation event corresponding to the radio button element includes a selected event; and/or
所述多选框元素对应的操作事件包括选中事件。The operation event corresponding to the multiple selection box element includes a selected event.
根据本申请优选实施例,所述处理器13还执行多个指令包括:According to a preferred embodiment of the present application, the processor 13 further executes a plurality of instructions including:
获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或Obtaining the number of uses of the acquired operation element, and determining an operation element whose usage number is greater than or equal to a preset number of times as the operation element to be tested; and/or
获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining the number of times of using the acquired operation element, sorting the used times of the acquired operation elements in a descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, and determining an operation element whose error rate is greater than or equal to a preset error rate as the operation element to be tested; and/or
获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, sorting the error rate of the acquired operation element in descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或After acquiring the selected operation element to be tested, acquiring the associated operation element of the selected operation element to be tested, and determining the associated operation element as the operation element to be tested; and/or
获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。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.
根据本申请优选实施例,所述处理器13还执行多个指令包括:According to a preferred embodiment of the present application, the processor 13 further executes a plurality of instructions including:
获取所述报错信息对应的日志;Obtaining a log corresponding to the error information;
通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。The log is taken by the automated test tool, a log screenshot is obtained, and the log screenshot is saved to a specified location.
根据本申请优选实施例,所述处理器13还执行多个指令包括:According to a preferred embodiment of the present application, the processor 13 further executes a plurality of instructions including:
解析所述日志,得到错误点及错误点的类别;Parsing the log to get the category of error points and error points;
根据所述错误点的类别,将每类的错误点发送至对应的维护人员。According to the category of the error points, each type of error point is sent to the corresponding maintenance personnel.
根据本申请优选实施例,所述处理器13还执行多个指令包括:According to a preferred embodiment of the present application, the processor 13 further executes a plurality of instructions including:
利用训练好的错误识别模型从所述日志中获取错误点。The error point is obtained from the log using the trained error recognition model.
根据本申请优选实施例,所述处理器13还执行多个指令包括:According to a preferred embodiment of the present application, the processor 13 further executes a plurality of instructions including:
在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;Training the error recognition model before acquiring the error point from the log using the trained error recognition model;
所述训练所述错误识别模型包括:The training the error recognition model includes:
配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。Configuring training sample data of the error points of the different error categories, distributing different types of training sample data to different folders, and respectively extracting the first preset proportion of training sample data training errors from the different folders Identifying a model, when the accuracy of the generated error recognition model is less than the preset accuracy rate, increasing the acquisition ratio of the training sample data of the different error categories, repeating the training process of the error recognition model until the generated error recognition model The accuracy rate is greater than or equal to the preset accuracy rate.
具体地,所述处理器13对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。For details, refer to the description of the related steps in the corresponding embodiment of FIG. 1 for the specific implementation of the foregoing instructions, and details are not described herein.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可 以有另外的划分方式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and the actual implementation may have another division manner.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The 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.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, 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.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。It is obvious to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。Therefore, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the invention is defined by the appended claims instead All changes in the meaning and scope of equivalent elements are included in this application. Any accompanying drawings in the claims should not be construed as limiting the claim.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。In addition, it is to be understood that the word "comprising" does not exclude other elements or steps. A plurality of units or devices recited in the system claims can also be implemented by a unit or device by software or hardware. The second word is used to denote the name and does not denote any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。It should be noted that the above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be applied. Modifications or equivalents are made without departing from the spirit and scope of the technical solutions of the present application.

Claims (20)

  1. 一种网页页面测试方法,其特征在于,所述方法包括:A web page testing method, the method comprising:
    采用自动化测试工具启动浏览器,并启动待测网址;Launch the browser with an automated test tool and launch the URL to be tested;
    获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;Obtaining 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 acquired operation elements;
    将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;And 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;
    判断所述待测网址的页面是否有报错信息;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, the error information is output.
  2. 如权利要求1所述的网页页面测试方法,其特征在于,所述操作元素包括以下一种或者多种的组合:The webpage page testing method according to claim 1, wherein the operation 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; and/or
    所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或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; and/or
    所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或The operation event corresponding to the pull-down selection box element includes selecting an option event; and/or
    所述单选按钮元素对应的操作事件包括选中事件;及/或The operation event corresponding to the radio button element includes a selected event; and/or
    所述多选框元素对应的操作事件包括选中事件。The operation event corresponding to the multiple selection box element includes a selected event.
  3. 如权利要求1所述的网页页面测试方法,其特征在于,所述从所述获取的操作元素中选取待测操作元素包括以下一种或者多种的组合:The webpage page testing method according to claim 1, wherein the selecting the operation element to be tested from the acquired operation elements comprises one or more of the following combinations:
    获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或Obtaining the number of uses of the acquired operation element, and determining an operation element whose usage number is greater than or equal to a preset number of times as the operation element to be tested; and/or
    获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining the number of times of using the acquired operation element, sorting the used times of the acquired operation elements in a descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
    获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, and determining an operation element whose error rate is greater than or equal to a preset error rate as the operation element to be tested; and/or
    获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, sorting the error rate of the acquired operation element in descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
    当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或After acquiring the selected operation element to be tested, acquiring the associated operation element of the selected operation element to be tested, and determining the associated operation element as the operation element to be tested; and/or
    获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。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.
  4. 如权利要求1所述的网页页面测试方法,其特征在于,所述方法还包 括:The method for testing a web page according to claim 1, wherein the method further comprises:
    获取所述报错信息对应的日志;Obtaining a log corresponding to the error information;
    通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。The log is taken by the automated test tool, a log screenshot is obtained, and the log screenshot is saved to a specified location.
  5. 如权利要求4所述的网页页面测试方法,其特征在于,所述方法还包括:The method for testing a web page according to claim 4, wherein the method further comprises:
    解析所述日志,得到错误点及错误点的类别;Parsing the log to get the category of error points and error points;
    根据所述错误点的类别,将每类的错误点发送至对应的维护人员。According to the category of the error points, each type of error point is sent to the corresponding maintenance personnel.
  6. 如权利要求5所述的网页页面测试方法,其特征在于,所述解析所述日志,得到错误点包括:The webpage page testing method according to claim 5, wherein the parsing the log to obtain an error point comprises:
    利用训练好的错误识别模型从所述日志中获取错误点。The error point is obtained from the log using the trained error recognition model.
  7. 如权利要求6所述的网页页面测试方法,其特征在于,所述方法还包括:The method for testing a web page according to claim 6, wherein the method further comprises:
    在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;Training the error recognition model before acquiring the error point from the log using the trained error recognition model;
    所述训练所述错误识别模型包括:The training the error recognition model includes:
    配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。Configuring training sample data of the error points of the different error categories, distributing different types of training sample data to different folders, and respectively extracting the first preset proportion of training sample data training errors from the different folders Identifying a model, when the accuracy of the generated error recognition model is less than the preset accuracy rate, increasing the acquisition ratio of the training sample data of the different error categories, repeating the training process of the error recognition model until the generated error recognition model The accuracy rate is greater than or equal to the preset accuracy rate.
  8. 一种网页页面测试装置,其特征在于,所述装置包括:A web page testing device, characterized in that the device comprises:
    启动单元,用于采用自动化测试工具启动浏览器,并启动待测网址;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;
    输出单元,用于当所述待测网址的页面有报错信息时,输出所述报错信息。And an output unit, configured to output the error information when the page of the website to be tested has error information.
  9. 一种电子设备,其特征在于,所述电子设备包括存储器及处理器,所述存储器用于存储至少一个计算机可读指令,所述处理器用于执行所述至少一个计算机可读指令以实现以下步骤:An electronic device, comprising: a memory for storing at least one computer readable instruction, and a processor for executing the at least one computer readable instruction to implement the following steps :
    采用自动化测试工具启动浏览器,并启动待测网址;Launch the browser with an automated test tool and launch the URL to be tested;
    获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;Obtaining 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 acquired operation elements;
    将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;And 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;
    判断所述待测网址的页面是否有报错信息;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, the error information is output.
  10. 如权利要求9所述的电子设备,其特征在于,所述操作元素包括以下一种或者多种的组合:The electronic device of claim 9, wherein the operational element comprises one or more of the following:
    超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素;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; and/or
    所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或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; and/or
    所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或The operation event corresponding to the pull-down selection box element includes selecting an option event; and/or
    所述单选按钮元素对应的操作事件包括选中事件;及/或The operation event corresponding to the radio button element includes a selected event; and/or
    所述多选框元素对应的操作事件包括选中事件。The operation event corresponding to the multiple selection box element includes a selected event.
  11. 如权利要求9所述的电子设备,其特征在于,所述从所述获取的操作元素中选取待测操作元素包括以下一种或者多种的组合:The electronic device according to claim 9, wherein the selecting the operation element to be tested from the acquired operation elements comprises combining one or more of the following:
    获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或Obtaining the number of uses of the acquired operation element, and determining an operation element whose usage number is greater than or equal to a preset number of times as the operation element to be tested; and/or
    获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining the number of times of using the acquired operation element, sorting the used times of the acquired operation elements in a descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
    获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, and determining an operation element whose error rate is greater than or equal to a preset error rate as the operation element to be tested; and/or
    获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, sorting the error rate of the acquired operation element in descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
    当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或After acquiring the selected operation element to be tested, acquiring the associated operation element of the selected operation element to be tested, and determining the associated operation element as the operation element to be tested; and/or
    获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。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.
  12. 如权利要求9所述的电子设备,其特征在于,所述处理器还用于执行所述至少一个计算机可读指令,以实现以下步骤:The electronic device of claim 9, wherein the processor is further configured to execute the at least one computer readable instruction to implement the following steps:
    获取所述报错信息对应的日志;Obtaining a log corresponding to the error information;
    通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。The log is taken by the automated test tool, a log screenshot is obtained, and the log screenshot is saved to a specified location.
  13. 如权利要求9所述的电子设备,其特征在于,所述处理器还用于执行所述至少一个计算机可读指令,以实现以下步骤:The electronic device of claim 9, wherein the processor is further configured to execute the at least one computer readable instruction to implement the following steps:
    解析所述日志,得到错误点及错误点的类别;Parsing the log to get the category of error points and error points;
    根据所述错误点的类别,将每类的错误点发送至对应的维护人员。According to the category of the error points, each type of error point is sent to the corresponding maintenance personnel.
  14. 如权利要求9所述的电子设备,其特征在于,所述处理器还用于执行所述至少一个计算机可读指令,以实现以下步骤:The electronic device of claim 9, wherein the processor is further configured to execute the at least one computer readable instruction to implement the following steps:
    在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;Training the error recognition model before acquiring the error point from the log using the trained error recognition model;
    所述训练所述错误识别模型包括:The training the error recognition model includes:
    配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。Configuring training sample data of the error points of the different error categories, distributing different types of training sample data to different folders, and respectively extracting the first preset proportion of training sample data training errors from the different folders Identifying a model, when the accuracy of the generated error recognition model is less than the preset accuracy rate, increasing the acquisition ratio of the training sample data of the different error categories, repeating the training process of the error recognition model until the generated error recognition model The accuracy rate is greater than or equal to the preset accuracy rate.
  15. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质中存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:A non-volatile readable storage medium, wherein the non-volatile readable storage medium stores at least one computer readable instruction, the at least one computer readable instruction being executed by a processor to implement the following step:
    采用自动化测试工具启动浏览器,并启动待测网址;Launch the browser with an automated test tool and launch the URL to be tested;
    获取所述待测网址的页面上的操作元素以及所述操作元素的操作事件;Obtaining 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 acquired operation elements;
    将所述待测操作元素及所述待测操作元素的操作事件发送至所述待测网址的页面进行测试;And 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;
    判断所述待测网址的页面是否有报错信息;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, the error information is output.
  16. 如权利要求15所述的存储介质,其特征在于,所述操作元素包括以下一种或者多种的组合:The storage medium of claim 15 wherein said operational elements comprise one or more of the following:
    超链接元素、输入框元素、按钮元素、下拉选择框元素、单选按钮元素、多选框元素;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; and/or
    所述输入框元素对应的操作事件包括输入随机文本事件、清空文本事件;及/或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; and/or
    所述下拉选择框元素对应的操作事件包括选中一个选项事件;及/或The operation event corresponding to the pull-down selection box element includes selecting an option event; and/or
    所述单选按钮元素对应的操作事件包括选中事件;及/或The operation event corresponding to the radio button element includes a selected event; and/or
    所述多选框元素对应的操作事件包括选中事件。The operation event corresponding to the multiple selection box element includes a selected event.
  17. 如权利要求15所述的存储介质,其特征在于,所述从所述获取的操作元素中选取待测操作元素包括以下一种或者多种的组合:The storage medium according to claim 15, wherein the selecting the operation element to be tested from the acquired operation elements comprises combining one or more of the following:
    获取所述获取的操作元素的使用次数,并将使用次数大于或者等于预设次数的操作元素确定为所述待测操作元素;及/或Obtaining the number of uses of the acquired operation element, and determining an operation element whose usage number is greater than or equal to a preset number of times as the operation element to be tested; and/or
    获取所述获取的操作元素的使用次数,将所述获取的操作元素的使用次数按照由多到少的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining the number of times of using the acquired operation element, sorting the used times of the acquired operation elements in a descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
    获取所述获取的操作元素的错误率,并将错误率大于或者等于预设错误率的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, and determining an operation element whose error rate is greater than or equal to a preset error rate as the operation element to be tested; and/or
    获取所述获取的操作元素的错误率,将所述获取的操作元素的错误率按照由高到低的顺序进行排序,并将排在前预设位数的操作元素确定为所述待测操作元素;及/或Obtaining an error rate of the acquired operation element, sorting the error rate of the acquired operation element in descending order, and determining an operation element ranked in the preset number of bits as the operation to be tested Element; and/or
    当获取到选取的待测操作元素后,获取所述选取的待测操作元素的关联操作元素,并将所述关联操作元素确定为所述待测操作元素;及/或After acquiring the selected operation element to be tested, acquiring the associated operation element of the selected operation element to be tested, and determining the associated operation element as the operation element to be tested; and/or
    获取当前测试模块,及从所述获取的操作元素中获取所述当前测试模块对应的操作元素,并将所述对应的操作元素确定为所述待测操作元素,其中,所述当前测试模块对应一类用户群体。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.
  18. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时,还实现以下步骤:The storage medium of claim 15 wherein when said at least one computer readable instruction is executed by a processor, the following steps are further implemented:
    获取所述报错信息对应的日志;Obtaining a log corresponding to the error information;
    通过所述自动化测试工具对所述日志进行截图,得到日志截图,并将所述日志截图保存至指定位置。The log is taken by the automated test tool, a log screenshot is obtained, and the log screenshot is saved to a specified location.
  19. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时,还实现以下步骤:The storage medium of claim 15 wherein when said at least one computer readable instruction is executed by a processor, the following steps are further implemented:
    解析所述日志,得到错误点及错误点的类别;Parsing the log to get the category of error points and error points;
    根据所述错误点的类别,将每类的错误点发送至对应的维护人员。According to the category of the error points, each type of error point is sent to the corresponding maintenance personnel.
  20. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行时,还实现以下步骤:The storage medium of claim 15 wherein when said at least one computer readable instruction is executed by a processor, the following steps are further implemented:
    在利用训练好的错误识别模型从所述日志中获取错误点前,训练所述错误识别模型;Training the error recognition model before acquiring the error point from the log using the trained error recognition model;
    所述训练所述错误识别模型包括:The training the error recognition model includes:
    配置所述不同错误类别的错误点的训练样本数据,将不同类别的训练样本数据分发到不同的文件夹里,从所述不同的文件夹中分别提取第一预设比例的训练样本数据训练错误识别模型,当生成的错误识别模型的准确率小于预设准确率时,增加所述不同错误类别的训练样本数据的获取比例,重复所述错误识别模型的训练过程,直到生成的错误识别模型的准确率大于或者等于所述预设准确率。.Configuring training sample data of the error points of the different error categories, distributing different types of training sample data to different folders, and respectively extracting the first preset proportion of training sample data training errors from the different folders Identifying a model, when the accuracy of the generated error recognition model is less than the preset accuracy rate, increasing the acquisition ratio of the training sample data of the different error categories, repeating the training process of the error recognition model until the generated error recognition model The accuracy rate is greater than or equal to the preset accuracy rate. .
PCT/CN2018/099282 2018-04-10 2018-08-08 Web page testing method and apparatus, electronic device, and medium WO2019196274A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810316068.9A CN108628741B (en) 2018-04-10 2018-04-10 Webpage testing method and device, electronic equipment and medium
CN201810316068.9 2018-04-10

Publications (1)

Publication Number Publication Date
WO2019196274A1 true WO2019196274A1 (en) 2019-10-17

Family

ID=63705027

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/099282 WO2019196274A1 (en) 2018-04-10 2018-08-08 Web page testing method and apparatus, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN108628741B (en)
WO (1) WO2019196274A1 (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888709A (en) * 2019-12-04 2020-03-17 中山市凯能集团有限公司 Intelligent operation method and device of monitoring screen, computer equipment and storage medium
CN111026648A (en) * 2019-11-21 2020-04-17 汉海信息技术(上海)有限公司 Application program page testing method and device, electronic equipment and storage medium
CN111045934A (en) * 2019-11-29 2020-04-21 北京三快在线科技有限公司 Page analysis method, device, client, storage medium and electronic equipment
CN111104308A (en) * 2019-11-12 2020-05-05 贝壳技术有限公司 Display page testing method and device, storage medium and electronic equipment
CN111159028A (en) * 2019-12-23 2020-05-15 望海康信(北京)科技股份公司 Webpage testing method and device
CN111488539A (en) * 2020-04-08 2020-08-04 中国银行股份有限公司 Page adjusting method and device
CN112231214A (en) * 2020-10-16 2021-01-15 百度国际科技(深圳)有限公司 Page testing method and device, electronic equipment and medium
CN112256984A (en) * 2020-10-22 2021-01-22 上海悦易网络信息技术有限公司 Method and device for acquiring interface background screenshot corresponding to webpage
CN112649717A (en) * 2020-09-15 2021-04-13 广州市几米物联科技有限公司 Test method, test device, terminal equipment and storage medium
CN112671615A (en) * 2020-12-29 2021-04-16 中国平安财产保险股份有限公司 Method, system and storage medium for collecting operation behavior data of front-end user
CN113220596A (en) * 2021-06-17 2021-08-06 中国农业银行股份有限公司 Application testing method, device, equipment, storage medium and program product
CN113238958A (en) * 2021-06-01 2021-08-10 广东好太太智能家居有限公司 Automatic testing method and device for big data visualization platform and electronic equipment
CN113760721A (en) * 2021-01-13 2021-12-07 北京沃东天骏信息技术有限公司 Page testing method and device
CN113791968A (en) * 2021-08-10 2021-12-14 武汉光庭信息技术股份有限公司 UI automation test method, system, electronic equipment and storage medium
CN114077537A (en) * 2020-08-14 2022-02-22 福建天泉教育科技有限公司 Optimization method and system of UI (user interface) automation test framework
CN114968687A (en) * 2022-06-09 2022-08-30 腾讯科技(深圳)有限公司 Traversal testing method, device, electronic equipment, program product and storage medium
CN115277396A (en) * 2022-08-04 2022-11-01 北京智慧星光信息技术有限公司 Message driving method and system for simulating browser operation
CN117370203A (en) * 2023-10-27 2024-01-09 华润数字科技有限公司 Automatic test method, system, electronic equipment and storage medium

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542763A (en) * 2018-10-16 2019-03-29 深圳壹账通智能科技有限公司 Page monitoring method, device, computer equipment and storage medium
CN109783168B (en) * 2018-12-13 2023-07-18 平安科技(深圳)有限公司 Method, device, medium and electronic equipment for personalized selection of user interface element
CN109828900A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 Test script automatic generation method, device, electronic equipment and storage medium
CN109710528B (en) * 2018-12-25 2022-03-01 中国人民财产保险股份有限公司 Test script generation method, device, equipment and medium
CN111949510B (en) * 2019-05-17 2024-05-14 百度在线网络技术(北京)有限公司 Test processing method, device, electronic equipment and readable storage medium
CN110287108A (en) * 2019-05-31 2019-09-27 北京随信云链科技有限公司 A kind of page test method calculates equipment and storage medium
CN112152823B (en) * 2019-06-26 2022-09-02 北京易真学思教育科技有限公司 Website operation error monitoring method and device and computer storage medium
CN112347244B (en) * 2019-08-08 2023-07-25 四川大学 Yellow-based and gambling-based website detection method based on mixed feature analysis
CN112579948B (en) * 2019-09-29 2024-06-21 北京国双科技有限公司 Webpage screenshot method and device, storage medium and electronic equipment
CN111061526B (en) * 2019-10-12 2023-12-01 天航长鹰(江苏)科技有限公司 Automatic test method, device, computer equipment and storage medium
CN110781089B (en) * 2019-10-31 2022-08-19 睿云联(厦门)网络通讯技术有限公司 Method and device for automatically testing UI of equipment, electronic equipment and medium
CN111258904A (en) * 2020-01-16 2020-06-09 恩亿科(北京)数据科技有限公司 Webpage element testing method and related device
CN111983429B (en) * 2020-08-19 2023-07-18 Oppo广东移动通信有限公司 Chip verification system, chip verification method, terminal and storage medium
CN112631704A (en) * 2020-12-26 2021-04-09 深圳集智数字科技有限公司 Interface element identification method and device, storage medium and electronic equipment
CN112685253A (en) * 2020-12-29 2021-04-20 平安普惠企业管理有限公司 Front-end error log collection method, device, equipment and storage medium
CN113342637A (en) * 2021-05-08 2021-09-03 深圳奥哲网络科技有限公司 Application testing method, system, equipment and storage medium based on metadata
CN113254018B (en) * 2021-07-14 2021-11-02 广州易方信息科技股份有限公司 Automatic operation method and device for webpage view
CN113656319A (en) * 2021-08-25 2021-11-16 广东三维家信息科技有限公司 Regression testing method and device, electronic equipment and storage medium
CN115426277A (en) * 2022-08-30 2022-12-02 杭州安恒信息技术股份有限公司 Quality safety detection method, device, equipment and readable storage medium
CN115202762B (en) * 2022-09-13 2023-03-10 北京达佳互联信息技术有限公司 Application program control method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521121A (en) * 2011-11-18 2012-06-27 华为技术有限公司 Page testing method and page testing device
US20140351796A1 (en) * 2013-05-24 2014-11-27 Microsoft Corporation Accessibility compliance testing using code injection
CN105843734A (en) * 2016-03-18 2016-08-10 厦门美图移动科技有限公司 Automatic test method and device and computing device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768641B (en) * 2012-06-15 2015-06-17 深圳中兴网信科技有限公司 Webpage testing factor selecting device and webpage testing factor selecting method
CN104461855B (en) * 2013-09-22 2019-03-26 腾讯科技(北京)有限公司 A kind of Web automated testing method, system and device
CN103678120B (en) * 2013-11-12 2016-07-06 北京京东尚科信息技术有限公司 Web application automated testing method based on modeling
US9336126B1 (en) * 2014-06-24 2016-05-10 Amazon Technologies, Inc. Client-side event logging for heterogeneous client environments
CN105653444B (en) * 2015-12-23 2018-07-13 北京大学 Software defect fault recognition method and system based on internet daily record data
CN105677615B (en) * 2016-01-04 2018-11-23 北京邮电大学 A kind of distributed machines learning method based on weka interface
CN107203464B (en) * 2016-03-17 2020-09-08 阿里巴巴集团控股有限公司 Method and device for positioning service problem
CN106126413B (en) * 2016-06-16 2019-02-19 南通大学 The Software Defects Predict Methods of packaging type feature selecting based on the study of class imbalance and genetic algorithm
CN107665165A (en) * 2016-07-27 2018-02-06 中兴通讯股份有限公司 Ambient noise generation method and device, method for testing pressure and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521121A (en) * 2011-11-18 2012-06-27 华为技术有限公司 Page testing method and page testing device
US20140351796A1 (en) * 2013-05-24 2014-11-27 Microsoft Corporation Accessibility compliance testing using code injection
CN105843734A (en) * 2016-03-18 2016-08-10 厦门美图移动科技有限公司 Automatic test method and device and computing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI MEIYI: "Use of Selenium", SOFTWARE TESTING, 31 May 2016 (2016-05-31), pages 129 - 131 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104308A (en) * 2019-11-12 2020-05-05 贝壳技术有限公司 Display page testing method and device, storage medium and electronic equipment
CN111026648A (en) * 2019-11-21 2020-04-17 汉海信息技术(上海)有限公司 Application program page testing method and device, electronic equipment and storage medium
CN111045934A (en) * 2019-11-29 2020-04-21 北京三快在线科技有限公司 Page analysis method, device, client, storage medium and electronic equipment
CN110888709A (en) * 2019-12-04 2020-03-17 中山市凯能集团有限公司 Intelligent operation method and device of monitoring screen, computer equipment and storage medium
CN111159028A (en) * 2019-12-23 2020-05-15 望海康信(北京)科技股份公司 Webpage testing method and device
CN111488539A (en) * 2020-04-08 2020-08-04 中国银行股份有限公司 Page adjusting method and device
CN111488539B (en) * 2020-04-08 2023-04-21 中国银行股份有限公司 Page adjustment method and device
CN114077537A (en) * 2020-08-14 2022-02-22 福建天泉教育科技有限公司 Optimization method and system of UI (user interface) automation test framework
CN112649717A (en) * 2020-09-15 2021-04-13 广州市几米物联科技有限公司 Test method, test device, terminal equipment and storage medium
CN112231214A (en) * 2020-10-16 2021-01-15 百度国际科技(深圳)有限公司 Page testing method and device, electronic equipment and medium
CN112231214B (en) * 2020-10-16 2023-09-26 百度国际科技(深圳)有限公司 Page test method, device, electronic equipment and medium
CN112256984B (en) * 2020-10-22 2022-09-30 上海万物新生环保科技集团有限公司 Method and device for acquiring interface background screenshot corresponding to webpage
CN112256984A (en) * 2020-10-22 2021-01-22 上海悦易网络信息技术有限公司 Method and device for acquiring interface background screenshot corresponding to webpage
CN112671615B (en) * 2020-12-29 2023-07-07 中国平安财产保险股份有限公司 Method, system and storage medium for collecting front-end user operation behavior data
CN112671615A (en) * 2020-12-29 2021-04-16 中国平安财产保险股份有限公司 Method, system and storage medium for collecting operation behavior data of front-end user
CN113760721A (en) * 2021-01-13 2021-12-07 北京沃东天骏信息技术有限公司 Page testing method and device
CN113238958A (en) * 2021-06-01 2021-08-10 广东好太太智能家居有限公司 Automatic testing method and device for big data visualization platform and electronic equipment
CN113220596A (en) * 2021-06-17 2021-08-06 中国农业银行股份有限公司 Application testing method, device, equipment, storage medium and program product
CN113220596B (en) * 2021-06-17 2024-04-30 中国农业银行股份有限公司 Application testing method, device, equipment, storage medium and program product
CN113791968A (en) * 2021-08-10 2021-12-14 武汉光庭信息技术股份有限公司 UI automation test method, system, electronic equipment and storage medium
CN114968687A (en) * 2022-06-09 2022-08-30 腾讯科技(深圳)有限公司 Traversal testing method, device, electronic equipment, program product and storage medium
CN115277396A (en) * 2022-08-04 2022-11-01 北京智慧星光信息技术有限公司 Message driving method and system for simulating browser operation
CN115277396B (en) * 2022-08-04 2024-03-26 北京智慧星光信息技术有限公司 Message driving method and system for simulating browser operation
CN117370203A (en) * 2023-10-27 2024-01-09 华润数字科技有限公司 Automatic test method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108628741A (en) 2018-10-09
CN108628741B (en) 2021-10-01

Similar Documents

Publication Publication Date Title
WO2019196274A1 (en) Web page testing method and apparatus, electronic device, and medium
US9934129B1 (en) Determining application test results using screenshot metadata
US11262979B2 (en) Machine learning webpage accessibility testing tool
JP5821678B2 (en) Web service for automatic compatibility check independent of web application browser
US10019716B1 (en) Method for feedback submission resolution
US9747191B1 (en) Tool to replicate actions across devices in real time for improved efficiency during manual application testing
CN107193743B (en) Application evaluation method and device, computer equipment and storage medium
US9003423B1 (en) Dynamic browser compatibility checker
WO2021109928A1 (en) Creation method, usage method and apparatus for machine learning scheme template
US11361046B2 (en) Machine learning classification of an application link as broken or working
WO2013075612A1 (en) Auto login method and device
US20180165258A1 (en) Methods for improved auditing of web sites and devices thereof
US20180131779A1 (en) Recording And Triggering Web And Native Mobile Application Events With Mapped Data Fields
WO2018184361A1 (en) Application test method, server, terminal, and storage media
WO2018120720A1 (en) Method for locating test error of client program, electronic device, and storage medium
US11360973B2 (en) Generating multilingual queries
US20150242297A1 (en) Method and system for testing of applications in asset management software
CN113449877A (en) Method and system for displaying machine learning modeling process
CN108898229B (en) Method and system for constructing machine learning modeling process
JP6162134B2 (en) Social page trigger
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
US11048735B2 (en) Operation of a computer based on optimal problem solutions
JP6508327B2 (en) Text visualization system, text visualization method, and program
WO2020093613A1 (en) Page data processing method and apparatus, storage medium, and computer device
CN108960433B (en) Method and system for running machine learning modeling process

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