CN112559363A - Test case generation method, system, equipment and medium based on full link marking - Google Patents

Test case generation method, system, equipment and medium based on full link marking Download PDF

Info

Publication number
CN112559363A
CN112559363A CN202011537441.7A CN202011537441A CN112559363A CN 112559363 A CN112559363 A CN 112559363A CN 202011537441 A CN202011537441 A CN 202011537441A CN 112559363 A CN112559363 A CN 112559363A
Authority
CN
China
Prior art keywords
request
test
path
full link
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011537441.7A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011537441.7A priority Critical patent/CN112559363A/en
Publication of CN112559363A publication Critical patent/CN112559363A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

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 embodiment of the invention provides a test case generation method, a system, equipment and a computer medium based on full link marking, wherein the method comprises the following steps: acquiring a first test case of a target test object in an application library layer, wherein the first test case is any test case of the target test object in the application library layer; recording a request path corresponding to the first test case as a first full link request path; receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full link request path; and when the first full link request path is different from the second full link request path, generating a second test case according to the test request. The invention can automatically supplement test cases with different execution paths.

Description

Test case generation method, system, equipment and medium based on full link marking
Technical Field
The embodiment of the invention relates to the technical field of testing, in particular to a test case generation method, a test case generation system, test case generation equipment and a test case generation medium based on full link marking.
Background
In software testing work, a test case consists of test input data, execution conditions and output results corresponding to the execution conditions. The design of the test case is very important and is the basis for the correctness and effectiveness of the test execution. How to effectively design a test case is always a problem concerned by test workers. However, the existing test framework has the phenomena of low test case coverage rate and multiple test cases corresponding to the same execution path, and the test cases cannot be simplified quickly and effectively; second, test cases of different execution paths are difficult to automatically replenish.
Disclosure of Invention
In view of this, embodiments of the present invention provide a test case generation method, a test case generation system, a computer device, and a computer-readable storage medium based on full link labels, which are used to solve the problem that test cases with different execution paths are difficult to automatically supplement.
The embodiment of the invention solves the technical problems through the following technical scheme:
a test case generation method based on full link marking comprises the following steps:
acquiring a first test case of a target test object in an application library layer, wherein the first test case is any test case of the target test object in the application library layer;
recording a request path corresponding to the first test case as a first full link request path;
receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full link request path;
and when the first full link request path is different from the second full link request path, generating a second test case according to the test request.
Further, the recording the request path corresponding to the first test case as a first full-link request path includes:
acquiring a first parameter of the first test case from the case library layer;
generating a first full link request corresponding to the test case according to the first parameter;
and executing the test task corresponding to the first full link request, and acquiring a path corresponding to the first full link request.
Further, the executing the test task corresponding to the first full link request, and acquiring the path corresponding to the first full link request includes:
when a test task corresponding to the first full link request is executed, marking a code corresponding to the first full link request by using a first preset identification, wherein the first preset identification is a unique identification;
collecting the code marked by the first preset identification as the first full link request path.
Further, the receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full-link request path includes:
receiving and executing a test task corresponding to the test request;
when a test task corresponding to the test request is executed, marking a code corresponding to the test request by using a second preset identification, wherein the second preset identification is a unique identification;
and collecting the codes marked by the second preset identification as a second full link request path.
Further, when the first full-link request path is different from the second full-link request path, generating a second test case according to the test request includes:
generating a first request broken line path according to the path corresponding to the first full link request; generating a second request broken line path according to the path corresponding to the second full link request;
when the first request broken line path and the second request broken line path are different, determining that the second full link request path is different from the first full link request path;
when the second full link request path is different from the first full link request path, acquiring a second parameter of the test request;
and generating a second test case corresponding to the second full link request according to the second parameter.
Further, the determining that the second full-link request path is not the same as the first full-link request path when the first request polygonal line path and the second request polygonal line path are different comprises:
comparing and analyzing the first request broken line path and the second request broken line path by using a preset broken line path identification program to obtain a broken line path similarity value;
and when the broken line path similarity value exceeds a preset similarity threshold value, determining that the path corresponding to the second request is the same as the path corresponding to the first request.
Further, when the first full-link request path is different from the second full-link request path, after a second test case is generated according to the test request, the method further includes:
and writing the second test case into the case library layer.
In order to achieve the above object, an embodiment of the present invention further provides a test case generation system based on a full link label, including:
the test case acquisition module is used for acquiring a first test case of a target test object in an application library layer, wherein the first test case is any test case of the target test object in the application library layer;
a request path recording module, configured to record a request path corresponding to the first test case as a first full-link request path;
the request path recording module is further configured to receive a test request for the target test object, and obtain a request path record corresponding to the test request as a second full-link request path;
and the test case generation module is further used for generating a second test case according to the test request when the first full link request path is different from the second full link request path.
In order to achieve the above object, an embodiment of the present invention further provides a computer device, where the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the test case generation method based on full link marking as described above when executing the computer program.
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor, so as to cause the at least one processor to execute the steps of the test case generation method based on full link marking as described above.
According to the test case generation method, the test case generation system, the computer equipment and the computer readable storage medium based on the full link marker, provided by the embodiment of the invention, a first test case of a target test object in a case library layer is obtained, wherein the first test case is any test case of the target test object in the case library layer; recording a request path corresponding to the first test case as a first full link request path; receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full link request path; and when the first full link request path is different from the second full link request path, generating a second test case according to the test request. The scene which is not covered by the test case can be automatically collected, and the test cases of different execution paths can be automatically supplemented.
The invention is described in detail below with reference to the drawings and specific examples, but the invention is not limited thereto.
Drawings
FIG. 1 is a flowchart illustrating steps of a test case generation method based on full link tags according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a method for recording a request path corresponding to the first test case as a first full-link request path according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a method for executing a test task corresponding to the first full link request and obtaining a path corresponding to the first full link request according to a first embodiment of the present invention;
fig. 4 is a flowchart illustrating steps of a method for receiving a test request for the target test object and acquiring a request path record corresponding to the test request as a second full-link request path according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of a method for generating a second test case according to the test request when the first full-link request path is different from the second full-link request path according to a first embodiment of the present invention;
FIG. 6 is a flowchart illustrating steps of a method for determining whether a first requested polyline path is the same as a second requested polyline path according to a first embodiment of the present invention;
FIG. 7 is a schematic diagram of a program module of a test case generation system based on full link tags according to a second embodiment of the present invention;
fig. 8 is a schematic hardware structure diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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 invention.
Technical solutions between various embodiments may be combined with each other, but must be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a test case generation method based on full link tags according to an embodiment of the present invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is given by taking a computer device as an execution subject, specifically as follows:
as shown in fig. 1, the test case generation method based on the full link label may include steps S100 to S400, where:
step S100, a first test case of a target test object in a case library layer is obtained, wherein the first test case is any test case of the target test object in the case library layer.
In this embodiment, the case library layer stores a plurality of test cases of a plurality of test objects, where each test object corresponds to a plurality of test cases, and coverage areas of each test case are different. The first test case refers to a test case of a target test object which is already stored in the case library layer.
And step S200, recording the request path corresponding to the first test case as a first full link request path.
Specifically, a first full link request of the test case is generated by analyzing the test case, and a first full link request path is acquired by executing a test task corresponding to the first full link request.
In a specific embodiment, as shown in fig. 2, step S200 may further include:
step S201, obtaining a first parameter of the first test case from the case library layer.
In some embodiments, first parameters of the test case are stored in the case library layer in a text form, and the first parameters are used for generating the first full-link request, where the first parameters include request parameters of the first test case corresponding to the request, for example, url and other related parameters.
Step S202, generating a first full link request corresponding to the test case according to the first parameter.
Specifically, a full link refers to a link through which a complete data stream passes. For example, when shopping online, a data flow of a complete transaction from the order placement of a buyer to the final delivery is through many systems, such as an ERP system, a warehouse system, a distribution system, an end system, and the like. The systems are chained into a link through calling, and transaction data is circulated on the link. The link through which a complete data flow process passes is a full link. A full link request refers to a request that can initiate a complete data flow.
Step S203, executing a test task corresponding to the first full link request, and acquiring a path corresponding to the first full link request.
Specifically, the path corresponding to the request refers to a code covered when the request is executed, and the path corresponding to the first full link request refers to a code covered when the first full link request is executed.
In an exemplary embodiment, as shown in fig. 3, step S203 may further include:
step S2031, when executing the test task corresponding to the first full link request, marking a code corresponding to the first full link request with a first preset identifier, where the first preset identifier is a unique identifier.
For example, when executing a test task corresponding to a first full link request a, the code covered by the first full link request a when executing the first full link request a is marked with a first preset identifier "a". For the request path, assuming a total of 5 lines of code, the execution path may be that the first line of code, the second line of code, the third line of code, the fifth line of code, etc. are executed. For example, when the a test task corresponding to the first full link request a is executed, the first line code, the third line code and the fifth line code are executed, and the first line code, the third line code and the fifth line code are marked by using the first preset identifier "a". When the B test task corresponding to the first full link request B is executed, the first line of codes, the second line of codes and the fourth line of codes are executed, and the first line of codes, the second line of codes and the fourth line of codes are marked by using a first preset identifier 'B'.
Step S2032, collecting the code marked by the first preset identification as the first full link request path.
For example, for a first full link request a, an execution path marked with a first preset identifier "a" is obtained, that is, the path corresponding to the first full link request a is a first line code, a third line code, a fifth line code, and the path corresponding to the first full link request B is a first line code, a second line code, and a fourth line code.
Step S300, receiving a test request for the target test object, and acquiring a request path corresponding to the test request and recording the request path as a second full link request path.
In an exemplary embodiment, as shown in fig. 4, step S300 may further include:
step S301, receiving and executing a test task corresponding to the test request.
Step S302, when executing the test task corresponding to the test request, marking a code corresponding to the test request with a second preset identifier, where the second preset identifier is a unique identifier.
Specifically, under the condition that a test request C is received, a second preset identifier "C" is used to mark a path corresponding to the second full-link request C when a test task corresponding to the test request C is executed. Similarly, there are 5 lines of code for the request path, which is the execution of the first line of code, the second line of code, the third line of code, the fifth line of code, etc. For example, when the test request C is executed, the first line code, the third line code, and the fifth line code are executed, and the first line code, the third line code, and the fifth line code are marked using the first preset identification "C". When the test request D is executed, the second line of codes, the third line of codes and the fourth line of codes are executed, and the first line of codes, the second line of codes and the fourth line of codes are marked by using a first preset identifier 'D'.
Step S303, collecting the code marked by the second preset identifier as a second full link request path.
Specifically, the paths corresponding to the test request C are the first line code, the third line code and the fifth line code, and the paths corresponding to the test request D are the first line code, the second line code and the fourth line code.
Step S400, when the first full link request path is different from the second full link request path, generating a second test case according to the test request.
In an exemplary embodiment, as shown in fig. 5, step S400 may further include:
step S401, generating a first request broken line path according to the path corresponding to the first full link request; and generating a second request broken line path according to the path corresponding to the second full link request.
Specifically, the broken line path refers to a virtual broken line diagram generated according to a path corresponding to the request, for example, the virtual broken line diagram a is generated according to the first full-link sub-request a, and the virtual broken line diagram C is generated according to the second full-link request C.
Step S402, when the first request broken line path and the second request broken line path are different, determining that the second full link request path is different from the first full link request path.
In an exemplary embodiment, as shown in fig. 6, step S402 may further include:
step S4021, comparing and analyzing the first request broken line path and the second request broken line path by using a preset broken line path identification program to obtain a broken line path similarity value.
Step S4022, when the polyline path similarity value exceeds a preset similarity threshold, determining that the path corresponding to the second request is the same as the path corresponding to the first request.
Specifically, a preset broken line path identification program is used to compare and analyze a first request broken line path and a second request broken line path to obtain a broken line path similarity value, when the similarity value exceeds a preset similarity threshold, it is determined that a path corresponding to the second request is the same as a path corresponding to the first request, otherwise, the path is different, and in an exemplary embodiment, the preset similarity threshold is 90%. If the path corresponding to the test request is the same as the path corresponding to the first full link, the test request is indicated to be covered by the first full link request, that is, the test request has the same coverage as the first full link request, and the coverage is a measure for testing integrity and a measure for testing effectiveness. The coverage rate is represented by the executed code, the executed code is the same when the request is executed, the corresponding broken line path is also the same, the coverage rate is the same, the full link refers to a link through which a complete data circulation process passes, the longer the data circulation process is, the more the code is executed, therefore, the coverage rate can be improved as much as possible by the full link request, the first full link request is generated by setting the test case, and the test case is generated when the coverage rate of the test request is different from that of the first full link request, so that the test integrity of the generated test case can be ensured.
In addition, because the application library layer stores a plurality of test cases of full links, and a plurality of first full link requests correspondingly exist, when calculating the similarity value of the broken line path, the broken line path of the test request needs to be subjected to similarity value calculation with the broken line paths corresponding to the first full link requests corresponding to all the test cases in the application library layer. For example, there are a test case a and a test case B in the case library layer, there are a first full-link request a and a first full-link request B corresponding to the test case a, and the test request C needs to perform similarity calculation with the polygonal line path of the first full-link request a and also needs to perform similarity calculation with the polygonal line path of the first full-link request B, and similarly, the test request D also needs to perform similarity calculation with the polygonal line paths of the first full-link request a and the first full-link request B.
Step S403, when the second full link request path is different from the first full link request path, obtaining a second parameter of the test request.
Step S404, generating a second test case corresponding to the second full link request according to the second parameter.
Specifically, when the second full-link request path is different from the first full-link request path, a second parameter of the test request is obtained, the second parameter includes a request parameter and a return parameter, and a second test case is generated according to the request parameter and the return parameter. And generating a second test case according to the request parameter and the return parameter of the test request.
In some embodiments, after generating a second test case according to the test request when the first full-link request path is different from the second full-link request path, the method further includes:
and writing the second test case into the case library layer.
For example, when the paths corresponding to the test request D, the first full link request a, and the first full link request B are not the same, the second test case generated by the test request D is written into the case library layer.
In another embodiment, if the second full link request path is the same as the first full link request path, it indicates that the test request has been covered by the first full link request, that is, the test request has been covered by the first test case in the application library layer, and the test request and the first full link request corresponding to the first full link test request are merged and categorized.
The second test case is generated according to the test request corresponding to the target object, and the second test case is distinguished from the first test case in the case library layer. Therefore, a first test case of the target test object needs to be acquired, the coverage of executing the first test case is compared with the test execution request, and when the coverage of executing the first test case is different from the coverage of executing the test request, a second test case is generated according to the test request.
The method comprises the steps of obtaining a first test case of a target test object in a case library layer, wherein the first test case is any test case of the target test object in the case library layer; recording a request path corresponding to the first test case as a first full link request path; receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full link request path; and when the first full link request path is different from the second full link request path, generating a second test case according to the test request. Test cases with the same and similar execution paths are automatically screened and classified, repeated cases are avoided, and the test cases can be quickly and effectively simplified; the full link mark is combined with the coverage rate, so that scenes which are not covered by the test cases can be automatically collected, and the test cases of different execution paths can be automatically supplemented.
Example two
With reference to fig. 7, a program module diagram of the test case generation system based on the full link label is shown. In this embodiment, the test case generation system 20 based on the full link label may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the present invention and implement the test case generation method based on the full link label. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the test case generating system 20 based on the full link label in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
a test case obtaining module 200, configured to obtain a first test case of a target test object in an application library layer, where the first test case is any test case of the target test object in the application library layer;
a request path recording module 202, configured to record a request path corresponding to the first test case as a first full-link request path;
further, the request path recording module 202 is further configured to:
acquiring a first parameter of the first test case from the case library layer;
generating a first full link request corresponding to the test case according to the first parameter;
and executing the test task corresponding to the first full link request, and acquiring a path corresponding to the first full link request.
Further, the request path recording module 202 is further configured to:
when a test task corresponding to the first full link request is executed, marking a code corresponding to the first full link request by using a first preset identification, wherein the first preset identification is a unique identification;
collecting the code marked by the first preset identification as the first full link request path.
The request path recording module 202 is further configured to receive a test request for the target test object, and obtain a request path record corresponding to the test request as a second full-link request path;
further, the request path recording module 202 is further configured to:
receiving and executing a test task corresponding to the test request;
when a test task corresponding to the test request is executed, marking a code corresponding to the test request by using a second preset identification, wherein the second preset identification is a unique identification;
and collecting the codes marked by the second preset identification as a second full link request path.
The test case generating module 204 is further configured to generate a second test case according to the test request when the first full link request path is different from the second full link request path.
Further, the test case generation module 204 is further configured to:
generating a first request broken line path according to the path corresponding to the first full link request; generating a second request broken line path according to the path corresponding to the second full link request;
when the first request broken line path and the second request broken line path are different, determining that the second full link request path is different from the first full link request path;
when the second full link request path is different from the first full link request path, acquiring a second parameter of the test request;
and generating a second test case corresponding to the second full link request according to the second parameter.
Further, the test case generation module 204 is further configured to:
comparing and analyzing the first request broken line path and the second request broken line path by using a preset broken line path identification program to obtain a broken line path similarity value;
and when the broken line path similarity value exceeds a preset similarity threshold value, determining that the path corresponding to the second request is the same as the path corresponding to the first request.
Further, the test case generation module 204 is further configured to:
and when the first full link request path is different from the second full link request path, generating a second test case according to the test request, and writing the second test case into the case library layer.
EXAMPLE III
Fig. 8 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown in FIG. 8, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a full link label based test case generation system 20, which are communicatively connected to each other via a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the computer device 2. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In the present embodiment, the memory 21 is generally used to store an operating system installed in the computer device 2 and various types of application software, such as the program codes of the test case generating system 20 based on the full link label in the above embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 2. In this embodiment, the processor 22 is configured to run the program code stored in the memory 21 or process data, for example, run the test case generation system 20 based on the full link label, so as to implement the test case generation method based on the full link label according to the above embodiment.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the computer device 2 and other electronic apparatuses. For example, the network interface 23 is used to connect the computer device 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 8 only shows the computer device 2 with components 20-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the test case generation system 20 based on the full link flag stored in the memory 21 may be further divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 7 is a schematic diagram of program modules of a second embodiment for implementing the test case generation system 20 based on the full link label, in this embodiment, the test case generation system 20 based on the full link label may be divided into a test case obtaining module 200, a request path recording module 202, and a test case generating module 204. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the test case generation system 20 based on the full link label in the computer device 2. The specific functions of the program modules 200 and 204 have been described in detail in the second embodiment, and are not described herein again.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of the embodiment is used for storing the test case generation system 20 based on the full link label, and when being executed by the processor, the computer-readable storage medium implements the test case generation method based on the full link label of the embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A test case generation method based on full link marking is characterized by comprising the following steps:
acquiring a first test case of a target test object in an application library layer, wherein the first test case is any test case of the target test object in the application library layer;
recording a request path corresponding to the first test case as a first full link request path;
receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full link request path;
and when the first full link request path is different from the second full link request path, generating a second test case according to the test request.
2. The method according to claim 1, wherein recording the request path corresponding to the first test case as a first full-link request path comprises:
acquiring a first parameter of the first test case from the case library layer;
generating a first full link request corresponding to the test case according to the first parameter;
and executing the test task corresponding to the first full link request to acquire a path corresponding to the first full link request.
3. The method for generating test cases based on full link tags according to claim 2, wherein the executing the test task corresponding to the first full link request to obtain the path corresponding to the first full link request includes:
when a test task corresponding to the first full link request is executed, marking a code corresponding to the first full link request by using a first preset identification, wherein the first preset identification is a unique identification;
collecting the code marked by the first preset identification as the first full link request path.
4. The method for generating test cases based on full link labels according to claim 2, wherein the receiving a test request for the target test object, and acquiring a request path record corresponding to the test request as a second full link request path includes:
receiving and executing a test task corresponding to the test request;
when a test task corresponding to the test request is executed, marking a code corresponding to the test request by using a second preset identification, wherein the second preset identification is a unique identification;
and collecting the codes marked by the second preset identification as a second full link request path.
5. The method according to claim 4, wherein the generating a second test case according to the test request when the first full-link request path is different from the second full-link request path comprises:
generating a first request broken line path according to the path corresponding to the first full link request; generating a second request broken line path according to the path corresponding to the second full link request;
when the first request broken line path and the second request broken line path are different, determining that the second full link request path is different from the first full link request path;
when the second full link request path is different from the first full link request path, acquiring a second parameter of the test request;
and generating a second test case corresponding to the second full link request according to the second parameter.
6. The method for generating test cases based on full link labels according to claim 5, wherein the determining that the second full link request path is different from the first full link request path when the first request broken line path and the second request broken line path are different comprises:
comparing and analyzing the first request broken line path and the second request broken line path by using a preset broken line path identification program to obtain a broken line path similarity value;
and when the broken line path similarity value exceeds a preset similarity threshold value, determining that the path corresponding to the second request is the same as the path corresponding to the first request.
7. The method for generating the test case based on the full link label according to any one of claims 1 to 6, wherein when the first full link request path is different from the second full link request path, after generating the second test case according to the test request, the method further comprises:
and writing the second test case into the case library layer.
8. A test case generation system based on full link marking is characterized by comprising:
the test case acquisition module is used for acquiring a first test case of a target test object in an application library layer, wherein the first test case is any test case of the target test object in the application library layer;
a request path recording module, configured to record a request path corresponding to the first test case as a first full-link request path;
the request path recording module is further configured to receive a test request for the target test object, and obtain a request path record corresponding to the test request as a second full-link request path;
and the test case generation module is further used for generating a second test case according to the test request when the first full link request path is different from the second full link request path.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the full link markup based test case generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the full link markup based test case generation method of any one of claims 1 to 7.
CN202011537441.7A 2020-12-23 2020-12-23 Test case generation method, system, equipment and medium based on full link marking Pending CN112559363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011537441.7A CN112559363A (en) 2020-12-23 2020-12-23 Test case generation method, system, equipment and medium based on full link marking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011537441.7A CN112559363A (en) 2020-12-23 2020-12-23 Test case generation method, system, equipment and medium based on full link marking

Publications (1)

Publication Number Publication Date
CN112559363A true CN112559363A (en) 2021-03-26

Family

ID=75031545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011537441.7A Pending CN112559363A (en) 2020-12-23 2020-12-23 Test case generation method, system, equipment and medium based on full link marking

Country Status (1)

Country Link
CN (1) CN112559363A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778890A (en) * 2021-09-16 2021-12-10 平安银行股份有限公司 Code testing method and device, electronic equipment and storage medium
CN115065612A (en) * 2022-06-22 2022-09-16 上海哔哩哔哩科技有限公司 Testing method and device for full link voltage testing transformation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN111309635A (en) * 2020-03-26 2020-06-19 北京奇艺世纪科技有限公司 Test case generation method, device, server and storage medium
CN111708712A (en) * 2020-06-24 2020-09-25 北京自如信息科技有限公司 User behavior test case generation method, flow playback method and electronic equipment
CN112100071A (en) * 2020-09-16 2020-12-18 腾讯科技(深圳)有限公司 Test case generation method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN111309635A (en) * 2020-03-26 2020-06-19 北京奇艺世纪科技有限公司 Test case generation method, device, server and storage medium
CN111708712A (en) * 2020-06-24 2020-09-25 北京自如信息科技有限公司 User behavior test case generation method, flow playback method and electronic equipment
CN112100071A (en) * 2020-09-16 2020-12-18 腾讯科技(深圳)有限公司 Test case generation method and device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778890A (en) * 2021-09-16 2021-12-10 平安银行股份有限公司 Code testing method and device, electronic equipment and storage medium
CN113778890B (en) * 2021-09-16 2023-06-30 平安银行股份有限公司 Code testing method and device, electronic equipment and storage medium
CN115065612A (en) * 2022-06-22 2022-09-16 上海哔哩哔哩科技有限公司 Testing method and device for full link voltage testing transformation
CN115065612B (en) * 2022-06-22 2024-03-08 上海哔哩哔哩科技有限公司 Testing method and device for full-link pressure measurement transformation

Similar Documents

Publication Publication Date Title
CN107885656B (en) Automatic product algorithm testing method and application server
CN110599354B (en) Online checking method, online checking system, computer device and computer readable storage medium
CN112559363A (en) Test case generation method, system, equipment and medium based on full link marking
CN110765750B (en) Report data input method and terminal equipment
CN113220657B (en) Data processing method and device and computer equipment
WO2019075968A1 (en) Cross-page recognition method for form information, electronic device, and computer-readable storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN114416036A (en) Service demand processing method, system, device and medium
CN111274202B (en) Electronic contract generation method, device, computer equipment and storage medium
CN109711849B (en) Ether house address portrait generation method and device, electronic equipment and storage medium
CN111367982A (en) Method and device for importing TRIRIGA basic data, computer equipment and storage medium
CN112181836A (en) Test case generation method, system, device and storage medium
CN112001707A (en) Business workflow generation method and system based on business data
CN111984674A (en) Method and system for generating structured query language
CN110618990B (en) List report setting method, system and list report acquisition method
CN111738868A (en) Anti-money laundering anti-terrorist financing risk monitoring method, device, computer equipment and storage medium
CN111553655A (en) Method and system for showing handling history
CN114202250A (en) Enterprise evaluation system and method and electronic equipment
CN114186976A (en) Workflow transfer method and device, computer equipment and storage medium
CN108415814B (en) Method for automatically recording field change, application server and computer readable storage medium
CN109885710B (en) User image depicting method based on differential evolution algorithm and server
CN112597162A (en) Data set acquisition method, system, device and storage medium
CN112817953A (en) Data verification method and device, computer equipment and computer-readable storage medium
CN113111078A (en) Resource data processing method and device, computer equipment and storage medium
CN108415922B (en) Database modification method and application server

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