CN111694725A - Method and device for testing stability of web page - Google Patents

Method and device for testing stability of web page Download PDF

Info

Publication number
CN111694725A
CN111694725A CN201910199821.5A CN201910199821A CN111694725A CN 111694725 A CN111694725 A CN 111694725A CN 201910199821 A CN201910199821 A CN 201910199821A CN 111694725 A CN111694725 A CN 111694725A
Authority
CN
China
Prior art keywords
tested
page
test
web page
page elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910199821.5A
Other languages
Chinese (zh)
Inventor
崔俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201910199821.5A priority Critical patent/CN111694725A/en
Publication of CN111694725A publication Critical patent/CN111694725A/en
Pending legal-status Critical Current

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/3696Methods or tools to render software testable

Abstract

The invention provides a method and a device for testing the stability of a web page. When a trigger operation for starting the test is received, calling the page elements to be tested in the corresponding web pages by adopting a preset interface of the webdriver test tool, and executing the click operation of the appointed click times to the called page elements to be tested concurrently. And finally, acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result. Therefore, the embodiment of the invention configures and stores the identification of the page element to be tested in advance, sets the click times when the page element to be tested is tested, and executes the click operation of the specified click times on the page element to be tested through the webdriver test tool concurrently so as to efficiently test the stability of the web page where the page element to be tested is located.

Description

Method and device for testing stability of web page
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for testing the stability of a web page.
Background
With the continuous development of computer technology, more people have started to rely on obtaining various types of information by browsing web pages, the HTML5 page plays an important role in numerous web pages, and since the stability of the HTML5 page is important and is not allowed in the case that the page does not respond to js (javascript) error and the like, the efficient test on the stability of the HTML5 page is particularly important,
the existing stability test of HTML5 is not perfect, and many cases are that a tester performs a manual click test on a page element on a page to be tested, but the number of times of manual clicks is very limited, and for the click operation of the page for many users in practical application, the performance of the page is stable, whether the page can not collapse or not, and the test effect of manual test is not obvious, and a large amount of manpower is easily consumed.
Disclosure of Invention
In view of the above, the present invention is proposed to provide a method and apparatus for stability testing of a web page that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, a method for testing stability of a web page is provided, including:
determining page elements to be tested according to pre-configured identifiers of the page elements to be tested, and configuring specified click times aiming at the page elements to be tested;
when a trigger operation for starting the test is received, calling a page element to be tested in a corresponding web page by adopting a preset interface of a webdriver test tool;
utilizing a webdriver testing tool to concurrently execute the clicking operation of the appointed clicking times on the called page element to be tested;
and acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
Optionally, determining a page element to be tested according to a pre-configured identifier of the page element to be tested, and before configuring a specified click number for the page element to be tested, the method further includes:
acquiring web pages to be tested on a plurality of different servers, and determining identifiers of page elements to be tested contained in the web pages to be tested in each server;
and storing the determined identifier of the page element to be tested in a pre-established Selenium frame.
Optionally, the method further includes integrating the identifier of the page element to be tested and the corresponding server related information into the JSON file, and calling the page element to be tested in the corresponding web page by using a preset interface of a webdriver test tool when a trigger operation for starting the test is received, where the method includes:
when a trigger operation for starting a test is received, reading the identifier of the page element to be tested from the JSON file;
and calling the page elements to be tested corresponding to the identifiers of the page elements to be tested in the corresponding server by adopting a preset interface of the webdriver testing tool according to the relevant information of the server.
Optionally, the page element includes at least one of:
text, picture, audio, animation, video, URL address.
Optionally, the identification of the page element comprises at least one of:
ID, name, class attribute and tittle attribute of the page element.
Optionally, after analyzing and determining the corresponding test result according to the response result, the method further includes:
generating a corresponding test report according to the test result;
judging whether the test result has a test error or not;
if not, directly displaying the generated test report to a tester;
and if so, displaying the generated test report and a prompt message that the test result is wrong to a tester.
According to another aspect of the present invention, there is also provided a web page stability testing apparatus, including:
the configuration module is suitable for determining page elements to be tested according to pre-configured identifiers of the page elements to be tested and configuring specified click times aiming at the page elements to be tested;
the calling module is suitable for calling the page elements to be tested in the corresponding web pages by adopting a preset interface of a webdriver testing tool when receiving the trigger operation of starting the test;
the test module is suitable for utilizing a webdriver test tool to concurrently execute the click operation of the appointed click times on the called page element to be tested;
and the analysis module is suitable for acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
Optionally, the method further comprises:
the acquisition module is suitable for acquiring web pages to be tested on a plurality of different servers and determining the identification of the page elements to be tested contained in the web pages to be tested in each server before the configuration module determines the page elements to be tested according to the identification of the page elements to be tested configured in advance and configures the appointed click times aiming at the page elements to be tested;
and the storage module is suitable for storing the determined identifier of the page element to be tested in a preset Selenium frame.
Optionally, the method further comprises:
the integration module is suitable for integrating the identification of the page element to be tested and the corresponding server related information into a JSON file;
the calling module is further suitable for reading the identifier of the page element to be tested from the JSON file when receiving a trigger operation for starting a test; and calling the page elements to be tested corresponding to the identifiers of the page elements to be tested in the corresponding server by adopting a preset interface of the webdriver testing tool according to the relevant information of the server.
Optionally, the page element includes at least one of:
text, picture, audio, animation, video, URL address.
Optionally, the identification of the page element comprises at least one of:
ID, name, class attribute and tittle attribute of the page element.
Optionally, the method further comprises:
the generating module is suitable for generating a corresponding test report according to the test result;
the judging module is suitable for judging whether the test result has a test error or not;
the first display module is suitable for directly displaying the generated test report to a tester if the judgment module judges that the test result has no test error;
and the second display module is suitable for displaying the generated test report and the prompt message of the test result with the error to a tester if the judgment module judges that the test result has the test error.
According to yet another aspect of the present invention, there is also provided a computer storage medium having stored thereon computer program code which, when run on a computing device, causes the computing device to perform the method of stability testing of a web page in any of the embodiments above.
In accordance with yet another aspect of the present invention, there is also provided a computing device comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method for stability testing of a web page of any of the above embodiments.
By adopting the embodiment of the invention, when the stability of the web page is tested, the page element to be tested is determined according to the pre-configured identification of the page element to be tested, and the appointed click times are configured aiming at the page element to be tested. When a trigger operation for starting the test is received, calling the page elements to be tested in the corresponding web pages by adopting a preset interface of the webdriver test tool, and executing the click operation of the appointed click times to the called page elements to be tested concurrently. And finally, acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result. Therefore, the embodiment of the invention, by configuring the identifier of the page element to be tested in advance and setting the click times when the page element to be tested is tested, can utilize the webdriver test tool to concurrently execute the click operation of the specified click times on the page element to be tested so as to test the stability of the web page where the page element to be tested is located.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a flow diagram of a method for stability testing of a web page in accordance with one embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a device for testing the stability of a web page according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating a stability testing apparatus for a web page according to another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the technical problem, an embodiment of the present invention provides a method for testing stability of a web page. Fig. 1 shows a flow diagram of a method for testing the stability of a web page according to an embodiment of the invention. Referring to fig. 1, the method includes at least steps S102 to S108.
Step S102, determining page elements to be tested according to the pre-configured identifiers of the page elements to be tested, and configuring the appointed click times aiming at the page elements to be tested.
And step S104, when the trigger operation for starting the test is received, calling the page element to be tested in the corresponding web page by adopting a preset interface of the webdriver test tool.
And step S106, executing the click operation of the appointed click times to the called page element to be tested by using the webdriver test tool.
And S108, acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
According to the embodiment of the invention, the identification of the page element to be tested is configured in advance, and the click times of the page element to be tested in the test are set, so that the click operation of the specified click times can be executed on the page element to be tested by using a webdriver test tool concurrently, and the stability of the web page where the page element to be tested is located is tested.
In an embodiment of the present invention, the page elements to be tested may include text, pictures, audio, animation, video, URL address, etc. page elements in a web page. The identification of the page element may include an ID, a name, a class attribute, a title attribute, and the like of the page element. The embodiment of the invention does not specifically limit the page elements of the web page and the identifiers of the page elements.
In an embodiment of the present invention, before performing a stability test on a web page, in order to clarify a test target, parameter configuration needs to be performed on a webdriver test tool first, and the embodiment of the present invention may implement parameter configuration on the webdriver test tool based on a Selenium frame. In addition, in order to improve the efficiency of the stability test on the web page, the configuration parameters of the webdriver test tool can be identified by using a plurality of page elements in the web pages on a plurality of servers.
Specifically, before step S102 is executed, first, web pages to be tested are obtained from a plurality of different servers, and the target of a page element to be tested included in the web page to be tested in each server is determined. And then, storing the determined identifier of the page element to be tested in a preestablished Selenium frame, thereby realizing the parameter configuration of the webdriver testing tool. For example, after a plurality of web pages to be tested are acquired from 10 servers, page elements of each page to be tested are located, then 5 different URL addresses are selected from the located page elements as page elements to be tested, and finally, the identifiers of the 5 different URL addresses are stored in a preset Selenium frame.
Certainly, when the identifier of the page element to be tested is configured as a parameter in the webdriver testing tool, information such as the page address of the web page to which the page element to be tested belongs, the IP address of the server to which the web belongs, and the like can also be configured in the testing tool, so that the testing tool can call the element to be tested from the corresponding server to be tested conveniently.
And then, executing step S102, determining the page element to be tested according to the pre-configured identifier of the page element to be tested, and configuring the specified click times for the page element to be tested. Here, the process of configuring the designated number of clicks for the page element to be tested is also the process of configuring the parameters for the webdriver test tool. Therefore, the embodiment of the invention can realize parallel test on the stability of the web pages of different servers in the follow-up process so as to improve the test efficiency.
In the embodiment of the invention, the specified click times configured for the page elements to be tested are set by a tester according to the requirements of the web page to be tested, and if the web page to be tested is expected to have higher stability, the specified click times with larger numerical values can be set for the page elements to be tested on the web page to be tested, such as 10 ten thousand click operations and 15 ten thousand click operations configured for the page elements to be tested. If the stability requirement of the web page to be tested is general, the specified click times which are not large values can be set for the page elements to be tested on the web page to be tested, for example, 7 ten thousand or 8 ten thousand click operations are configured for the page elements to be tested. The embodiment of the invention does not limit the specific numerical value of the appointed click times configured aiming at the page elements to be tested.
In this embodiment, the specified number of clicks configured for the page element to be tested is actually to simulate a specified number of users to perform a click operation on the page element to be tested at the same time, for example, 10 click times are set, which means that 10 ten thousand users can be simulated to click on the page element to be tested on the corresponding web page to be tested at the same time. By adopting the mode, the stability of a plurality of web pages can be effectively tested, the workload of testers is saved, and the testing speed is improved.
Referring to step S104, the identifier of the page element to be tested and the corresponding server-related information may also be integrated into a json (javascript Object notification) file. When a trigger operation for starting the test is subsequently received, the identifier of the page element to be tested can be read from the JSON file, and the page element to be tested corresponding to the identifier of the page element to be tested in the corresponding server is called by adopting a preset interface of a webdriver test tool according to the relevant information of the server. The JSON file is adopted to integrate the identification of the page element to be tested and the corresponding server related information, so that the maintainability of the test program can be further improved.
In an embodiment of the present invention, after analyzing and determining the corresponding test result according to the response result, in order to conveniently and timely notify the tester of the test result, a corresponding test report may be generated according to the test result, and whether a test error occurs in the test result is determined, if no test error occurs, the generated test report may be directly displayed to the tester, and if a test error occurs, the generated test report and a prompt message indicating that the test result is in error may be displayed to the tester. Therefore, the testing personnel can know the testing result more intuitively.
In this embodiment, the test error generally includes a web page crash caused by a large number of clicks on a page element on the same web page, or exception information of the test program, and so on. And when a test error occurs, a test exception report can be sent to a tester, and the test exception report can contain information such as the line number and the code of the code with the exception, which are stored correspondingly. Therefore, the tester can know where the test error occurs more clearly, and the developer is promoted to adjust the stability of the web page in time.
The method for testing the stability of the web page can be applied to browser pages of different kernels, such as Chrome kernel browsers, Firefox kernel browsers, IE browsers and the like, and no matter which kernel browser is applied to, a webdriver testing tool can be used for testing in the process of testing the stability of the web page of the browser, and page elements in the web page of the browser are called based on a Selenium-webdriver protocol. In this embodiment, the webdriver test tool mainly works on a Linux server, and the Linux server is used as a platform for executing the test program.
In the embodiment of the present invention, the web page of the server may be an HTML5 page of the tested server, that is, an H5 page, and of course, the present invention may also be applied to other web pages, which is not specifically limited in this embodiment of the present invention.
Based on the same inventive concept, an embodiment of the present invention further provides a device for testing stability of a web page, and fig. 2 shows a schematic structural diagram of the device for testing stability of a web page according to an embodiment of the present invention. Referring to fig. 2, the apparatus 200 for testing the stability of a web page includes a configuration module 210, a calling module 220, a testing module 230, and an analyzing module 240.
The functions of the components or devices of the web page stability testing apparatus 200 and the connection relationship between the components will be described:
the configuration module 210 is adapted to determine a page element to be tested according to a pre-configured identifier of the page element to be tested, and configure a specified click frequency for the page element to be tested;
the calling module 220 is coupled with the configuration module 210 and is suitable for calling the page elements to be tested in the corresponding web pages by adopting a preset interface of a webdriver testing tool when receiving the trigger operation of starting the test;
the testing module 230 is coupled with the calling module 220 and is suitable for concurrently executing the click operation of the appointed click times on the called page element to be tested by utilizing a webdriver testing tool;
the analysis module 240 is coupled to the test module 230 and adapted to obtain a response result of the web page to the click operation, and analyze and determine a corresponding test result according to the response result.
In one embodiment of the invention, the page elements include at least one of text, pictures, audio, animation, video, URL address, and the like.
In an embodiment of the present invention, the identifier of the page element includes at least one of an ID, a name, a class attribute, a tittle attribute, and the like of the page element.
In an embodiment of the invention, the web page may comprise an HTML5 page.
The embodiment of the invention also provides another device for testing the stability of the web page, and fig. 3 shows a schematic structural diagram of the device for testing the stability of the web page according to another embodiment of the invention. Referring to fig. 3, the apparatus 200 for testing the stability of a web page includes an obtaining module 250, a storing module 260, an integrating module 270, a generating module 280, a determining module 290, a first presenting module 300, and a second presenting module 310, in addition to the above configuring module 210, the invoking module 220, the testing module 230, and the analyzing module 240.
The obtaining module 250 is adapted to, before the configuration module 210 determines the page element to be tested according to the identifier of the pre-configured page element to be tested, and configures the specified click times for the page element to be tested, obtain the web pages to be tested on the plurality of different servers, and determine the identifier of the page element to be tested included in the web page to be tested in each server.
A storage module 260, coupled to the obtaining module 250 and the configuring module 210 respectively, is adapted to store the determined identifier of the page element to be tested in a pre-established Selenium frame.
And the integration module 270 is adapted to integrate the identifier of the page element to be tested and the corresponding server related information into the JSON file.
The calling module 220 is coupled with the integrating module 270 and is further adapted to read the identifier of the page element to be tested from the JSON file when receiving a trigger operation for starting the test; and calling the page elements to be tested corresponding to the identifiers of the page elements to be tested in the corresponding server by adopting a preset interface of the webdriver testing tool according to the relevant information of the server.
The generating module 280 is coupled to the analyzing module 240 and adapted to generate a corresponding test report according to the test result.
The determining module 290 is coupled to the generating module 280 and adapted to determine whether a test error occurs in the test result.
The first displaying module 300 is coupled to the determining module 290, and adapted to directly display the generated test report to the tester if the determining module 290 determines that the test result does not have the test error.
The second displaying module 310 is coupled to the determining module 290, and is adapted to display the generated test report and the prompt message indicating that the test result is in error to the tester if the determining module 290 determines that the test result is in error.
According to yet another aspect of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform the method for stability testing of a web page in any of the embodiments above.
In accordance with yet another aspect of the present invention, there is also provided a computing device comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method for stability testing of a web page in any of the embodiments above.
According to any one or a combination of the above preferred embodiments, the following advantages can be achieved by the embodiments of the present invention:
by adopting the embodiment of the invention, when the stability of the web page is tested, the page element to be tested is determined according to the pre-configured identification of the page element to be tested, and the appointed click times are configured aiming at the page element to be tested. When a trigger operation for starting the test is received, calling the page elements to be tested in the corresponding web pages by adopting a preset interface of the webdriver test tool, and executing the click operation of the appointed click times to the called page elements to be tested concurrently. And finally, acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result. Therefore, the embodiment of the invention, by configuring the identifier of the page element to be tested in advance and setting the click times when the page element to be tested is tested, can utilize the webdriver test tool to concurrently execute the click operation of the specified click times on the page element to be tested so as to test the stability of the web page where the page element to be tested is located.
It is clear to those skilled in the art that the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.
The embodiment of the invention also provides A1 and a method for testing the stability of the web page, which comprises the following steps:
determining page elements to be tested according to pre-configured identifiers of the page elements to be tested, and configuring specified click times aiming at the page elements to be tested;
when a trigger operation for starting the test is received, calling a page element to be tested in a corresponding web page by adopting a preset interface of a webdriver test tool;
utilizing a webdriver testing tool to concurrently execute the clicking operation of the appointed clicking times on the called page element to be tested;
and acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
A2, the method according to A1, wherein the page elements to be tested are determined according to the pre-configured identifiers of the page elements to be tested, and before the designated number of clicks is configured for the page elements to be tested, the method further comprises:
acquiring web pages to be tested on a plurality of different servers, and determining identifiers of page elements to be tested contained in the web pages to be tested in each server;
and storing the determined identifier of the page element to be tested in a pre-established Selenium frame.
A3, the method according to A2, wherein the method further includes integrating the identifier of the page element to be tested and the corresponding server related information into a JSON file, and when a trigger operation of starting the test is received, calling the page element to be tested in the corresponding web page by using a preset interface of a webdriver test tool, and the method includes:
when a trigger operation for starting a test is received, reading the identifier of the page element to be tested from the JSON file;
and calling the page elements to be tested corresponding to the identifiers of the page elements to be tested in the corresponding server by adopting a preset interface of the webdriver testing tool according to the relevant information of the server.
A4, the method according to any one of A1-A3, wherein the page element includes at least one of:
text, picture, audio, animation, video, URL address.
A5, the method according to A4, wherein the identification of the page element includes at least one of:
ID, name, class attribute and tittle attribute of the page element.
A6, the method according to any one of A1-A3, wherein after analyzing and determining the corresponding test result according to the response result, the method further comprises:
generating a corresponding test report according to the test result;
judging whether the test result has a test error or not;
if not, directly displaying the generated test report to a tester;
and if so, displaying the generated test report and a prompt message that the test result is wrong to a tester.
A7, the method of any one of A1-A3, wherein the web page comprises an HTML5 page.
B8, a web page stability testing device, comprising:
the configuration module is suitable for determining page elements to be tested according to pre-configured identifiers of the page elements to be tested and configuring specified click times aiming at the page elements to be tested;
the calling module is suitable for calling the page elements to be tested in the corresponding web pages by adopting a preset interface of a webdriver testing tool when receiving the trigger operation of starting the test;
the test module is suitable for utilizing a webdriver test tool to concurrently execute the click operation of the appointed click times on the called page element to be tested;
and the analysis module is suitable for acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
B9, the device according to B8, wherein further comprising:
the acquisition module is suitable for acquiring web pages to be tested on a plurality of different servers and determining the identification of the page elements to be tested contained in the web pages to be tested in each server before the configuration module determines the page elements to be tested according to the identification of the page elements to be tested configured in advance and configures the appointed click times aiming at the page elements to be tested;
and the storage module is suitable for storing the determined identifier of the page element to be tested in a preset Selenium frame.
B10, the device according to B9, wherein further comprising:
the integration module is suitable for integrating the identification of the page element to be tested and the corresponding server related information into a JSON file;
the calling module is further suitable for reading the identifier of the page element to be tested from the JSON file when receiving a trigger operation for starting a test; and calling the page elements to be tested corresponding to the identifiers of the page elements to be tested in the corresponding server by adopting a preset interface of the webdriver testing tool according to the relevant information of the server.
B11, the apparatus according to any one of B8-B10, wherein the page element includes at least one of:
text, picture, audio, animation, video, URL address.
B12, the apparatus of B11, wherein the identification of the page element includes at least one of:
ID, name, class attribute and tittle attribute of the page element.
B13, the device according to any one of B8-B10, further comprising:
the generating module is suitable for generating a corresponding test report according to the test result;
the judging module is suitable for judging whether the test result has a test error or not;
the first display module is suitable for directly displaying the generated test report to a tester if the judgment module judges that the test result has no test error;
and the second display module is suitable for displaying the generated test report and the prompt message of the test result with the error to a tester if the judgment module judges that the test result has the test error.
B14, the apparatus of any one of B8-B10, wherein the web page comprises an HTML5 page.
C15, a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform a method of stability testing of a web page of any of a1-a 7.
D16, a computing device, comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform a method for stability testing of a web page of any of A1-A7.

Claims (10)

1. A method for testing the stability of a web page comprises the following steps:
determining page elements to be tested according to pre-configured identifiers of the page elements to be tested, and configuring specified click times aiming at the page elements to be tested;
when a trigger operation for starting the test is received, calling a page element to be tested in a corresponding web page by adopting a preset interface of a webdriver test tool;
utilizing a webdriver testing tool to concurrently execute the clicking operation of the appointed clicking times on the called page element to be tested;
and acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
2. The method of claim 1, wherein the page elements to be tested are determined according to the pre-configured identifiers of the page elements to be tested, and before the designated number of clicks is configured for the page elements to be tested, the method further comprises:
acquiring web pages to be tested on a plurality of different servers, and determining identifiers of page elements to be tested contained in the web pages to be tested in each server;
and storing the determined identifier of the page element to be tested in a pre-established Selenium frame.
3. The method of claim 2, further comprising integrating the identifiers of the page elements to be tested and the corresponding server-related information into a JSON file, and when a trigger operation for starting a test is received, calling the page elements to be tested in the corresponding web page by using a preset interface of a webdriver test tool, including:
when a trigger operation for starting a test is received, reading the identifier of the page element to be tested from the JSON file;
and calling the page elements to be tested corresponding to the identifiers of the page elements to be tested in the corresponding server by adopting a preset interface of the webdriver testing tool according to the relevant information of the server.
4. The method of any of claims 1-3, wherein the page element includes at least one of:
text, picture, audio, animation, video, URL address.
5. The method of claim 4, wherein the identification of the page element comprises at least one of:
ID, name, class attribute and tittle attribute of the page element.
6. The method of any of claims 1-3, wherein, after analyzing and determining the corresponding test result based on the response result, further comprising:
generating a corresponding test report according to the test result;
judging whether the test result has a test error or not;
if not, directly displaying the generated test report to a tester;
and if so, displaying the generated test report and a prompt message that the test result is wrong to a tester.
7. The method of any of claims 1-3, wherein the web page comprises an HTML5 page.
8. A web page stability testing apparatus, comprising:
the configuration module is suitable for determining page elements to be tested according to pre-configured identifiers of the page elements to be tested and configuring specified click times aiming at the page elements to be tested;
the calling module is suitable for calling the page elements to be tested in the corresponding web pages by adopting a preset interface of a webdriver testing tool when receiving the trigger operation of starting the test;
the test module is suitable for utilizing a webdriver test tool to concurrently execute the click operation of the appointed click times on the called page element to be tested;
and the analysis module is suitable for acquiring a response result of the web page to the click operation, and analyzing and determining a corresponding test result according to the response result.
9. A computer storage medium having computer program code stored thereon which, when run on a computing device, causes the computing device to perform a method of stability testing of a web page as claimed in any one of claims 1 to 7.
10. A computing device, comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method for stability testing of a web page of any of claims 1-7.
CN201910199821.5A 2019-03-15 2019-03-15 Method and device for testing stability of web page Pending CN111694725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910199821.5A CN111694725A (en) 2019-03-15 2019-03-15 Method and device for testing stability of web page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910199821.5A CN111694725A (en) 2019-03-15 2019-03-15 Method and device for testing stability of web page

Publications (1)

Publication Number Publication Date
CN111694725A true CN111694725A (en) 2020-09-22

Family

ID=72475388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910199821.5A Pending CN111694725A (en) 2019-03-15 2019-03-15 Method and device for testing stability of web page

Country Status (1)

Country Link
CN (1) CN111694725A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821447A (en) * 2021-10-18 2021-12-21 四川虹美智能科技有限公司 UI random test method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821447A (en) * 2021-10-18 2021-12-21 四川虹美智能科技有限公司 UI random test method and device
CN113821447B (en) * 2021-10-18 2023-05-12 四川虹美智能科技有限公司 UI random test method and device

Similar Documents

Publication Publication Date Title
CN107729475B (en) Webpage element acquisition method, device, terminal and computer-readable storage medium
CN107402880B (en) Test method and electronic equipment
CN107122301B (en) Interface testing method and device
US20140136944A1 (en) Real time web development testing and reporting system
CN109815119B (en) APP link channel testing method and device
JP6514244B2 (en) Difference detection device and program
CN105868256A (en) Method and system for processing user behavior data
US20190306032A1 (en) Automatic web page load detection
CN104765746B (en) Data processing method and device for mobile communication terminal browser
CN105550179B (en) Webpage collection method and browser plug-in
CN106484459B (en) Flow control method and device applied to JavaScript
CN107168844B (en) Performance monitoring method and device
EP4174656A1 (en) Dynamic intelligent log analysis tool
CN104683181A (en) Performance monitoring method, equipment and system
WO2016071917A1 (en) Social media analytics and response
CN114996103A (en) Page abnormity detection method and device, electronic equipment and storage medium
CN111258904A (en) Webpage element testing method and related device
CN111694725A (en) Method and device for testing stability of web page
US20220230113A1 (en) Digital chat conversation and virtual agent analytics
US10706108B2 (en) Field name recommendation
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
Amjad et al. Web application performance analysis of E-commerce sites in Bangladesh: an empirical study
JP6505849B2 (en) Generation of element identifier
US20160323399A1 (en) Method of and a system for monitoring web site consistency
CN107436841B (en) Page preview method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination