CN111159028B - Webpage testing method and device - Google Patents

Webpage testing method and device Download PDF

Info

Publication number
CN111159028B
CN111159028B CN201911340671.1A CN201911340671A CN111159028B CN 111159028 B CN111159028 B CN 111159028B CN 201911340671 A CN201911340671 A CN 201911340671A CN 111159028 B CN111159028 B CN 111159028B
Authority
CN
China
Prior art keywords
item
tested
test
field name
determining
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.)
Active
Application number
CN201911340671.1A
Other languages
Chinese (zh)
Other versions
CN111159028A (en
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.)
Wanghai Kangxin Beijing Technology Co ltd
Original Assignee
Wanghai Kangxin Beijing 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 Wanghai Kangxin Beijing Technology Co ltd filed Critical Wanghai Kangxin Beijing Technology Co ltd
Priority to CN201911340671.1A priority Critical patent/CN111159028B/en
Publication of CN111159028A publication Critical patent/CN111159028A/en
Application granted granted Critical
Publication of CN111159028B publication Critical patent/CN111159028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a webpage testing method and device, comprising the following steps: at least one test item is predetermined, and a test interface is configured according to the at least one test item; determining at least one item to be tested of the webpage to be tested from the at least one test item; acquiring at least one triggering event corresponding to each item to be tested; acquiring key parameters of each item to be tested in the test according to the trigger event; and for each item to be tested, calling the key parameters of the item to be tested by using the test interface to test, and generating a test report. The scheme can improve the testing efficiency of the webpage.

Description

Webpage testing method and device
Technical Field
The invention relates to the technical field of Internet, in particular to a webpage testing method and device.
Background
An internet product refers to a product made up of a series of web pages that provide some internet service to a user. After the development of the internet product is completed, various functions provided by a series of webpages included in the internet product need to be tested to check whether various functions provided on the webpages meet the requirements of users.
At present, the web page function test is usually completed by two workers in cooperation, mainly by the developer writing test codes used in the test, and then by the tester executing the test codes to complete the test of various functions of each web page. When the tester needs to change certain test items in the test process, the tester can complete the change of the test codes after communicating with the developer for a plurality of times, and the tester can test by using the modified test codes.
From the above description, it can be seen that in the web page testing process, the complex communication between the tester and the developer consumes a lot of time, resulting in low web page testing efficiency.
Disclosure of Invention
The embodiment of the invention provides a webpage testing method and device, which can improve the testing efficiency of webpages.
In a first aspect, the present invention provides a web page testing method, at least one test item is predetermined, and a test interface is configured according to the at least one test item, including:
determining at least one item to be tested of the webpage to be tested from the at least one test item;
acquiring at least one triggering event corresponding to each item to be tested;
acquiring key parameters of each item to be tested in the test according to the trigger event;
and for each item to be tested, calling the key parameters of the item to be tested by using the test interface to test, and generating a test report.
Preferably, the method comprises the steps of,
said configuring a test interface according to said at least one test item, comprising:
determining at least one operational action of at least one test item;
setting at least one operation parameter corresponding to each operation action;
determining at least one storage location, wherein each storage location is for storing at least one of the operating parameters;
setting description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position;
and packaging the storage position and the description information according to execution logic to generate a test interface.
Preferably, the method comprises the steps of,
after the predetermined at least one test item, before the determining at least one item to be tested of the web page to be tested from the at least one test item, further comprising:
determining at least one first field name and at least one second field name corresponding to each test item in the test process;
determining the arrangement sequence of the at least one first field name and the at least one second field name according to the operation logic when the test item is tested;
sorting the at least one first field name and the at least one second field name according to the arrangement order;
the obtaining at least one triggering event corresponding to each item to be tested comprises the following steps:
for each item to be tested, according to the arrangement sequence, acquiring at least one trigger event corresponding to each first field name of the item to be tested;
the step of obtaining key parameters of each item to be tested during testing according to the trigger event comprises the following steps:
and aiming at each item to be tested, acquiring key parameters corresponding to each second field name of the item to be tested according to the arrangement sequence according to the at least one trigger event corresponding to the item to be tested.
Preferably, the method comprises the steps of,
the step of obtaining key parameters corresponding to each second field name of the item to be tested according to the arrangement sequence according to the at least one trigger event corresponding to the item to be tested, including:
when the at least one triggering event corresponding to the item to be tested is triggered according to the arrangement sequence, acquiring key parameters corresponding to each second field name of the item to be tested;
the step of calling the key parameters of the item to be tested by using the test interface for testing comprises the following steps:
and calling key parameters corresponding to each second field name of the item to be tested by using the test interface.
Preferably, the method comprises the steps of,
after determining at least one item to be tested of the web page to be tested from the at least one test item, the method further comprises:
setting a use case number of each item to be tested;
when at least one target use case number in the use case numbers is obtained, taking a target to-be-tested item indicated by the target use case number as a to-be-tested item, and executing the key parameter of the to-be-tested item called by the test interface to test.
In a second aspect, the present invention provides a web page testing apparatus, comprising:
an interface configuration module for pre-determining at least one test item and configuring a test interface according to the at least one test item;
the data management module is used for determining at least one item to be tested of the webpage to be tested from the at least one test item determined by the interface configuration module; acquiring at least one triggering event corresponding to each item to be tested; acquiring key parameters of each item to be tested in the test according to the trigger event;
the test processing module is used for calling the key parameters of the items to be tested, which are acquired by the data management module, by utilizing the test interface configured by the interface configuration module for each item to be tested, so as to test the key parameters and generate a test report.
Preferably, the method comprises the steps of,
the interface configuration module is used for determining at least one operation action of at least one test item;
setting at least one operation parameter corresponding to each operation action;
determining at least one storage location, wherein each storage location is for storing at least one of the operating parameters;
setting description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position;
and packaging the storage position and the description information according to execution logic to generate a test interface.
Preferably, the method comprises the steps of,
the data management module comprises: a field name management subunit, a trigger event management subunit and a parameter management subunit;
the field name management subunit is used for determining at least one first field name and at least one second field name corresponding to each test item during testing; determining the arrangement sequence of the at least one first field name and the at least one second field name according to the operation logic when the test item is tested; sorting the at least one first field name and the at least one second field name according to the arrangement order;
the trigger event management subunit is configured to obtain, for each item to be tested, at least one trigger event corresponding to each first field name of the item to be tested according to the arrangement sequence determined by the field name management subunit;
the parameter management subunit is configured to, for each item to be tested, obtain, according to the arrangement order, a key parameter corresponding to each second field name of the item to be tested according to the at least one trigger event corresponding to the item to be tested obtained by the trigger event management subunit.
In a third aspect, the present invention provides a storage medium comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor configured to invoke the machine-readable program to perform the web page testing method of any of the first aspects.
In a fourth aspect, the present invention provides a computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the web page testing method of any of the first aspects.
The embodiment of the invention provides a webpage test method and a webpage test device, which are used for determining to-be-tested items in a webpage to be tested based on predetermined test items, further acquiring a trigger event corresponding to each to-be-tested item during testing, and acquiring key parameters required to be invoked during testing the to-be-tested item based on the trigger event.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a web page testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a web page testing method according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of a web page testing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a web page testing device according to another embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
In the present technology, an internet product refers to a product composed of a series of web pages that provide a certain internet service to a user. After the development of the internet product is completed, various functions provided by a series of webpages included in the internet product need to be tested. By writing test codes, developers execute the test codes to complete the test of various functions of each webpage.
However, when the tester changes the test item to be tested, the test code cannot meet the test requirement of the tester. For example, due to product updates, older versions of test code cannot be applied to testing of newer versions of products. At this time, a developer needs to re-write a large amount of test code. Because the test code can not be completely tested for the webpage after each change, a tester needs to communicate with a developer to find out the abnormality in the test code, so that the developer can modify the test code until the test requirement of the tester can be met. Because a lot of time is consumed for the communication between the tester and the developer, the time for testing the web page is increased, and the efficiency of testing the web page is low.
The prior art approach results in inefficient web page testing because web page testing needs to be done by two workers in concert. In view of this feature, an embodiment of the present invention proposes a web page testing method, as shown in fig. 1, including:
step 101: predetermining at least one test item;
step 102: configuring a test interface according to the at least one test item;
step 103: determining at least one item to be tested of the webpage to be tested from the at least one test item;
step 104: acquiring at least one triggering event corresponding to each item to be tested;
step 105: acquiring key parameters of each item to be tested in the test according to the trigger event;
step 106: and for each item to be tested, calling the key parameters of the item to be tested by using the test interface to test, and generating a test report.
In the embodiment of the invention, the items to be tested in the webpage to be tested are determined based on the predetermined test items, so that the corresponding trigger event of each item to be tested is obtained, and the key parameters required to be invoked when the items to be tested are obtained based on the trigger event.
Wherein the test report includes: each item to be tested, a trigger event and key parameters corresponding to the item to be tested, and a test result of each item to be tested.
In order to implement an automated functional test of a web page, in an embodiment of the present invention, the configuring a test interface according to the at least one test item includes:
determining at least one operational action of at least one test item;
setting at least one operation parameter corresponding to each operation action;
determining at least one storage location, wherein each storage location is for storing at least one of the operating parameters;
setting description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position;
and packaging the storage position and the description information according to execution logic to generate a test interface.
In the embodiment of the invention, the operation actions to be executed when different test items are tested are different, and the operation parameters required by different operation actions are also different. For example, when testing a test item "input user name" in a web page to be tested, it is generally necessary to first execute a trigger for inputting the user name so that a speech frame is in an editable state, and then input the user name, where "trigger" and "input" are two operation actions to be executed when testing the test item "input user name". Therefore, in order to facilitate the use of corresponding operation parameters when testing items to be tested, the operation parameters with different types and different functions can be stored in different storage positions, and then the data stored in each storage position are described to form corresponding description information, so that the operation parameters are searched from the corresponding storage positions according to the description information. And then, according to execution logic during testing the items to be tested, packaging the storage positions and the corresponding description information to generate a test interface, so that the test interface is used for automatically testing the items to be tested in the test items.
In order to implement an automated functional test of a web page, in an embodiment of the present invention, after the predetermined at least one test item, before the determining at least one item to be tested of the web page to be tested from the at least one test item, further includes:
determining at least one first field name and at least one second field name corresponding to each test item in the test process;
determining the arrangement sequence of the at least one first field name and the at least one second field name according to the operation logic when the test item is tested;
sorting the at least one first field name and the at least one second field name according to the arrangement order;
the obtaining at least one triggering event corresponding to each item to be tested comprises the following steps:
for each item to be tested, according to the arrangement sequence, acquiring at least one trigger event corresponding to each first field name of the item to be tested;
the step of obtaining key parameters of each item to be tested during testing according to the trigger event comprises the following steps:
and aiming at each item to be tested, acquiring key parameters corresponding to each second field name of the item to be tested according to the arrangement sequence according to the at least one trigger event corresponding to the item to be tested.
In the embodiment of the invention, the test flow of the item to be tested can be divided into two stages, and the operation steps executed by each stage have different roles, so that in order to determine the sequence of the test flow, the test flow of the item to be tested can be divided into two parts, wherein the first part is a first field name corresponding to the operation step when the key parameters of the item to be tested are obtained, and the second part is a second field name corresponding to the obtained key parameters. And sequencing the first field names and the second field names according to the operation logic of the test flow to form a universal test case template, so that trigger events corresponding to each first field name and key parameters corresponding to each second field name when each item to be tested is tested are sequentially acquired according to the arrangement sequence of the first field names in the universal test case template, filling of the universal test case template is completed, and missing of the trigger events corresponding to a certain first field name and the key parameters corresponding to a certain second field name is avoided.
In order to realize automatic function testing of a web page, in an embodiment of the present invention, the obtaining, according to the at least one trigger event corresponding to the item to be tested, key parameters corresponding to each of the second field names of the item to be tested according to the arrangement sequence includes:
when the at least one triggering event corresponding to the item to be tested is triggered according to the arrangement sequence, acquiring key parameters corresponding to each second field name of the item to be tested;
the step of calling the key parameters of the item to be tested by using the test interface for testing comprises the following steps:
and calling key parameters corresponding to each second field name of the item to be tested by using the test interface.
In the embodiment of the invention, before acquiring the key parameters to be called when the automatic test of the items to be tested is realized, at least one trigger event corresponding to each first field name is required to be triggered in sequence according to the arrangement sequence of the first field names, so that the trigger of each trigger event can be completed according to the realization logic, and then the key parameters acquired after each trigger event is triggered are acquired. Because the key parameters corresponding to the second field names of different items to be tested are different, in order to test the appointed items to be tested, the test interface is required to call the key parameters corresponding to the second field names of the items to be tested, so that the appointed items to be tested can be automatically tested.
In order to meet different testing requirements of the testers, in an embodiment of the present invention, after determining at least one item to be tested of the web page to be tested from the at least one test item, the method further includes:
setting a use case number of each item to be tested;
when at least one target use case number in the use case numbers is obtained, taking a target to-be-tested item indicated by the target use case number as a to-be-tested item, and executing the key parameter of the to-be-tested item called by the test interface to test.
In the embodiment of the invention, the case number can be set for each item to be tested according to the test requirement, and when a tester wants to test part of items in each item to be tested, only the target case number of the target item to be tested in each item to be tested is required to be determined, so that the corresponding target item to be tested can be identified according to the target case number through the test interface, and then only the target item to be tested is tested.
In order to more clearly illustrate the technical solution and advantages of the present invention, the following detailed description of the web page testing method is provided in the embodiment of the present invention, as shown in fig. 2, and may specifically include the following steps:
step 201: at least one test item is predetermined.
Step 202: at least one operational action of at least one test item is determined.
Specifically, taking the typical test items "login", "input" and "click" in the web page as examples, for example, the test item "login" in the web page needs to be tested, and the required operation actions are "input user name in user name input field in target uniform resource locator URL", "input password in password input field in target uniform resource locator URL", and "click" button "," deposit log information "," deposit case report "and" start program ".
Step 203: at least one operation parameter corresponding to each operation action is set.
Specifically, in order to enable the operation actions of the item to be tested during testing, a corresponding operation parameter needs to be set for each operation action, so that the operation action is achieved by calling the operation parameter according to the operation logic.
Step 204: at least one storage location is determined, wherein each storage location is for storing at least one operating parameter.
In particular, the functions implemented by the different operating parameters are different, so that the operating parameters of the different functions may be stored in different locations in order to distinguish between the operating parameters of the different functions, uses, and in order to facilitate the invocation of the operating parameters.
Step 205: and setting the description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position.
In particular, to facilitate the definition of data stored in different storage locations, the data stored in the different storage locations may be described to form descriptive information for the storage locations.
Step 206: and packaging the storage position and the description information according to the execution logic to generate a test interface.
For example, the framework of a specifically generated test interface is shown in table 1 below:
TABLE 1
For example, in table 1, "Constant" is the identity of one storage location, and "Action" is the identity of another storage location. "store Constant information such as URL, user name, etc." is the description information of the data stored in the storage location "Constant".
The storage location "Action" in table 1 stores the operation actions of "login", "input" and "click" of typical test items of a service in a web page. Taking the test item "login" as an example, for example, the test item "login" in the web page needs to be tested, and the required operation actions are "input user name in user name input field in target uniform resource locator URL", "input password in password input field in target uniform resource locator URL", and "click" login "button.
Step 207: at least one first field name and at least one second field name corresponding to each test item in the test are determined.
Specifically, the test item is mainly divided into two stages during testing, the first stage is a process of acquiring a trigger event, and the second stage is a process of acquiring a key parameter based on the trigger event, so that, for convenience of testing, field names of matters required by different test stages can be divided into a first field name and a second field name.
Step 208: according to the operation logic during test of the test item, the arrangement sequence of at least one first field name and at least one second field name is determined.
Step 209: the at least one first field name and the at least one second field name are ordered in an order of arrangement.
Specifically, in order to facilitate testing according to the operation logic in the testing process, the first field names and the second field names with different testing purposes can be ordered, so that corresponding data can be obtained according to the arrangement sequence, and certain data used in the testing process can be avoided being omitted.
For example, according to the test requirements of the test item test, a general test case template in the format of the following table 2 can be designed:
TABLE 2
Case title URL Test procedure Operation action Operating element Parameter 1 Parameter 2 Parameter 3
Wherein, the field names in the first 5 columns in table 2 are the first field names, and the field names in the 6 th column to the 9 th column are the second field names.
Step 210: and determining at least one item to be tested of the webpage to be tested from the test items.
Specifically, the tester determines to-be-tested items to be tested in the to-be-tested webpage in advance in each test item. For example, among the test items "login", "input", and "click", the item to be tested "login" and the item to be tested "click" of the web page to be tested.
Step 211: setting the use case number of each item to be tested.
Specifically, in order to facilitate distinguishing between different items to be tested, a corresponding case number may be set for each item to be tested.
For example, the use case number of the item to be tested "logged in" is 1, and the use case number of the item to be tested "clicked" is 2.
Step 212: and aiming at each item to be tested, acquiring at least one trigger event corresponding to each first field name of the item to be tested according to the arrangement sequence of the first field names and the second field names.
Specifically, in order to avoid missing to acquire a trigger event corresponding to a certain first field name, the corresponding trigger events may be sequentially acquired according to the arrangement sequence of the first field names.
For example, the general test case templates after the trigger event corresponding to each first field name are obtained as shown in the following table 3:
TABLE 3 Table 3
Specifically, the trigger event corresponding to each first field name may be a trigger event input by a tester, or a trigger event obtained from a document input by a user, and then the trigger event is filled into a general test case template according to the corresponding first field name.
Step 213: and after at least one triggering event corresponding to the item to be tested is triggered according to the arrangement sequence, acquiring key parameters corresponding to each second field name of the item to be tested.
Specifically, because different trigger events have corresponding execution logic, after each trigger event is triggered according to the execution logic, namely the arrangement sequence, key parameters when the automatic function test is performed on the item to be tested can be obtained, corresponding key parameters are obtained according to each second field name and are filled into the universal test case template, and the first round test of the item to be tested can be completed.
Step 214: when at least one target case number in the case numbers is obtained, taking a target to-be-tested item indicated by the target case number as a to-be-tested item, calling key parameters corresponding to each second field name of the to-be-tested item by using a test interface, and generating a test report.
Specifically, in order to meet the testing requirements of testers at different moments, after the testers determine the items to be tested of the webpage to be tested, the target items to be tested to be finally tested can be screened from the items to be tested. In order to facilitate the test interface to determine the final test target to be tested item, the test interface can determine the final test target to be tested item target case number according to the case number of each to-be-tested item to inform the test interface of the to-be-tested target to be tested item test case, and the test interface can perform automatic test.
It is seen in the summary that,
1) And a tester with weak code function can improve the working efficiency by using an automatic test interface.
2) The developer and the tester can be combined into a person, so that the purpose of improving the efficiency of webpage testing is achieved.
3) If the testers change, the service can be quickly read and understood through the produced test report (wherein the test report comprises the key parameters of the items to be tested, the trigger event, the test process of the test interface, the test result and other data), and the automated test case can be maintained without reading other code segments. The problem of difficult maintenance of the automatic test case is solved.
As shown in fig. 3, an embodiment of the present invention provides a web page testing apparatus, including:
an interface configuration module 301, configured to pre-determine at least one test item, and configure a test interface according to the at least one test item;
a data management module 302, configured to determine at least one item to be tested of a web page to be tested from the at least one test item determined by the interface configuration module 301; acquiring at least one triggering event corresponding to each item to be tested; acquiring key parameters of each item to be tested in the test according to the trigger event;
the test processing module 303 is configured to, for each item to be tested, invoke the key parameter of the item to be tested obtained by the data management module 302 by using the test interface configured by the interface configuration module 301 to perform a test, and generate a test report.
In the embodiment of the invention, based on the test items predetermined by the interface configuration module, the data management module can determine the test items to be tested in the webpage to be tested, further acquire the corresponding trigger event when each test item to be tested is tested, and acquire the key parameters required to be invoked when the test item to be tested is tested based on the trigger event.
In one embodiment of the present invention, the interface configuration module is configured to determine at least one operation action of at least one test item;
setting at least one operation parameter corresponding to each operation action;
determining at least one storage location, wherein each storage location is for storing at least one of the operating parameters;
setting description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position;
and packaging the storage position and the description information according to execution logic to generate a test interface.
As shown in fig. 4, in an embodiment of the present invention, the data management module 303 includes: a field name management subunit 3031, a trigger event management subunit 3032, and a parameter management subunit 3033;
the field name management subunit 3031 is configured to determine at least one first field name and at least one second field name corresponding to each test item during testing; determining the arrangement sequence of the at least one first field name and the at least one second field name according to the operation logic when the test item is tested; sorting the at least one first field name and the at least one second field name according to the arrangement order;
the trigger event management subunit 3032 is configured to obtain, for each item to be tested, at least one trigger event corresponding to each first field name of the item to be tested according to the arrangement sequence determined by the field name management subunit 3031;
the parameter management subunit 3033 is configured to, for each item to be tested, obtain, according to the at least one trigger event corresponding to the item to be tested obtained by the trigger event management subunit 3032, a key parameter corresponding to each second field name of the item to be tested according to the arrangement sequence.
In an embodiment of the present invention, the data management module is configured to obtain key parameters corresponding to each of the second field names of the item to be tested after the at least one trigger event corresponding to the item to be tested is triggered according to the arrangement sequence;
and the test processing module is used for calling the key parameters corresponding to each second field name of the item to be tested by utilizing the test interface.
In an embodiment of the present invention, the data management module is further configured to set a case number of each of the to-be-tested items;
and the test processing module is used for taking a target item to be tested indicated by the target case number as an item to be tested when the data management module acquires at least one target case number in the case numbers, and executing the key parameter of the item to be tested, which is called by the test interface, for testing.
It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the web page testing apparatus. In other embodiments of the invention, the web page testing apparatus may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the units in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
The embodiment of the invention also provides a storage medium, which comprises: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the web page testing method of any of the above.
The embodiment of the invention also provides a computer readable medium, wherein the computer readable medium stores computer instructions, and the computer instructions, when executed by a processor, cause the processor to execute the webpage testing method of any one of the above.
Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Further, it should be apparent that the functions of any of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion unit connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion unit is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
It should be noted that not all the steps and modules in the above flowcharts and the system configuration diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
In the above embodiments, the hardware unit may be mechanically or electrically implemented. For example, a hardware unit may include permanently dedicated circuitry or logic (e.g., a dedicated processor, FPGA, or ASIC) to perform the corresponding operations. The hardware unit may also include programmable logic or circuitry (e.g., a general-purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The particular implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been illustrated and described in detail in the drawings and in the preferred embodiments, the invention is not limited to the disclosed embodiments, and it will be appreciated by those skilled in the art that the code audits of the various embodiments described above may be combined to produce further embodiments of the invention, which are also within the scope of the invention.

Claims (6)

1. A web page testing method, comprising:
at least one test item is predetermined, and a test interface is configured according to the at least one test item;
determining at least one item to be tested of the webpage to be tested from the at least one test item;
acquiring at least one triggering event corresponding to each item to be tested;
acquiring key parameters of each item to be tested in the test according to the trigger event;
for each item to be tested, calling the key parameters of the item to be tested by using the test interface to test, and generating a test report;
wherein said configuring a test interface according to said at least one test item comprises:
determining at least one operational action of at least one test item;
setting at least one operation parameter corresponding to each operation action;
determining at least one storage location, wherein each storage location is for storing at least one of the operating parameters;
setting description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position;
packaging the storage position and the description information according to execution logic to generate a test interface;
wherein after said predetermining at least one test item, before said determining at least one item to be tested of the web page to be tested from said at least one test item, further comprises:
determining at least one first field name and at least one second field name corresponding to each test item in the test process;
determining the arrangement sequence of the at least one first field name and the at least one second field name according to the operation logic when the test item is tested;
sorting the at least one first field name and the at least one second field name according to the arrangement order;
the obtaining at least one triggering event corresponding to each item to be tested comprises the following steps:
for each item to be tested, according to the arrangement sequence, acquiring at least one trigger event corresponding to each first field name of the item to be tested;
the step of obtaining key parameters of each item to be tested during testing according to the trigger event comprises the following steps:
and aiming at each item to be tested, acquiring key parameters corresponding to each second field name of the item to be tested according to the arrangement sequence according to the at least one trigger event corresponding to the item to be tested.
2. The web page testing method of claim 1, wherein,
the step of obtaining key parameters corresponding to each second field name of the item to be tested according to the arrangement sequence according to the at least one trigger event corresponding to the item to be tested, including:
when the at least one triggering event corresponding to the item to be tested is triggered according to the arrangement sequence, acquiring key parameters corresponding to each second field name of the item to be tested;
the step of calling the key parameters of the item to be tested by using the test interface for testing comprises the following steps:
and calling key parameters corresponding to each second field name of the item to be tested by using the test interface.
3. The web page testing method of any one of claim 1 to 2, wherein,
after determining at least one item to be tested of the web page to be tested from the at least one test item, the method further comprises:
setting a use case number of each item to be tested;
when at least one target use case number in the use case numbers is obtained, taking a target to-be-tested item indicated by the target use case number as a to-be-tested item, and executing the key parameter of the to-be-tested item called by the test interface to test.
4. A web page testing apparatus, comprising:
an interface configuration module for pre-determining at least one test item and configuring a test interface according to the at least one test item;
the data management module is used for determining at least one item to be tested of the webpage to be tested from the at least one test item determined by the interface configuration module; acquiring at least one triggering event corresponding to each item to be tested; acquiring key parameters of each item to be tested in the test according to the trigger event;
the test processing module is used for calling the key parameters of the items to be tested, which are acquired by the data management module, by utilizing the test interface configured by the interface configuration module for each item to be tested, so as to test the key parameters and generate a test report;
wherein, the interface configuration module is used for:
determining at least one operational action of at least one test item;
setting at least one operation parameter corresponding to each operation action;
determining at least one storage location, wherein each storage location is for storing at least one of the operating parameters;
setting description information corresponding to each storage position, wherein the description information is used for indicating the storage information of the storage position;
packaging the storage position and the description information according to execution logic to generate a test interface;
wherein, the data management module includes: a field name management subunit, a trigger event management subunit and a parameter management subunit;
the field name management subunit is used for determining at least one first field name and at least one second field name corresponding to each test item during testing; determining the arrangement sequence of the at least one first field name and the at least one second field name according to the operation logic when the test item is tested; sorting the at least one first field name and the at least one second field name according to the arrangement order;
the trigger event management subunit is configured to obtain, for each item to be tested, at least one trigger event corresponding to each first field name of the item to be tested according to the arrangement sequence determined by the field name management subunit;
the parameter management subunit is configured to, for each item to be tested, obtain, according to the arrangement order, a key parameter corresponding to each second field name of the item to be tested according to the at least one trigger event corresponding to the item to be tested obtained by the trigger event management subunit.
5. A computer device, comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor being configured to invoke the machine readable program to perform the web page testing method of any of claims 1 to 3.
6. A computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the web page testing method of any of claims 1 to 3.
CN201911340671.1A 2019-12-23 2019-12-23 Webpage testing method and device Active CN111159028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911340671.1A CN111159028B (en) 2019-12-23 2019-12-23 Webpage testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911340671.1A CN111159028B (en) 2019-12-23 2019-12-23 Webpage testing method and device

Publications (2)

Publication Number Publication Date
CN111159028A CN111159028A (en) 2020-05-15
CN111159028B true CN111159028B (en) 2023-08-01

Family

ID=70557951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911340671.1A Active CN111159028B (en) 2019-12-23 2019-12-23 Webpage testing method and device

Country Status (1)

Country Link
CN (1) CN111159028B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286790B (en) * 2020-09-27 2023-08-01 长沙市到家悠享网络科技有限公司 Full link testing method, device, equipment and storage medium
CN114978973B (en) * 2022-05-18 2023-05-09 宁畅信息产业(北京)有限公司 Communication interface testing method and device, testing machine and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011073983A1 (en) * 2009-12-15 2011-06-23 Seeker Security Ltd. Methods and systems of detecting and analyzing correlated operations in a common storage
WO2015049771A1 (en) * 2013-10-03 2015-04-09 株式会社日立製作所 Computer system
CN105094783A (en) * 2014-05-19 2015-11-25 腾讯科技(深圳)有限公司 Method and device for testing Android application stability
CN106528418A (en) * 2016-10-28 2017-03-22 广东浪潮大数据研究有限公司 Test method and device
CN108694115A (en) * 2017-04-06 2018-10-23 华为技术有限公司 A kind of processing method, equipment and the system of webpage test
CN109376078A (en) * 2018-09-25 2019-02-22 平安普惠企业管理有限公司 Test method, terminal device and the medium of mobile application

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528395B (en) * 2015-09-09 2019-08-23 阿里巴巴集团控股有限公司 The generation method and device of test case
CN105260318B (en) * 2015-11-25 2018-04-03 飞天诚信科技股份有限公司 A kind of automated testing method and device based on webpage
CN106547689B (en) * 2016-10-20 2019-03-01 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web
CN108628741B (en) * 2018-04-10 2021-10-01 平安科技(深圳)有限公司 Webpage testing method and device, electronic equipment and medium
CN109359050A (en) * 2018-11-15 2019-02-19 北京奇虎科技有限公司 Webpage test method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011073983A1 (en) * 2009-12-15 2011-06-23 Seeker Security Ltd. Methods and systems of detecting and analyzing correlated operations in a common storage
WO2015049771A1 (en) * 2013-10-03 2015-04-09 株式会社日立製作所 Computer system
CN105094783A (en) * 2014-05-19 2015-11-25 腾讯科技(深圳)有限公司 Method and device for testing Android application stability
CN106528418A (en) * 2016-10-28 2017-03-22 广东浪潮大数据研究有限公司 Test method and device
CN108694115A (en) * 2017-04-06 2018-10-23 华为技术有限公司 A kind of processing method, equipment and the system of webpage test
CN109376078A (en) * 2018-09-25 2019-02-22 平安普惠企业管理有限公司 Test method, terminal device and the medium of mobile application

Also Published As

Publication number Publication date
CN111159028A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN106339312B (en) API test method and system
US8589884B2 (en) Method and system for identifying regression test cases for a software
CN111459495B (en) Unit test code file generation method, electronic device and storage medium
US8904352B2 (en) Systems and methods for processing source code during debugging operations
CN108111364B (en) Service system testing method and device
CN111159028B (en) Webpage testing method and device
CN113448862B (en) Software version testing method and device and computer equipment
US20140047276A1 (en) Model-based testing of a graphical user interface
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN110990274A (en) Data processing method, device and system for generating test case
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN111181805B (en) Micro-service test baffle generation method and system based on test case
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN112579475A (en) Code testing method, device, equipment and readable storage medium
CN112069073A (en) Test case management method, terminal and storage medium
CN106557419B (en) Program testing method and device
CN108804889B (en) Website registration method and device
CN115146581A (en) Project management method, defect analysis method, related device and readable storage medium
CN113031995B (en) Rule updating method and device, storage medium and electronic equipment
CN111625459A (en) Application program testing method and device, computer equipment and storage medium
CN113836037B (en) Interface interaction testing method, device, equipment and storage medium
CN114564413B (en) Synchronous equipment testing method and device
CN114237622A (en) Code compiling method, device, platform and storage medium
CN113515905A (en) Method, device, medium and equipment for verifying correctness of resource attribute code allocation

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 801-2, Floor 8, Building 3, Yard 22, Ronghua Middle Road, Daxing District, Beijing Economic-Technological Development Area, Beijing 100176

Applicant after: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

Address before: Room 07, zone 2, building B, No. 12, Hongda North Road, Beijing Economic and Technological Development Zone, Beijing 100176

Applicant before: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant