CN113821451A - Test method, test device, electronic equipment and readable storage medium - Google Patents
Test method, test device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN113821451A CN113821451A CN202111398147.7A CN202111398147A CN113821451A CN 113821451 A CN113821451 A CN 113821451A CN 202111398147 A CN202111398147 A CN 202111398147A CN 113821451 A CN113821451 A CN 113821451A
- Authority
- CN
- China
- Prior art keywords
- test
- information
- end element
- pieces
- value pair
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Tests Of Electronic Circuits (AREA)
Abstract
The application provides a test method, a test device, an electronic device and a readable storage medium, wherein the test method comprises the following steps: acquiring N pieces of test key value pair information, wherein each piece of test key value pair information corresponds to a front-end element to be tested, each piece of test key value pair information comprises a test mark, the test mark is used for identifying whether the front-end element is the front-end element to be tested, and N is an integer greater than or equal to 1; obtaining N pieces of front-end element information corresponding to the N pieces of test key value pair information one by one according to the N pieces of test key value pair information; generating N test cases corresponding to the N pieces of front-end element information one by one according to the N pieces of front-end element information; and executing the N test cases to obtain N test results which are in one-to-one correspondence with the N test cases. By means of the setting of the test marks, the front-end element information corresponding to the front-end element to be tested can be conveniently obtained, the positioning and identifying efficiency of the front-end element to be tested is improved, and the testing efficiency of the front-end test is improved.
Description
Technical Field
The application relates to the technical field of internet, in particular to a testing method, a testing device, electronic equipment and a readable storage medium.
Background
The software test is a process of operating a program under specified conditions to find program errors, measure the software quality and evaluate whether the software can meet the design requirements, and provides important guarantee for the informatization development of various industries.
Software testing comprises two categories of front-end testing and back-end testing, and currently, the testing efficiency of the front-end testing is low, so that the further improvement of the overall software development efficiency is restricted.
Disclosure of Invention
The application aims to provide a testing method, a testing device, electronic equipment and a readable storage medium, which are used for solving the problem of low testing efficiency of front-end testing.
In a first aspect, an embodiment of the present application provides a testing method, including:
acquiring N pieces of test key-value pair information, wherein each piece of test key-value pair information corresponds to a front-end element to be tested, each piece of test key-value pair information comprises a test mark, the test mark is used for identifying whether the front-end element is the front-end element to be tested, and N is an integer greater than or equal to 1;
obtaining N pieces of front-end element information which are in one-to-one correspondence with the N pieces of test key value pair information according to the N pieces of test key value pair information;
generating N test cases corresponding to the N pieces of front-end element information one by one according to the N pieces of front-end element information;
and executing the N test cases to obtain N test results which are in one-to-one correspondence with the N test cases.
In a second aspect, an embodiment of the present application provides a testing apparatus, including:
the device comprises a first obtaining module, a first judging module and a second obtaining module, wherein the first obtaining module is used for obtaining N pieces of testing key value pair information, each piece of testing key value pair information corresponds to a front-end element to be tested, each piece of testing key value pair information comprises a testing mark, the testing mark is used for identifying whether the front-end element is the front-end element to be tested, and N is an integer greater than or equal to 1;
a second obtaining module, configured to obtain, according to the N test key value pair information, N pieces of front-end element information that are in one-to-one correspondence with the N test key value pair information;
the case construction module is used for generating N test cases which correspond to the N pieces of front-end element information one by one according to the N pieces of front-end element information;
and the test module is used for executing the N test cases to obtain N test results which are in one-to-one correspondence with the N test cases.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps in the test method as described above in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps in the test method according to the first aspect.
According to the testing method provided by the embodiment of the application, the front-end element information corresponding to the front-end element to be tested can be conveniently obtained by setting the testing mark, the positioning and identifying efficiency of the front-end element to be tested is improved, and the testing efficiency of the front-end test is improved.
Drawings
FIG. 1 is a flow chart of a testing method provided by an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a testing apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a testing method according to an embodiment of the present disclosure, and as shown in fig. 1, the testing method includes:
And 102, obtaining N pieces of front-end element information which are in one-to-one correspondence with the N pieces of test key value pair information according to the N pieces of test key value pair information.
And 103, generating N test cases corresponding to the N pieces of front-end element information one by one according to the N pieces of front-end element information.
And 104, executing the N test cases to obtain N test results which are in one-to-one correspondence with the N test cases.
By means of the setting of the test marks, the front-end element information corresponding to the front-end element to be tested can be conveniently obtained, the positioning and identifying efficiency of the front-end element to be tested is improved, and the testing efficiency of the front-end test is improved.
In the front-end interface, the same test flag is added to each front-end element to be tested, and the code structure of the front-end elements to be tested after the same test flag is added is set as follows:
<div style="display:flex;align-items:center;cursor:pointer;">
< span style = "color: rgb (22, 144, 255); "autotest =" exit "> edit >
< span style = "color: rgb (22, 144, 255); margin; 0px 10 px; "autotest =" enable "> Enable >
< span style = "color: rgb (22, 144, 255); "autotest =" resetpasssed "> reset password </span >
</div>
In the code structure, the test mark is an autotest, the mark value of the test mark in the first span label is edge, the mark value of the test mark in the second span label is enable, and the mark value of the test mark in the third span label is resetpasscode; at this time, the test key-value pair information includes: an autotest-edge key-value pair, an autotest-enable key-value pair, and an autotest-resetpasscode key-value pair.
After the test mark is newly added to each front-end element to be tested, a plurality of front-end element information of the plurality of front-end elements marked by the tested attribute may be obtained in a traversal manner, for example, the manner of obtaining the plurality of front-end element information based on the traversal manner may be:
String autoXPATH = “//*[@autotest]”;
List<WebElement>allElements = driver.findElements(By.xpath(autoXPATH));
for (WebElement e : allElements) {
…
}
in the above code example of obtaining multiple front-end elements to be tested based on the traversal method, first, a node path information set (i.e., autoXPATH, which is String-type data) of the multiple front-end elements to be tested marked by a test mark is obtained, and then, according to a preset first element obtaining function and the obtained node path information set, multiple front-end element information (i.e., allElements, which is array-type data, where each array element in the array is one front-end element information) corresponding to the multiple front-end elements to be tested is obtained; and finally, traversing the allElements array by using a for loop.
After adding the test mark to each front-end element to be tested, the front-end element information of each front-end element may be obtained one by one, and an example of obtaining the front-end element information is as follows:
String stepXPATH = “//*[@autotest=’edit’]”;
WebElement e = driver.findElement(By.xpath(stepXPATH));
in the above example of obtaining a piece of front-end element information, first, the path node stepXPATH is obtained according to the test flag (i.e., autotest) and the flag value (i.e., edge), and then, according to the preset second element obtaining function and the obtained stepXPATH, the front-end element information e (i.e., the front-end element information corresponding to the first span tag in the foregoing example) corresponding to the path node stepXPATH is obtained.
It should be noted that the test marks and the corresponding mark values need to be correspondingly supplemented by a developer in the interface development process of the interface to be tested (including the front-end element to be tested).
The number of the test marks is greater than or equal to 1 and less than or equal to N, for example, in the case that the number of the test marks is two, the two test marks may be defined as autotest1 and autotest2, and in practice, the number and the name of the test marks may be adjusted adaptively by the user, which is not limited in the embodiment of the present application.
It should be noted that, in the N pieces of test key value pair information, any two pieces of test key value pair information are different; example 1, any two pieces of test key-value pair information are an autotest-enable key-value pair and an autotest-resetpasscode key-value pair (in the case of the same test mark, corresponding mark values are different); example 2, any two pieces of test key-value pair information are an autotest1-enable key-value pair and an autotest 2-resetpassswered key-value pair (in the case of different test marks, the corresponding mark values are different), and example 3, any two pieces of test key-value pair information are an autotest1-enable key-value pair and an autotest2-enable key-value pair (in the case of different test marks, the corresponding mark values are the same).
Optionally, the front-end element information includes at least one of M attribute names and a default attribute value corresponding to each attribute name, where M is an integer greater than or equal to 1;
generating N test cases according to the N front-end element information, wherein the method comprises the following steps:
acquiring an attribute name and a default attribute value corresponding to target front-end element information, wherein the target front-end element information is any one of the N pieces of front-end element information;
and generating a test case corresponding to the target front-end element information according to the attribute name and the default attribute value corresponding to the target front-end element information.
Through the setting, in the test case construction process, the setting of the default attribute value is utilized, namely, different default values are respectively given to a plurality of attribute names included in the front-end element information, so that the attribute assignment process is simplified, the construction efficiency of the test case is improved, and the test efficiency of the front-end test is further improved.
It should be noted that the attribute names and the number of attribute names included in the two front-end element information corresponding to any two front-end elements may be the same, partially the same, or completely different; for example:
example 1, the first front-end element information includes a property name a1 and a property name B1, and the second front-end element information includes a property name C1 (completely different).
Example 2, the third front-end element information includes a property name a2 and a property name B2, and the fourth front-end element information includes a property name B2 (partially identical).
Example 3, the fifth front-end element information includes a property name A3, and the sixth front-end element information includes a property name A3 (identical).
For example, a front-end element to be tested is set as a personnel form, the personnel form includes five attributes, and the attribute names corresponding to the five attributes are: user name, mobile phone number, belonging mechanism, post and role; setting a default attribute value corresponding to a user name as Zhang III, a default attribute value corresponding to a mobile phone number as 188 XXXXXXXXX, a default attribute value corresponding to an organization to which the mobile phone belongs as an emergency command post, a default attribute value corresponding to a post as a total team leader, and a default attribute value corresponding to a role as a system administrator.
Referring to the above example, if in the expected constructed test case, only the test attribute value corresponding to the user name is required to be lifour, in the process of constructing the test case, the tester only changes the attribute value of the user name from zhang to lifour, and can complete the assignment process in the process of constructing the test case, compared with the mode of manually assigning the five attribute names by the tester (when constructing the test case, the attribute value corresponding to a certain attribute name is not allowed to be null, so that, in the case of adopting manual assignment, the tester needs to complete the assignment operation of the mobile phone number, the affiliated mechanism, the post and the role in addition to the assignment of the user name), the default assignment mode for each attribute name can greatly simplify the assignment process in the process of constructing the test case, and improve the construction efficiency of the test case.
Preferably, the default attribute values are set to be uniformly controlled through the switch elements, that is, the switch elements are started in the test process, so that each attribute value of the front-end element to be tested obtains a corresponding default attribute value, and after the test is completed, the switch elements are closed, so that each attribute value of the front-end element to be tested is recovered to be normal (set to be null or set to be a default reference value).
Optionally, the front-end element information includes at least one of boundary information and expected result information.
The boundary information may be understood as a test determination condition in the test case building process, for example, if the maximum length of the character of the input text box is set to be 50, when the test case is the maximum length of the character of the test input text box, the boundary information is 50.
For example, the code structure of the boundary information may be:
<form>
<input type='hidden' name='maxlength' value='50'>
</form>
as shown in the code structure of the above boundary information, maxlength is used to describe the purpose of the boundary information, i.e. the boundary information can be understood as the maximum length of an element, and the maximum length is 50; as for the hidden identifier, the hidden identifier is used for hiding the boundary information in the front-end interface to be tested, so that the tester can quickly acquire the content to be tested without interfering with the interface layout of the front-end interface to be tested, and the test case construction efficiency of the tester is improved.
Further, based on the boundary information, a test case may be constructed, in which lengths 40, 50, and 51 are respectively assigned to front-end elements corresponding to the boundary information, and it is determined whether the front-end elements corresponding to the boundary information are normal in the case of the lengths 40 and 50, and whether the front-end elements corresponding to the boundary information display prompt information with an input length exceeding a threshold in the case of the length 51.
It should be noted that, in practice, the content indicated by the boundary information may be adaptively adjusted, for example, a boundary value test (e.g., a maximum character length test shown in the above example, etc.), a comparison test (e.g., a size relationship between two variables, or an intersection relationship between different sets, etc.), etc., which is not limited in this embodiment of the present application.
The expected result information may be understood as a result expected after the event is executed or triggered, for example, if a click event trigger associated with a certain button is set, a preset Uniform Resource Locator (URL) is returned, and if the URL is specifically set as/traffic-quality-user/users/sign, the expected result information is/traffic-quality-user/users/sign.
For example, the code structure of the expected result information may be:
<form>
<input type='hidden' name='responseURL' ,
value='/traffic-quality-user/users/sign'>
< input type = 'hidden' name = 'responseMessage' value = 'creation success' >)
</form>
As shown in the code structure of the expected result information, the responseURL and responseMessage are used to describe the purpose of the expected result information, that is, the expected result information can be understood as a uniform resource locator for triggering or executing an expected return by some event, and corresponding return prompt information, where the uniform resource locator is specifically/traffic-quality-user/users/sign, and the return prompt information is "create success"; as far as hidden is concerned, this is understood to be a hidden identification for hiding the above-mentioned desired result information in the front-end interface to be tested.
Further, the test case generated based on the expected result information may be to trigger or execute an event corresponding to the expected result information, determine whether the returned prompt information is "creation successful", and determine whether the actually returned uniform resource locator is/traffic-quality-user/users/sign.
It should be noted that, in practice, the content indicated by the expected result information may be adaptively adjusted, for example, an event feedback test (such as an execution of an event or a trigger feedback test), a function test, and the like, which is not limited in this embodiment of the application.
For example, taking a click event corresponding to a popup as an example, a test case is generated based on expected result information, and a process of obtaining an actual value of a part of attributes in a certain popup element in the popup when the test case is executed may be that the actual value of the part of attributes in the popup element is obtained according to the following codes:
WebElement e = driver.findElement(By.xpath(stepXPATH));
String nodeText= e.getText();
as shown in the code, a popup element e is obtained according to a path node, and then an attribute value corresponding to the Text attribute of the popup element e is obtained according to the obtained popup element e; and then comparing the expected result information with the attribute value corresponding to the Text attribute, if the expected result information is the same as the attribute value corresponding to the Text attribute, judging that the test is successful, and if the expected result information is different from the Text attribute, judging that the test is failed.
Taking a click event corresponding to a popup as an example, a process of generating a test case based on expected result information and obtaining an actual value of a part of attributes in a certain popup element in the popup when the test case is executed may also be a process of simulating a click event corresponding to a popup based on a test tool and obtaining an attribute value corresponding to a Text attribute according to an adapted Application Programming Interface (API), and a subsequent comparison process thereof refers to the foregoing example, which is not described herein again.
In practice, the testing tool may be a curve (command line uniformity Resource), and the testing tool may be adaptively adjusted by a tester, which is not limited in the embodiment of the present application.
In addition, taking the click event corresponding to the popup as an example, the process of generating a test case based on the expected result information and executing the test case to obtain the actual value of the partial attribute in a certain popup element in the popup may also be that an adaptive application programming interface is used to connect a database and execute a query command to obtain the attribute value corresponding to the Text attribute in the development table information, and the subsequent comparison process refers to the foregoing example and is not described herein again.
Optionally, before the obtaining N pieces of test key-value pair information, the method further includes:
acquiring test table information of a preset database;
and updating at least one of the boundary information and the expected result information according to the test table information.
As described above, at least one of the boundary information and the expected result information is updated by using the test table information, so that the boundary information and the expected result information have excellent expandability, and the expandability of the overall test method is maintained.
It should be noted that the boundary information and the expected result information are both data dynamically stored in the test table of the database, and a tester can adjust the boundary information and the expected result information in the test table in real time based on actual needs.
The dynamic storage can be understood as that the target data is stored in the database, the target data is embodied in the form of variables in the interface to be tested, and the actual values corresponding to the variables of the interface to be tested are correspondingly changed under the condition that the target data of the database is changed. Exemplarily, the target data is set to be 3 in the database, the variable corresponding to the target data is day in the interface to be tested, and the value corresponding to the variable day is 3 at this time; if the target data is modified and the value of the target data is changed from 3 to 5, the value corresponding to the variable day is changed to 5 after the interface to be tested is reloaded. The target data includes boundary information and expected result information.
Optionally, the target test result is any one of the N test results;
the executing the N test cases to obtain N test results includes:
and under the condition that the target test result is successful, adding mark information into the test case corresponding to the target test result, wherein the mark information is used for marking and skipping the execution step of the test case corresponding to the target test result.
As described above, after the tester completes the construction of the plurality of test cases, the plurality of test cases are executed through the test program, in the execution process, if the test result of one of the test cases is a test failure, the test program is interrupted, after the test case to be tested fails is modified, the tester restarts the test program, and executes the plurality of test cases from the beginning.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a testing apparatus according to an embodiment of the present disclosure, and as shown in fig. 2, the testing apparatus 200 includes:
the first obtaining module 201 is configured to obtain N pieces of test key-value pair information, where each piece of test key-value pair information corresponds to one front-end element to be tested, each piece of test key-value pair information includes a test flag, the test flag is used to identify whether the front-end element is a front-end element to be tested, and N is an integer greater than or equal to 1.
A second obtaining module 202, configured to obtain, according to the N test key value pair information, N pieces of front-end element information that are in one-to-one correspondence with the N test key value pair information.
The use case constructing module 203 is configured to generate N test cases corresponding to the N pieces of front-end element information one to one according to the N pieces of front-end element information.
The test module 204 is configured to execute the N test cases to obtain N test results corresponding to the N test cases one to one.
Optionally, the front-end element information includes at least one of M attribute names and a default attribute value corresponding to each attribute name, where M is an integer greater than or equal to 1;
the use case construction module 203 comprises:
acquiring an attribute name and a default attribute value corresponding to target front-end element information, wherein the target front-end element information is any one of the N pieces of front-end element information;
and generating a test case corresponding to the target front-end element information according to the attribute name and the default attribute value corresponding to the target front-end element information.
Optionally, the front-end element information includes at least one of boundary information and expected result information.
Optionally, the testing apparatus further includes an updating module, configured to obtain test table information of a preset database before obtaining the N test key value pair information; and updating at least one of the boundary information and the expected result information according to the test table information.
Optionally, the test module 204 includes:
and under the condition that the target test result is successful, adding mark information into the test case corresponding to the target test result, wherein the target test result is any one test result in the N test results, and the mark information is used for marking and skipping the execution step of the test case corresponding to the target test result.
The test apparatus 200 in the embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in an electronic device.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 3, the electronic device includes: bus 301, transceiver 302, antenna 303, bus interface 304, processor 305, and memory 306. The processor 305 can implement the processes of the above-described test method embodiments, and achieve the same technical effects, and for avoiding repetition, the details are not described here.
In fig. 3, a bus architecture (represented by bus 301), bus 301 may include any number of interconnected buses and bridges, with bus 301 linking together various circuits including one or more processors, represented by processor 305, and memory, represented by memory 306. The bus 301 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 304 provides an interface between the bus 301 and the transceiver 302. The transceiver 302 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 305 is transmitted over a wireless medium via the antenna 303. further, the antenna 303 receives the data and transmits the data to the processor 305.
Alternatively, the processor 305 may be a CPU, ASIC, FPGA or CPLD.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the test method embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present application may be substantially or partially embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g. a mobile phone, a computer, a server, an air conditioner, or a second terminal device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. A method of testing, comprising:
acquiring N pieces of test key-value pair information, wherein each piece of test key-value pair information corresponds to a front-end element to be tested, each piece of test key-value pair information comprises a test mark, the test mark is used for identifying whether the front-end element is the front-end element to be tested, and N is an integer greater than or equal to 1;
obtaining N pieces of front-end element information which are in one-to-one correspondence with the N pieces of test key value pair information according to the N pieces of test key value pair information;
generating N test cases corresponding to the N pieces of front-end element information one by one according to the N pieces of front-end element information;
and executing the N test cases to obtain N test results which are in one-to-one correspondence with the N test cases.
2. The test method according to claim 1, wherein the front-end element information includes at least one of M attribute names, and a default attribute value corresponding to each attribute name, M being an integer greater than or equal to 1;
generating N test cases according to the N front-end element information, wherein the method comprises the following steps:
acquiring an attribute name and a default attribute value corresponding to target front-end element information, wherein the target front-end element information is any one of the N pieces of front-end element information;
and generating a test case corresponding to the target front-end element information according to the attribute name and the default attribute value corresponding to the target front-end element information.
3. The test method of claim 1, wherein the front-end element information comprises at least one of boundary information and expected result information.
4. The method of claim 3, wherein prior to the obtaining N test key-value pair information, the method further comprises:
acquiring test table information of a preset database;
and updating at least one of the boundary information and the expected result information according to the test table information.
5. The test method of claim 1, wherein a target test result is any one of the N test results;
the executing the N test cases to obtain N test results includes:
and under the condition that the target test result is successful, adding mark information into the test case corresponding to the target test result, wherein the mark information is used for marking and skipping the execution step of the test case corresponding to the target test result.
6. A test apparatus, comprising:
the device comprises a first obtaining module, a first judging module and a second obtaining module, wherein the first obtaining module is used for obtaining N pieces of testing key value pair information, each piece of testing key value pair information corresponds to a front-end element to be tested, each piece of testing key value pair information comprises a testing mark, the testing mark is used for identifying whether the front-end element is the front-end element to be tested, and N is an integer greater than or equal to 1;
a second obtaining module, configured to obtain, according to the N test key value pair information, N pieces of front-end element information that are in one-to-one correspondence with the N test key value pair information;
the case construction module is used for generating N test cases which correspond to the N pieces of front-end element information one by one according to the N pieces of front-end element information;
and the test module is used for executing the N test cases to obtain N test results which are in one-to-one correspondence with the N test cases.
7. The test apparatus according to claim 6, wherein the front-end element information includes at least one of M attribute names, and a default attribute value corresponding to each attribute name, M being an integer greater than or equal to 1;
the use case construction module comprises:
acquiring an attribute name and a default attribute value corresponding to target front-end element information, wherein the target front-end element information is any one of the N pieces of front-end element information;
and generating a test case corresponding to the target front-end element information according to the attribute name and the default attribute value corresponding to the target front-end element information.
8. The test device of claim 6, wherein the front-end element information comprises at least one of boundary information and expected result information.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the method according to any one of claims 1 to 5.
10. A readable storage medium, characterized in that it has stored thereon a program or instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111398147.7A CN113821451B (en) | 2021-11-24 | 2021-11-24 | Test method, test device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111398147.7A CN113821451B (en) | 2021-11-24 | 2021-11-24 | Test method, test device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113821451A true CN113821451A (en) | 2021-12-21 |
CN113821451B CN113821451B (en) | 2022-03-22 |
Family
ID=78919775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111398147.7A Active CN113821451B (en) | 2021-11-24 | 2021-11-24 | Test method, test device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113821451B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090204591A1 (en) * | 2008-02-11 | 2009-08-13 | Rauli Kaksonen | Method and arrangement for test case creation |
CN105260318A (en) * | 2015-11-25 | 2016-01-20 | 飞天诚信科技股份有限公司 | Automatic testing method and device based on web pages |
CN109117369A (en) * | 2018-08-01 | 2019-01-01 | 北京长城华冠汽车技术开发有限公司 | Method for generating test case executes method and device |
US20190065345A1 (en) * | 2017-08-24 | 2019-02-28 | Salesforce.Com, Inc. | Runtime expansion of test cases |
CN109558525A (en) * | 2018-12-12 | 2019-04-02 | 北京锐安科技有限公司 | A kind of generation method of test data set, device, equipment and storage medium |
CN111309619A (en) * | 2020-02-24 | 2020-06-19 | 苏宁云计算有限公司 | Method and device for automatically generating test case |
CN112527664A (en) * | 2020-12-18 | 2021-03-19 | 中国平安财产保险股份有限公司 | Method and device for generating test case, electronic equipment and storage medium |
CN112579466A (en) * | 2020-12-25 | 2021-03-30 | 深圳证券交易所 | Test case generation method and device and computer readable storage medium |
-
2021
- 2021-11-24 CN CN202111398147.7A patent/CN113821451B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090204591A1 (en) * | 2008-02-11 | 2009-08-13 | Rauli Kaksonen | Method and arrangement for test case creation |
CN105260318A (en) * | 2015-11-25 | 2016-01-20 | 飞天诚信科技股份有限公司 | Automatic testing method and device based on web pages |
US20190065345A1 (en) * | 2017-08-24 | 2019-02-28 | Salesforce.Com, Inc. | Runtime expansion of test cases |
CN109117369A (en) * | 2018-08-01 | 2019-01-01 | 北京长城华冠汽车技术开发有限公司 | Method for generating test case executes method and device |
CN109558525A (en) * | 2018-12-12 | 2019-04-02 | 北京锐安科技有限公司 | A kind of generation method of test data set, device, equipment and storage medium |
CN111309619A (en) * | 2020-02-24 | 2020-06-19 | 苏宁云计算有限公司 | Method and device for automatically generating test case |
CN112527664A (en) * | 2020-12-18 | 2021-03-19 | 中国平安财产保险股份有限公司 | Method and device for generating test case, electronic equipment and storage medium |
CN112579466A (en) * | 2020-12-25 | 2021-03-30 | 深圳证券交易所 | Test case generation method and device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113821451B (en) | 2022-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7475286B2 (en) | System and method for updating end user error reports using programmer defect logs | |
US11080305B2 (en) | Relational log entry instituting system | |
Alves et al. | BIMSL: A generic approach to the integration of building information models with real-time sensor data | |
CN111783103A (en) | Dependency management method and device based on Maven, electronic device and storage medium | |
US9886369B2 (en) | Dynamic data fabrication for database applications | |
CA2907208C (en) | System and method for developing business rules for decision engines | |
CN104679500B (en) | Method and device for realizing automatic generation of entity class | |
CN109726987B (en) | Event reporting method, device, equipment and computer readable storage medium | |
CN113076104A (en) | Page generation method, device, equipment and storage medium | |
CN107562459B (en) | Management system, interface generating/displaying/operating method, medium, and terminal | |
CN107943466B (en) | Database access statement generation method, device and equipment | |
US20230086854A1 (en) | Dynamically controlling case model structure using case fragments | |
US8661414B2 (en) | Method and system for testing an order management system | |
EP3113016A1 (en) | Tracing dependencies between development artifacts in a development project | |
CN109189688B (en) | Test case script generation method and device and electronic equipment | |
CN113342692B (en) | Automatic test case generation method and device, electronic equipment and storage medium | |
US20150026081A1 (en) | Method and system for managing standards | |
CN113377458A (en) | Plug-in management method and device, electronic equipment and storage medium | |
CN113821451B (en) | Test method, test device, electronic equipment and readable storage medium | |
US20110107318A1 (en) | Simplifying Maintenance of Large Software Systems | |
CN110866007B (en) | Information management method, system and computer equipment for big data application and table | |
CN112433783A (en) | Configuration method and related equipment | |
CN113158177A (en) | Dynamic measurement method, device, equipment and storage medium | |
JP2010072876A (en) | Rule creation program, rule creation method, and rule creation device | |
CN107704484B (en) | Webpage error information processing method and device, computer equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |