CN113297086A - Test case generation method and device, electronic equipment and storage medium - Google Patents

Test case generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113297086A
CN113297086A CN202110604542.XA CN202110604542A CN113297086A CN 113297086 A CN113297086 A CN 113297086A CN 202110604542 A CN202110604542 A CN 202110604542A CN 113297086 A CN113297086 A CN 113297086A
Authority
CN
China
Prior art keywords
interface
test
file
database
structured
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.)
Withdrawn
Application number
CN202110604542.XA
Other languages
Chinese (zh)
Inventor
何珍林
曾琳铖曦
吴海英
蒋宁
杨砚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mashang Consumer Finance Co Ltd
Original Assignee
Mashang Consumer Finance 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 Mashang Consumer Finance Co Ltd filed Critical Mashang Consumer Finance Co Ltd
Priority to CN202110604542.XA priority Critical patent/CN113297086A/en
Publication of CN113297086A publication Critical patent/CN113297086A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a test case generation method, a device, electronic equipment and a storage medium, wherein the test case generation method comprises the following steps: acquiring a data packet of a tested interface; processing the data packet according to a preset format to generate a structured interface file; acquiring a database operation file, wherein the database operation file comprises an operation instruction for operating a database; acquiring a general test script, wherein the general test script comprises a basic test instruction for testing the interface function; and generating a test case of the tested interface based on the structured interface file, the database operation file and the universal test script. The method and the device can avoid testers from manually modifying the test scripts, improve the generation efficiency of the test cases and improve the accuracy of the test cases. And moreover, the database of the system where the tested interface is located is subjected to related operation through the database operation file, so that the interface test can be normally carried out, and the stability of the interface test is further improved.

Description

Test case generation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of interface testing technologies, and in particular, to a method and an apparatus for generating a test case, an electronic device, and a storage medium.
Background
The interface test refers to the test of each component in the tested system and the interaction point between the tested system and the outside. Particularly, whether the data exchange, transmission and control management process at the interaction point is normal or not is tested. And testing whether the logic dependence relation among the components is normal.
In order to improve the efficiency of interface testing and reduce the error risk of manual interface testing, in the prior art, automatic interface testing is adopted. Specifically, Data Drive Testing (DDT) may be used. This is an automated test model. Before the automatic interface test, the tester writes test cases in advance. The test case includes test behavior and test data. The test behavior, i.e., the test script, is embodied in the form of code. The test data is specific scene data simulated in the test process, for example: account and password logged in, name and quantity of products purchased, etc. The test data is typically managed by a spreadsheet (e.g., excel) or Comma Separated Values (CSV) file. When the interface automatic test is needed, the tester calls the test case compiled in advance and substitutes the test case into the tested system, and whether the corresponding interface in the tested system passes the test is determined according to the running result of the tested system.
However, in the conventional interface automation test, once the test content changes, the tester needs to modify the test case manually. Thus, the modification is not only complicated, but also has low efficiency and is easy to make mistakes.
Disclosure of Invention
The embodiment of the application aims to provide a test case generation method, a test case generation device, electronic equipment and a storage medium, so as to improve the generation efficiency and accuracy of test cases.
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
a first aspect of the present application provides a test case generation method, where the method includes: acquiring a data packet of a tested interface, wherein the data packet contains functional parameters of the tested interface; processing the data packet according to a preset format to generate a structured interface file; acquiring a database operation file, wherein the database operation file comprises an operation instruction for operating a database, and the database is used for storing information generated by the tested interface; acquiring a general test script, wherein the general test script comprises a basic test instruction for testing the function of an interface so as to test the function of the tested interface based on the basic test instruction, the operation instruction and the functional parameters in the structured interface file; and generating a test case of the tested interface based on the structured interface file, the database operation file and the universal test script.
A second aspect of the present application provides a test case generation apparatus, including: the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a data packet of a tested interface, and the data packet contains functional parameters of the tested interface; the conversion module is used for processing the data packet according to a preset format to generate a structured interface file; the second acquisition module is used for acquiring a database operation file, wherein the database operation file comprises an operation instruction for operating a database, and the database is used for storing information generated by the tested interface; a third obtaining module, configured to obtain a universal test script, where the universal test script includes a basic test instruction for testing an interface function, so as to test a function of the interface under test based on the basic test instruction, the operation instruction, and a function parameter in the structured interface file; and the generating module is used for generating a test case of the tested interface based on the structured interface file, the database operation file and the universal test script.
A third aspect of the present application provides an electronic device comprising: a processor, a memory, a bus; the processor and the memory complete mutual communication through the bus; the processor is for invoking program instructions in the memory for performing the method of the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium comprising: a stored program; wherein the program, when executed, controls an apparatus in which the storage medium is located to perform the method of the first aspect.
Compared with the prior art, the test case generation method provided by the first aspect of the present application obtains the data packet of the tested interface, converts the data packet of the tested interface into the structured interface file according to the preset format, obtains the database operation file and the universal test script, and finally forms the structured interface file, the database operation file and the universal test script into the test case. When the test content changes, the change content can be obtained through the data packet of the tested interface, and then the content in the data packet is combined with the general test script and the database operation file to form a test case, so that a tester is prevented from manually modifying the test script, the generation efficiency of the test case can be improved, and the accuracy of the test case is improved. And the database of the system where the tested interface is located is operated relatively through the database operation file, so that the tested interface is more consistent with an actual test scene, the interface test can be carried out normally, and the stability of the interface test is further improved.
The test case generation apparatus provided by the second aspect, the electronic device provided by the third aspect, and the computer-readable storage medium provided by the fourth aspect of the present application have the same or similar advantageous effects as the test case generation method provided by the first aspect.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example and not by way of limitation in the figures of the accompanying drawings and in which like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a first flowchart illustrating a test case generation method according to an embodiment of the present application;
FIG. 2 is a second flowchart illustrating a test case generation method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a test case in an embodiment of the present application;
FIG. 4 is a first schematic structural diagram of a test case generating device in an embodiment of the present application;
FIG. 5 is a second schematic structural diagram of a test case generating device in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that: unless otherwise defined, technical or scientific terms used herein shall have the ordinary meaning as understood by those of skill in the art to which this application belongs.
Generally, in interface testing, when the content of a system under test changes, a tester needs to rewrite a test case, that is, the tester manually modifies a test script and test data according to the changed content. Here, the system under test may be a software program to be tested. The program may include a plurality of functional modules. And data interaction, transmission and the like are carried out among the plurality of functional modules. That is, it is necessary to test whether the interfaces between the respective functional modules are normal. When the content of the program changes, for example: the functions of some functional modules in the program are improved, or new functional modules are added in the program, or some existing functional modules are deleted in the program, at this time, the tester needs to manually modify the corresponding contents in the test cases and the test data according to the changed contents. The manual modification is troublesome and labor-consuming, errors are easy to occur, the generation efficiency and the accuracy of the test cases are reduced, and the test efficiency and the accuracy are further reduced.
In view of this, an embodiment of the present application provides a test case generation method, which obtains a data packet from a tested interface, combines the content in the data packet and a universal test script into a test case, and adds a database operation file capable of operating a database of a tested system into the test case. Therefore, when the test content changes, the test case can be generated through the data packet, the general test script and the database operation file in the tested interface, the test script is not required to be modified manually by a tester, the problems of low manual modification efficiency and high error rate can be solved, the generation efficiency and accuracy of the test case are improved, the efficiency and accuracy of the test are improved, the database of the tested system is operated correspondingly through the database operation file, the interface test can be carried out normally, and the stability of the interface test is improved.
In practical applications, the tested interface in the embodiment of the present application may refer to an interface between function modules in an application program to be tested. And the application to be tested may be an application in a web page, such as: the web page version chat software may also be an application program used in the mobile terminal, such as: a certain shopping APP. The specific type of application to be tested is not limited herein.
Next, a test case generation method in the embodiment of the present application will be described in detail.
Fig. 1 is a first flowchart of a test case generation method in an embodiment of the present application, and as shown in fig. 1, the method may include:
s101: and acquiring a data packet of the tested interface.
The obtained data packet of the tested interface contains the functional parameters of the tested interface. The function parameter is what needs to be modified in the test script.
For the interface test, when the test content changes, the request information sent to the server or the response information received from the server at the tested interface changes correspondingly. The changed data in the tested interface is the content needing to be modified in the existing test script. Therefore, directly acquiring the data packet from the tested interface is equivalent to acquiring the content to be modified in the test script.
When a test case needs to be generated, a tester needs to simulate the operation of a user to the application program or the system where the tested interface is located in advance. For example: the tested interface is an interface between a login module and a purchase module in a certain shopping application installed in the mobile phone. Before generating the test case, the tester needs to simulate the operation of logging in and purchasing once in the shopping application. Thus, the interface of the login module and the purchasing module in the shopping application generates corresponding request information and response information, and of course, other information may be generated, and the information may be referred to as a data packet. Therefore, after the tested interface runs once, a corresponding data packet is generated at the tested interface. When a test case needs to be generated, the data packet can be acquired from the tested interface, so that the generation of the test case is realized.
Of course, the operation of running the tested interface once in advance can also be realized by writing another set of script to perform simulation operation. The specific manner of pre-running the operation of the interface to be tested once is not limited herein.
Here, it should be noted that: in order to enable the data packet obtained from the tested interface to really play a role of modifying the test script, it is necessary to ensure that the result of the previous operation of the tested interface is normal. For example: if the refund function is added, the tested interface is the interface corresponding to the refund module. Then, only when the refund operation is completed and the refund function is performed, the subsequent data packet of the tested interface can be acquired, and the test case is generated. If the result of the operation of the tested interface once is not normal, the above example is continued, and the refund failure occurs, then the data packet of the tested interface can be obtained, but the test case is not generated based on the data packet any more, and the data packet is fed back to the research and development personnel, so that the research and development personnel can find out the error and correct the tested interface.
Here, it should be further explained that: the tested interface may refer to one interface or a plurality of interfaces. The number of the tested interfaces is not limited herein.
S102: and processing the data packet according to a preset format to generate a structured interface file.
After the data packet of the tested interface is obtained, because the data in the data packet is sorted according to the generation time, which is inconvenient to search, even some data are not needed when the test script is modified, the data packet needs to be processed according to a preset format to generate a structured interface file.
Specifically, data required when the test script is modified in the data packet is stored in a file according to a preset format, so that a structured interface file is obtained. In the structured interface file, all data are stored in a classified and ordered manner, so that subsequent use is facilitated. For example: and according to different interfaces, correspondingly storing the interface information, the request information and the response information of each interface in the structured interface file respectively.
Here, it should be noted that: the preset format can be set according to the requirements of different testers, and can also be set according to different test items. The specific content of the preset format is not limited herein.
S103: and acquiring a database operation file.
The database operation file comprises operation instructions for operating the database. And the database is used for storing the information generated by the tested interface.
Generally, after the tested interface is operated, corresponding information is generated, and the generated information is stored in a database of a system where the tested interface is located. For example, for the order placing interface, when a user or a tester operates in the order placing module, the order placing module generates corresponding order information, the order information is transmitted to a next module, such as a payment module, through the order placing interface, and the order information is stored in a database of an application program in which the order placing module is located.
When an interface test is performed, the information stored in the database often affects the normal performance of the test. For example: it is necessary to test whether the functions of 10 purchased notebook computers are normal, and the stock of the notebook computers in the database is only 5, so that even if the functions of the tested interface are normal, the test result indicates that the test is failed, and the accuracy of the test is affected. For another example: when the next test data needs to be replaced to continue the test, if the information generated in the test of the previous test data exists in the database, the information may influence the judgment of the test result in the next test. For another example: after the operation of purchasing 10 notebook computers is completed, the success of purchase is displayed, however, the order information in the database is not the information of purchasing 10 notebook computers, but the information of purchasing 10 clothes, if the information generated in the database is not checked, the purchasing function is mistakenly considered to be normal, and the accuracy of the test is further reduced. Therefore, in the process of generating the test case, the database operation file also needs to be acquired.
The database operation file contains an operation instruction for operating the database. For example: an operation instruction to add inventory, an operation instruction to empty data in the database, an operation instruction to check information stored in the database, and the like. The specific number, specific function, and specific type of the operation instructions in the database operation file are not limited here, and the operation instructions required for the test can be obtained from the existing instruction library according to the actual requirements of the test.
S104: and acquiring a universal test script.
The universal test script comprises a basic test instruction for testing the function of the interface so as to test the function of the tested interface based on the basic test instruction, the operation instruction and the functional parameters in the structured interface file.
The universal test script may be a pre-edited script. Unlike the existing test scripts, the universal test script does not need to be modified whether the test content is changed or not. In a generic test script, only some basic instructions are included, such as: send instructions, receive instructions, various processing instructions, and the like. The implementation of these basic instructions requires some details. For example: in order to enable the sending instruction to realize the sending function, specific contents to be sent need to be added to the sending instruction, and the specific contents can be acquired from the structured interface file. Therefore, the universal test script obtained here is a script including some basic instructions, and the sending function can be really realized only by combining with specific contents.
For example, it is assumed that the universal test script includes a sending instruction, a receiving instruction and various processing instructions, and a specific search request is stored in the structured interface file. The purpose of searching can be realized only by combining the sending instruction in the universal test script with the searching request in the structured interface file and sending the searching keyword in the test case to the server.
Here, it should be noted that: steps S101, S103, and S104 may be executed simultaneously, or may be executed in a certain order. The execution order of the three is not limited herein.
S105: and generating a test case of the tested interface based on the operation file of the structured interface file database and the universal test script.
Because the structured interface file contains the test data, namely, the module where the test interface is located is operated once, the test data can be input when the operation is carried out, and the data packet of the tested interface contains the test data, so that the test data also exists in the structured interface file. Therefore, the test case can be generated only based on the structured interface file, the database operation file and the general test script, and then the test case is directly substituted into the tested system, so that the interface test can be directly carried out. In this way, when the test content changes, the tester is not required to modify the test script manually. And the test case can be automatically generated through the data packet of the tested interface and the universal test script.
According to the test case generation method in the embodiment of the application, the data packet of the tested interface is obtained, the data packet of the tested interface is converted into the structured interface file according to the preset format, the database operation file and the general test script are obtained, and finally the structured interface file, the database operation file and the general test script form the test case. When the test content changes, the change content can be obtained through the data packet of the tested interface, and then the content in the data packet is combined with the general test script and the database operation file to form a test case, so that a tester is prevented from manually modifying the test script, the generation efficiency of the test case can be improved, and the accuracy of the test case is improved. And the database of the system where the tested interface is located is operated relatively through the database operation file, so that the tested interface is more consistent with an actual test scene, the interface test can be carried out normally, and the stability of the interface test is further improved.
Further, as refinement and extension of the test case generation method shown in fig. 1, an embodiment of the present application further provides a test case generation method. Fig. 2 is a flowchart illustrating a second method for generating a test case in an embodiment of the present application, and referring to fig. 2, the method may include:
s201: and when the test content changes, the test case generation device triggers a modification instruction.
S202: and the test case generating device acquires the data packet of the tested interface according to the received modification instruction.
Wherein, the modification instruction is used for indicating that the test content is changed, i.e. a new function is added to the application program to be tested, an old function is deleted or some functions are modified, etc. Alternatively, the modification instruction is used to indicate that the test case needs to be modified. No matter what the content specifically referred to by the modification instruction is, the data packet of the tested interface is started to be obtained, and then the triggering condition of a new test case is automatically generated.
When a modification instruction is received, the test content is changed, and then interface test needs to be carried out on the changed module, at this time, a data packet of the tested interface needs to be obtained, and then a test case is generated based on the data packet of the tested interface, so that automatic generation of the test case is realized.
In practical applications, the modification instruction may be triggered manually or automatically. For example: when the tester needs to test the tested interface, the tester simulates a user to execute one operation on the tested interface, and then manually triggers the modification instruction, or directly and automatically triggers the modification instruction after simulating the user operation. For another example: after the research and development personnel complete the design of the interface and upload the design of the interface, the research and development personnel can manually trigger the modification instruction, and can also automatically trigger the modification instruction according to the uploading operation of the interface. The specific triggering manner of the modification instruction is not limited herein.
In the process of acquiring the data packet of the tested interface, the data packet can be directly captured from the tested interface through a packet capturing tool, and the data packet sent by the tested interface can also be received. The specific manner of obtaining the interface data packet to be tested is not limited herein.
For the case of directly capturing the data packet from the tested interface by the packet capturing tool, specifically, the data packet can be directly captured from the tested interface by the packet capturing tool such as Charles tool, Fiddler tool, and the like. The call record of the tested interface can also be exported to be a data packet in a debugging mode of a developer of a browser (such as a Chrome browser, an Internet Explorer (IE) browser and the like). The selection of the bale plucking tool can be determined according to the actual test condition, and is not particularly limited herein.
For example: when the tested interface corresponds to a webpage application, firstly, a Chrome developer debugging mode is started through an operation key F12, and interaction with a server can be realized through input in a browser; then, under the debugging mode of the Chrome developer, finding out the call record of the tested interface in the webpage page, and then exporting.
In practical applications, the data package may be exported as a file in har format. Of course, files in other formats may be exported. The derived format can be determined according to the actual needs of the test, and is not particularly limited herein.
S203: and the test case generation device splits the data packet according to the request path to obtain the data packets of a plurality of interfaces.
When the tested interface is a plurality of interfaces, the data corresponding to the plurality of interfaces exists in the data packet of the tested interface. In order to facilitate reading and managing data of each interface, data corresponding to different interfaces in a data packet needs to be split. Different interfaces have unique request paths in the tested system, that is, different request paths and different interfaces have one-to-one correspondence, so that the data packets of the tested interfaces can be split according to the request paths to obtain the data packets of a plurality of interfaces.
For example, when a commodity purchase test is performed, the interface to be tested includes: login interface, ordering interface, payment interface. After the data packet of the tested interface is captured, the whole data packet can be split into the following parts by inputting [ a request path of a login interface, a request path of a next single interface and a request path of a payment interface ]: a data packet of a login interface, a data packet of a ordering interface and a data packet of a payment interface.
S204: the test case generation device respectively processes the data packets of the plurality of interfaces according to a preset format to generate a structured interface file of the plurality of interfaces.
When the structured interface file is generated, the java-jar generator xxx command can be executed in the command line through the structured interface file generating tool, and the data of different interfaces can be respectively stored in different structured interface files. For example: assuming that the data packet contains 3 interfaces of data, by executing the above command, under the same level directory of har files, 3 yaml files and 1 json file of formatting interface are automatically generated. The json file still contains data for 3 interfaces. Through the command, the work of manually compiling each structured interface file can be saved, and the generation efficiency of the structured interface file is improved.
And each structured interface file is stored in a yaml format, compared with a json format, the yaml format is simpler, and the method can support various programming languages, can support various platforms such as windows, linux and mac, and is extremely friendly to users.
In a structured interface file, may include: interface information, request information, response information, and the like.
The interface information may specifically include:
interface name (name, which is a Uniform Resource Locator (URL) by default, and which can be modified by the tester);
interface description (description, default is null, and the tester can add description information to the interface for the maintenance of the subsequent structured interface file).
The request information may specifically include:
request address (URL, i.e. http request address);
a request method (method, that is, http request method, which may be one of GET, POST, DELETE, PUT);
request content (request, that is, http request content, including a request header and a request body, which may be one of body, params, queryParams, formParams, and pathparams according to different access formats).
The response information may specifically include:
response data (respnse, including response code, response header and response body, is used as result check item, scope is current interface, in future test, for implementing the check of the operation result of current interface).
S205: the test case generation device replaces the target values in the structured interface files of the plurality of interfaces with the information extraction instruction.
Specifically, step S205 may include:
s2051: determining a target value in a structured interface file of a post-executed interface by the test case generating device;
s2052: the test case generation device replaces the target value in the structured interface file of the later-executed interface with the information extraction instruction.
Wherein the target value is present in a structured interface file of the previously executed interface. The information extraction instruction is used for extracting a target value in a structured interface file of the interface executed first.
The interface to be executed first is an interface corresponding to the module to be executed first in the test. The interface executed later is the interface corresponding to the module operated later in the test. For example, in a commodity purchase test, a login interface, an order placing interface and a payment interface are required. When the purchase operation is carried out, the login operation is executed firstly, then the ordering operation is executed, and finally the purchase operation is executed. Therefore, the login interface belongs to the interface executed first, and the ordering interface and the payment interface belong to the interface executed later.
When login operation is carried out, a user name and a password are required to be input for login, and a token value is returned by a server of the system to be tested after login is successful. When ordering operation is carried out, ordering can be carried out only when a token value is obtained. Similarly, when performing a payment operation, the token value is obtained first, and the payment can be performed. Here, the token value can be regarded as a target value. Of course, the target value may also be other types of values, and the type of the target value is not limited herein.
And finding out the target value in the structured interface file of the post-execution interface, and replacing the target value in the structured interface file of the post-execution interface with an information extraction instruction. The target value is stored in the structured interface file of the interface executed first, and when the target value is required to be used in the structured interface file of the interface executed later, the target value can be obtained only by calling the information extraction instruction. Therefore, once the test content is changed, only the related content of the interface executed first is modified, and the related content in the interface executed later can be directly called through the information extraction instruction, so that the modification times can be reduced, and the modification efficiency of the test case can be improved.
For example, assuming that the login user name and password are changed, in the embodiment of the present application, only the user name and password in the structured interface file of the login interface need to be modified, and the new user name and password, or the new token value corresponding to the new user name and password, may be directly called in the structured interface files of the ordering interface and the payment interface through the information extraction instruction, without modifying the user name and password.
In practical applications, the information extraction instruction may be an expression of JsonPath. JsonPath is an information extraction class library, which is a tool for extracting specified information from JSON documents. For example: after the login is successful, the login interface returns a random value token, and then a token is added to the data variables of the following single interface: "$ { $. name of login step. response.
S206: the test case generation device extracts common test data from the structured interface files of the plurality of interfaces to generate a configuration file.
Specifically, step S206 may include:
s2061: the test case generation device determines public test data with the occurrence frequency larger than the preset frequency in the structured interface files of the plurality of interfaces;
s2062: creating a configuration file by a test case generating device;
s2063: the test case generation device stores the public test data in a configuration file;
s2064: the test case generation device replaces common test data in the structured interface files of the plurality of interfaces with formatting parameters.
Some test data may appear in the structured interface file of different interfaces multiple times. For example: the user name and password are not only required for login operation, but also exist in the structured interface file of the login interface. When the ordering operation is performed, the token value returned by the server after the user name and the password are input needs to be relied on, so that the user name and the password also need to be stored in the structured interface file of the ordering interface. However, once the user name and the password are changed in the subsequent test, the token value is also changed, and then the contents in the structured interface files of various interfaces related to the user name and the password, such as the structured interface file of the login interface, the structured interface file of the order-placing interface, and the like, need to be modified respectively. In order to facilitate the modification of the file content when the test case changes, the test data with high frequency of occurrence in the structured interface files of the plurality of interfaces can be extracted and stored in the configuration file separately. For example: in the above example, the username and password are extracted and stored separately in the configuration file. Therefore, once the common test data is changed, only the content in the configuration file needs to be modified, so that the modification of the test case is facilitated.
Since the test data is generally located in the request body of the structured interface file, the common test data is extracted from the request body of the structured interface file and stored in the configuration file. Typically in the form of a key-value in a configuration file. And replacing the vacant position in the request body of the structured interface file with a formatting parameter so as to directly substitute the subsequent test data.
For example, assume that the contents of the part of the username: zhangsan, password:123456 in the request body in the structured interface file of the login interface. And "zhangsan" and "123456" are extracted and stored in the configuration file as common test data. The common test data in the request body, after being replaced with the formatting parameter, is username $ { username }, passcode $ { passcode }. The alternate formatting parameter is actually a universal character or space, etc.
Here, it should be noted that: in order to ensure that the test can be carried out correctly and orderly, the priority of each test data in the structured interface file is higher than that of the common test data in the configuration file. For example: for the purchase scenario of the goods, num:5 exists in the purchase step of the structured interface file, and num:10 exists in the configuration file. In the actual purchase test, num: $ num in the purchase request parameter needs to be set to 5.
Here, it should be further explained that: step S205 and step S206 may be executed simultaneously or not. The execution sequence of step S205 and step S206 is not limited herein.
S207: the test case generation device acquires a database operation file.
The database operation file comprises various files, and each file comprises a corresponding operation instruction. Through the operation instructions, the database of the tested system where the tested interface is located can be operated in a relevant mode. The type and number of the operation instructions contained in each file of the database operation file are not limited here, and can be increased or decreased according to the actual situation of the test. The operation instructions are all existing, and when the test case is generated, the operation instructions can be directly called from the corresponding positions.
Various files are set in the database operation file, operation instructions are stored in the various files, and management of the various operation instructions in the database operation file is facilitated through the setting of the various files.
Specifically, the database operation file may include one or more of the following files.
1. And leading the test file.
The pre-test file includes a pre-operation command. The pre-operation instruction is used for initializing preset parameters in the database.
The pre-test file is a file to be executed before the test. That is to say, the tested system where the tested interface is located can be operated before the test through the pre-operation instruction in the pre-test file, so that the test environment of the tested system can meet the test requirement, and the test stability is further improved.
For example, for an order placing interface in a certain shopping application, it is required to test whether the order placing function of the order placing interface is normal. Before the order function test is carried out, enough inventory needs to be added to a certain commodity used in the test through the inventory adding instruction in the preposed test file, such as: the test requires 5 laptops to be purchased and the inventory increase instruction requires increasing the inventory of the laptops to 5 or an integer greater than 5.
For example, for a search interface in a certain music application, it is required to test whether the search function of the search interface is normal. Before the search function test is carried out, songs searched during the test need to be added in the database through the stock adding instruction in the preposed test file. In this way, it can be ensured that the corresponding song is present when the search function test is performed.
Of course, the pre-operation instruction of the pre-test file not only refers to an instruction for increasing the stock, but also refers to other instructions that need to be pre-operated before the test, such as an instruction for restoring the default configuration of the system. Therefore, the specific content of the pre-operation command in the pre-test file is not limited herein.
2. And (5) post-arranging a test file.
The post-test file comprises a post-operation instruction. The post-operation instruction is used for emptying the data generated in the database.
The post-test file is a file to be executed after the test. That is to say, through the post operation instruction in the post test file, after the test is finished, the database of the tested system where the tested interface is located can be cleared, that is, the information generated by the database in the test is cleared, so that the influence of the information of the current test in the database on the next test is avoided, and the stability of the test is further improved.
For example, for an order placing interface in a certain shopping application, it is required to test whether the order placing function of the order placing interface is normal. After ordering by purchasing 5 notebook computers, ordering information of the 5 notebook computers is generated in the database. Then, after ordering by "purchase 5 clothes", ordering information of "5 clothes" is generated in the database. At this time, two ordering information of "5 notebook computers" and "5 pieces of clothes" exist in the database, and when payment is continuously performed based on the ordering information in the second test, payment may be performed for the order of "5 notebook computers", which may affect the stability of the test. Therefore, after the first test is completed, the order of the 5 notebook computers is deleted first through the post operation instruction in the post test file, and then the second test is performed.
3. The database verifies the file.
The database verification file comprises a verification instruction. The verification instruction is used for acquiring the information stored in the database and comparing the acquired information with the data in the structured interface file to determine whether the information stored in the database is correct.
The database verification file is a file executed in the test. That is to say, through the verification instruction in the database verification file, the information in the database of the system under test where the tested interface is located can be verified in the test, so as to comprehensively test whether the function of the tested interface is normal, thereby improving the stability of the test.
For example, for an order placing interface in a certain shopping application, it is required to test whether the order placing function of the order placing interface is normal. After ordering by purchasing 5 notebook computers, ordering information of the 5 notebook computers is generated in the database. The structured interface file in the test case contains test data used in the test, such as 'buying 5 notebook computers', the data at two places are compared, and the 5 notebook computers are both bought, which shows that the ordering function of the ordering interface is normal, and the order generated after ordering is normal. And if the test data stored in the structured interface file is 'purchase 3 notebook computers', the comparison shows that the purchase quantity is not correct, even if the order placing function is finally detected to be normal, the generated order information is not correct, and the order placing function has a problem.
In practical applications, the verification instruction is typically a Structured Query Language (SQL). Structured query language is a database query and programming language for accessing data and querying, updating and managing relational database systems.
S208: the test case generation device acquires a general test script.
The specific implementation manner of step S207 is the same as step S104, and is not described here again.
S209: and the test case generating device generates a case file according to the test content.
Specifically, step S209 may include:
s2091: the test case generation device determines a target interface from the plurality of interfaces according to the test content;
s2092: the test case generation device generates a case file based on the name of the target interface.
Different test contents correspond to different types and different numbers of interfaces. Taking the purchase test as an example, the purchase test involves a login interface, a receipt interface and a payment interface. Therefore, according to the test contents of the purchase test, three target interfaces, i.e., a login interface, a search interface, an order placement interface, a payment interface, and a refund interface, need to be determined from a plurality of interfaces, i.e., the login interface, the search interface, the order placement interface, the payment interface, and the refund interface. And further corresponding names of the login interface, the order placing interface and the payment interface, such as: logging in, ordering, paying and writing into a newly generated use case file.
And the structured interface file of the login interface, the structured interface file of the ordering interface and the structured interface file of the payment interface still exist independently, and the structured files comprising other interfaces exist independently. The structured interface files of which interfaces need to be used in the current test can call the content in the structured interface files of the corresponding interfaces according to the names in the case files of the current test. Therefore, when the test content changes, only the structured interface file of the corresponding interface is regenerated, the test case does not need to be modified, and the modification efficiency of the test case can be improved.
S210: and the test case generation device adds the name of the operation instruction in the database operation file into the case file.
Because the operation instruction in the database operation file includes a pre-operation instruction, a post-operation instruction and a verification instruction, when the name of the operation instruction is added to the use case file, the name of the operation instruction needs to be added to different positions of the use case file according to the function of the operation instruction. For the pre-operation instruction, the name of the pre-operation instruction may be added to the front position in the use case file, and for the verification instruction and the post-operation instruction, the name of the verification instruction and the name of the post-operation instruction may be added to the rear position in the use case file. The name of the operation instruction is added into the case file, once the operation instruction changes, only the corresponding name in the case file needs to be modified, and the complexity of modifying the test case can be simplified.
Fig. 3 is a schematic structural diagram of a test case in an embodiment of the present application, and as shown in fig. 3, a case file includes three parts, namely a test front part, a test main part, and a test back part. The test subject is the name of the different interfaces. The test case comprises a general test script, a structured interface file of each interface, a database operation file, a case file and a configuration file. When a test case is required to be used for testing, the universal test script runs, the case file not only operates the database through an operation instruction in the database operation file, but also calls the content in the structured interface file of the corresponding interface, and tests the tested system by combining with the public test data in the configuration file.
In one use case file, the following contents may be included:
test case name (name);
test preposition (setup, which may consist of one or more test steps);
test subjects (tests, which may consist of one or more test steps);
test post (may consist of one or more test steps).
For one of the above test steps, the following may be included:
step name (name);
step (a) refers to the name of the formatting interface file (api, which is used for finding and referring to the content in the formatting interface file, such as login in the form of login in the interface file, and reference in the form of api in the format of login in the interface file);
variable lists (variables, that is, test data, including but not limited to the request parameters in the formatted interface file, are constructed in the form of key-value, scope is the current step, and is used for interface request or check, for example, the request parameters of logic. yaml interface file are user name: $ { username }, password: $ { password }, and the variable lists include but not limited to user name: zhangsan, password: 123456);
a result check item (verify, scope is the current step, and is used to check the operation result of the current step, that is, by comparing the operation result with the result check item, it can be determined whether the current test passes or not).
For the result check item, the following may be included:
response codes (codes, e.g., 200, 400, 500, etc.);
response headers (headers, typically in key-value format);
a responder (body, typically in json standard format, e.g., { num:100 });
a responder (rawBody, typically in a string format, e.g., success).
In addition, various assertion keys can be defined for asserting the operation result. For example: equality IS $ EQ., greater than $ GT., less than $ LT., NULL IS $ IS _ NULL, NOT NULL IS $ NOT _ NULL, contains $ continue, belongs to $ IN., STARTs $ START _ width, ENDs $ END _ width, and so on. For example: and judging whether the two are equal, and asserting a username of Zhang III or a username of $ EQ. Zhang III on the common character string.
While for some other underlying data types, a data type may also be added before the field. The types of data referred to herein include: int, long, borolan, float, double, decimal, and the like. For example: an assertion for int type num (int)10 or num (int) $ EQ.10.
When generating a test case, in the variable list, fixed parameters may be set, for example: the username: and (5) opening the leaf. Variable parameters can also be set by built-in functions, such as: in nowTime: the form of $ { __ time () } sets the current time. The response of the last interface on which the current interface depends may also be set. For example: in a commodity purchase test scene, the purchased commodities need to pass login verification to obtain a token which is successfully logged in, and the token is used as a parameter for initiating a purchase request to be sent to a server side to complete the purchase. The purchase interface then needs to rely on the login interface. Token may be set in the variable list of the step of initiating the purchase: $ login step name, response, body, token }, the purchase can be achieved. While the token's acquisition method fully follows the specification of jsonPath.
S211: the test case generating device combines the case file, the structured interface files of different interfaces, the database operation file, the universal test script and the configuration file into a test case.
S212: the test case generating device adopts the test case to test the tested system where the tested interface is located, and generates a test report.
In a specific real-time process, a generic test script is run. Calling a corresponding operation instruction in the database operation file according to the name of the operation instruction in the case file, preprocessing the database of the tested system, verifying the database in the test, and cleaning the information in the database after the test is finished. And calling the functional parameters in the structured interface file of the corresponding interface according to the interface name in the case file, and testing the system to be tested. And finally, the tested feedback value is compared with the check value in the structured interface file of the corresponding interface to be predicated, and then a test report is generated.
When the test case generation device operates the interface to be tested based on the test case, since the interface operation and the database operation are included, in order to distinguish the interface operation from the database operation, the judgment can be made according to the url field. If starting with http or https, determining that the operation is an interface operation, and further initiating an http request to a backend server; if not http or https start, then a database operation is determined, a database connection is created, and the sql statement is executed.
In practical application, the test case can be executed by using the timing task, and a test report is output. For example: the method comprises the steps of accessing a test case into a continuous integration/Continuous Interaction (CICD) system, managing the test case through a GitLab, and scheduling the test case by using a Jenkins timing task to execute a test on an application program to be tested.
After the application program to be tested is tested by adopting the test case, a test report in an html format can be generated, and a tester can directly check the application program in Jenkins pages by adopting Jenkins' html plug-in.
In the test report, the following may be included: one or more of test name, test start time, test end time, test platform, total test number, success number, failure number, execution details of each test case, characters corresponding to test result codes and the like. The words used herein are commonly understood languages. In order to make the test result more intuitive, the test result can be presented in a pie chart form.
Finally, it is to be noted that: when a complete service needs to be tested, the case file in the test case used in the test contains the names of all the interfaces involved in the service. When testing is only performed on one or more interfaces, only the names of the interfaces are contained in the case file. The number of interface names in the use case file can be determined according to actual test requirements, and is not specifically limited here.
Based on the same inventive concept, as an implementation of the test case generation method, the embodiment of the application further provides a test case generation device. Fig. 4 is a first schematic structural diagram of a test case generation apparatus in an embodiment of the present application, and referring to fig. 4, the apparatus may include:
a first obtaining module 401, configured to obtain a data packet of a tested interface, where the data packet includes a functional parameter of the tested interface;
a conversion module 402, configured to process the data packet according to a preset format, and generate a structured interface file;
a second obtaining module 403, configured to obtain a database operation file, where the database operation file includes an operation instruction for operating a database, and the database is used to store information generated by the interface to be tested;
a third obtaining module 404, configured to obtain a universal test script, where the universal test script includes a basic test instruction for testing an interface function, so as to test a function of the interface under test based on the basic test instruction, the operation instruction, and a function parameter in the structured interface file;
a generating module 405, configured to generate a test case of the interface to be tested based on the structured interface file, the database operation file, and the universal test script.
Further, as refinement and extension of the test case generation apparatus shown in fig. 4, an embodiment of the present application further provides a test case generation apparatus. Fig. 5 is a schematic structural diagram of a test case generation apparatus in an embodiment of the present application, and referring to fig. 5, the apparatus may include:
a triggering module 501, configured to trigger a modification instruction when the test content changes.
A first obtaining module 502, configured to obtain a data packet of the interface under test according to the received modification instruction.
A conversion module 503, comprising: a first converting unit 5031 and a second converting unit 5032.
The first converting unit 5031 is configured to split the data packet according to the request path to obtain data packets of multiple interfaces.
The second converting unit 5032 is configured to process the data packets of the multiple interfaces according to the preset format, and generate a structured interface file of the multiple interfaces.
A replacing module 504, configured to replace the target values in the structured interface files of the multiple interfaces with the information extraction instruction.
And a data extraction module 505, configured to extract common test data from the structured interface files of the multiple interfaces, and generate a configuration file.
And a second obtaining module 506, configured to obtain the database operation file.
And a third obtaining module 507, configured to obtain the universal test script.
And the file generating module 508 is configured to generate a case file according to the test content.
An adding module 509, configured to add the name of the operation instruction in the database operation file to the use case file.
And the combination module 510 is used for combining the case file, the structured interface files of different interfaces, the database operation file, the general test script and the configuration file into a test case.
The test module 511 is configured to test the system under test where the interface under test is located by using the test case, and generate a test report.
Wherein, the test module 511 comprises: a parsing unit 5111, an execution unit 5112, an assertion unit 5113, and a report generation unit 5114.
The parsing unit 5111 parses the formatting parameters in the test case, and replaces the formatting parameters with the actual parameters. The formatting parameters may be: parameters in the structured interface file, parameters in the configuration file of the test case set, fixed parameters in the test case, data of other interfaces, built-in functions and the like. For example: api, logic, yaml was present in the test case. Yaml is automatically replaced with api when api is read by parsing unit 5111. For another example, the test case has the interface request parameter nowTime $ { __ time () }, and when the parsing unit 5111 reads the field, the built-in time function is automatically executed, and the value of nowTime is replaced with the current time.
And the execution unit 5112 is configured to initiate an http request to the server according to the test case, obtain a request result, and store the request result in the memory.
The assertion unit 5113 is configured to convert the request result into a json standard format, and compare the json standard format with response information in the test case to obtain an assertion result. The assertion unit 5113 asserts when it encounters a preset assertion key during assertion. For example: when a $ NOT _ NULL key is encountered, a method is performed to determine if the corresponding field value is NOT NULL. If the field value is judged to be null, the assertion is failed; if the field value is not determined to be null, the assertion passes.
And a report generating unit 5114, configured to generate a test report in html format according to the assertion result.
Here, it should be noted that: the above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
Based on the same inventive concept, the embodiment of the application also provides the electronic equipment. Fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application, and referring to fig. 6, the electronic device may include: a processor 601, a memory 602, a bus 603; the processor 601 and the memory 602 complete communication with each other through the bus 603; the processor 601 is configured to call the program instructions in the memory 602 to execute the test case generation method in one or more embodiments described above.
Here, it should be noted that: the above description of the embodiments of the electronic device is similar to the description of the embodiments of the method described above, and has similar advantageous effects to the embodiments of the method. For technical details not disclosed in the embodiments of the electronic device of the present application, refer to the description of the embodiments of the method of the present application for understanding.
Based on the same inventive concept, the embodiment of the present application further provides a computer-readable storage medium, where the storage medium may include: a stored program; and controlling the device where the storage medium is located to execute the test case generation method in one or more embodiments when the program runs.
Here, it should be noted that: the above description of the storage medium embodiment is similar to the description of the method embodiment described above, with similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the storage medium of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A test case generation method, the method comprising:
acquiring a data packet of a tested interface, wherein the data packet contains functional parameters of the tested interface;
processing the data packet according to a preset format to generate a structured interface file;
acquiring a database operation file, wherein the database operation file comprises an operation instruction for operating a database, and the database is used for storing information generated by the tested interface;
acquiring a general test script, wherein the general test script comprises a basic test instruction for testing the function of an interface so as to test the function of the tested interface based on the basic test instruction, the operation instruction and the functional parameters in the structured interface file;
and generating a test case of the tested interface based on the structured interface file, the database operation file and the universal test script.
2. The method of claim 1, wherein the database operation file comprises: at least one of a pre-test file, a post-test file, and a database verification file;
the preposed test file comprises a preposed operation instruction which is used for initializing preset parameters in the database;
the post-test file comprises a post-operation instruction, and the post-operation instruction is used for emptying data generated in the database;
the database verification file comprises a verification instruction, and the verification instruction is used for acquiring the information stored in the database and comparing the acquired information with the data in the structured interface file to determine whether the information stored in the database is correct.
3. The method of claim 1, wherein the interface under test comprises a plurality of interfaces; before the processing the data packet according to the preset format and generating the structured interface file, the method further includes:
splitting the data packet according to the request path to obtain data packets of a plurality of interfaces, wherein different request paths and different interfaces have one-to-one correspondence;
processing the data packet according to a preset format to generate a structured interface file, including:
and respectively processing the data packets of the plurality of interfaces according to a preset format to generate a structured interface file of the plurality of interfaces.
4. The method of claim 3, wherein the execution of a later-executing interface of the plurality of interfaces depends on the output of a first-executing interface; after the data packets of the plurality of interfaces are respectively processed according to the preset format to generate the structured interface files of the plurality of interfaces, the method further includes:
determining a target value in a structured interface file of a later-executed interface, wherein the target value exists in a structured interface file of an earlier-executed interface;
and replacing the target value in the structured interface file of the later-executed interface with an information extraction instruction, wherein the information extraction instruction is used for extracting the target value in the structured interface file of the earlier-executed interface.
5. The method according to claim 3, wherein after the processing the data packets of the plurality of interfaces according to the preset format to generate the structured interface files of the plurality of interfaces, the method further comprises:
determining common test data with the occurrence frequency greater than a preset frequency in a structured interface file of a plurality of interfaces;
creating a configuration file;
storing the common test data in the configuration file;
replacing the common test data in the structured interface files of the plurality of interfaces with formatting parameters;
the generating of the test case of the tested interface based on the structured interface file, the database operation file and the universal test script comprises:
and generating a test case of the tested interface based on the replaced structured interface file, the configuration file, the database operation file and the universal test script.
6. The method of claim 3, wherein prior to the generating test cases for the interface under test based on the structured interface file, the database operation file, and the generic test script, the method further comprises:
determining a target interface from a plurality of interfaces according to the test content, wherein different test contents correspond to different types and different numbers of interfaces;
generating a use case file based on the name of the target interface;
the generating of the test case of the tested interface based on the structured interface file, the database operation file and the universal test script comprises:
and generating the test case of the tested interface based on the case file, the structured interface file of the target interface, the database operation file and the universal test script.
7. The method of claim 6, wherein prior to the generating of the test case for the interface-under-test based on the use case file, the structured interface file for the target interface, the database operation file, and the generic test script, the method further comprises:
adding the name of the operation instruction in the database operation file into the use case file;
the generating of the test case of the tested interface based on the case file, the structured interface file of the target interface, the database operation file and the universal test script comprises:
and generating the test case of the tested interface based on the case file added with the name, the structured interface file of the target interface, the database operation file and the universal test script.
8. The method of any of claims 1-7, wherein after the generating test cases for the interface under test based on the structured interface file, the database operation file, and the generic test script, the method further comprises:
when the universal test script runs, operating the database based on the operation instruction in the database operation file, and testing the tested interface based on the functional parameters in the structured interface file;
and generating a test report according to the test result.
9. The method of claim 8, wherein the testing the interface under test based on the functional parameters in the structured interface file comprises:
calling a structured interface file of a target interface based on the name of the target interface in a case file, wherein the name of the target interface determined from a plurality of interfaces of the tested interface according to test contents is stored in the case file;
and testing the tested interface by adopting the functional parameters in the structured interface file of the target interface.
10. A test case generation apparatus, the apparatus comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a data packet of a tested interface, and the data packet contains functional parameters of the tested interface;
the conversion module is used for processing the data packet according to a preset format to generate a structured interface file;
the second acquisition module is used for acquiring a database operation file, wherein the database operation file comprises an operation instruction for operating a database, and the database is used for storing information generated by the tested interface;
a third obtaining module, configured to obtain a universal test script, where the universal test script includes a basic test instruction for testing an interface function, so as to test a function of the interface under test based on the basic test instruction, the operation instruction, and a function parameter in the structured interface file;
and the generating module is used for generating a test case of the tested interface based on the structured interface file, the database operation file and the universal test script.
11. An electronic device, comprising: a processor, a memory, a bus;
the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the method of any of claims 1 to 9.
12. A computer-readable storage medium, comprising: a stored program; wherein the program, when executed, controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 9.
CN202110604542.XA 2021-05-31 2021-05-31 Test case generation method and device, electronic equipment and storage medium Withdrawn CN113297086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110604542.XA CN113297086A (en) 2021-05-31 2021-05-31 Test case generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110604542.XA CN113297086A (en) 2021-05-31 2021-05-31 Test case generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113297086A true CN113297086A (en) 2021-08-24

Family

ID=77326412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110604542.XA Withdrawn CN113297086A (en) 2021-05-31 2021-05-31 Test case generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113297086A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760757A (en) * 2021-08-31 2021-12-07 成都安恒信息技术有限公司 Method and system for generating test model based on HAR file
CN117033249A (en) * 2023-10-08 2023-11-10 卓望数码技术(深圳)有限公司 Test case generation method and device, computer equipment and storage medium
CN117349188A (en) * 2023-12-05 2024-01-05 摩斯智联科技有限公司 Test case generation method and device based on large model

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760757A (en) * 2021-08-31 2021-12-07 成都安恒信息技术有限公司 Method and system for generating test model based on HAR file
CN113760757B (en) * 2021-08-31 2023-08-22 成都安恒信息技术有限公司 Method and system for generating test model based on HAR file
CN117033249A (en) * 2023-10-08 2023-11-10 卓望数码技术(深圳)有限公司 Test case generation method and device, computer equipment and storage medium
CN117349188A (en) * 2023-12-05 2024-01-05 摩斯智联科技有限公司 Test case generation method and device based on large model
CN117349188B (en) * 2023-12-05 2024-03-15 摩斯智联科技有限公司 Test case generation method and device based on large model

Similar Documents

Publication Publication Date Title
US10108535B2 (en) Web application test script generation to test software functionality
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
CN113297086A (en) Test case generation method and device, electronic equipment and storage medium
CN110427331B (en) Method for automatically generating performance test script based on interface test tool
CN111177005A (en) Service application testing method, device, server and storage medium
CN110825618B (en) Method and related device for generating test case
KR102274561B1 (en) Transaction system error detection method, apparatus, storage medium and computer device
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN110474900B (en) Game protocol testing method and device
CN108111364B (en) Service system testing method and device
CN112154420A (en) Automatic intelligent cloud service testing tool
CN109787974A (en) Message data stream generating method, device, computer equipment and storage medium
CN111240955A (en) Automatic testing method and device for Http interface, storage medium and electronic device
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN115658529A (en) Automatic testing method for user page and related equipment
WO2021061185A1 (en) Test automation of application
CN113760763A (en) Software testing method, device, server and system
CN115563002A (en) Data importing method and device, storage medium and computer equipment
CN111538659A (en) Interface testing method and system for service scene, electronic device and storage medium
CN111679976A (en) Method and device for searching page object
CN110334019B (en) Test method, test device and readable storage medium
CN111737114A (en) Login function testing method and device
CN116361793A (en) Code detection method, device, electronic equipment and storage medium
CN114490892A (en) Data transmission method and device based on datax
CN112817859A (en) Automatic testing method and system for intelligent connection platform

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210824