Nothing Special   »   [go: up one dir, main page]

CN110928802A - Test method, device, equipment and storage medium based on automatic generation of case - Google Patents

Test method, device, equipment and storage medium based on automatic generation of case Download PDF

Info

Publication number
CN110928802A
CN110928802A CN201911341687.4A CN201911341687A CN110928802A CN 110928802 A CN110928802 A CN 110928802A CN 201911341687 A CN201911341687 A CN 201911341687A CN 110928802 A CN110928802 A CN 110928802A
Authority
CN
China
Prior art keywords
test
template
rule
data
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.)
Granted
Application number
CN201911341687.4A
Other languages
Chinese (zh)
Other versions
CN110928802B (en
Inventor
王福彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Asset Management Co Ltd
Original Assignee
Ping An Asset Management 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 Asset Management Co Ltd filed Critical Ping An Asset Management Co Ltd
Priority to CN201911341687.4A priority Critical patent/CN110928802B/en
Publication of CN110928802A publication Critical patent/CN110928802A/en
Application granted granted Critical
Publication of CN110928802B publication Critical patent/CN110928802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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 invention discloses a test method based on an automatic generation case, and belongs to the field of test case generation. The method comprises the following steps: responding to list selection operation of a user, and taking out a selected test list from a plurality of preset test lists; responding to the selection operation of the user on the data item, and acquiring a corresponding requirement template number from the test list; acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a corresponding rule template number from the corresponding demand template; acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template; and generating and storing a test case according to the configuration information and the data rule of the data item. The invention automatically generates the test case and the corresponding test data by analyzing the rule in the template, thereby reducing the compiling time of the case and the preparation time of the test data.

Description

Test method, device, equipment and storage medium based on automatic generation of case
Technical Field
The invention relates to the field of test case generation, in particular to a test method, a test device, test equipment and a storage medium based on an automatic generation case.
Background
In the process of application service development, finished codes need to be tested, potential problems can be conveniently and timely checked before application is on line, and the stability of the system is improved. This requires the generation of test cases to complete the code testing work.
In the traditional software test, the test case compiling is a necessary and very core work in the test process, a tester needs to spend a great deal of time and energy to compile the test case, the test case compiling occupies a great part of the daily work time of the tester, and the compiling content of the test case is different due to different people.
Therefore, the workload of the tester is large because the test case writing is finished manually at present, and the content and the coverage of the test case are greatly different due to different understandings of different testers to the requirements, so that the coverage of the test case cannot reach 100%.
Disclosure of Invention
The invention provides a test method, a device, equipment and a storage medium based on an automatic generation case, aiming at solving the technical problem that the content and the coverage of the case are greatly different and cannot reach 100% coverage when the test case is written manually in the prior art, and the test case and corresponding test data are automatically generated by analyzing the rules of a plurality of templates so as to greatly reduce the difference rate of the content and the coverage of the case.
The invention solves the technical problems through the following technical scheme:
a test method based on automatic generation of use cases comprises the following steps:
responding to list selection operation of a user, and taking out a test list selected by the user from a plurality of preset test lists;
responding to the data item selection operation of the selected test list by a user, and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template;
and generating and storing a test case according to the configuration information of the data item and the data rule.
Preferably, the test method based on the automatic generation of the use case further includes the following steps:
generating test data according to the test case;
and inputting the test data to execute the test, and generating and outputting a test result after the test is finished.
Preferably, the requirement template and the rule template are respectively saved by taking the requirement template number and the rule template number as file names.
Preferably, the file name of the test case comprises a case number prefix and a case number suffix, the case number prefix is generated by the case number prefix of the test list selected by the user, the case number suffix is composed of a plurality of digits, and the digits are sequentially increased according to the generation sequence of the test case.
Preferably, when a fixed value is set in the requirement template, the test data is the fixed value; and when no fixed value is set in the requirement template, the test data are randomly generated according to the data rule.
Preferably, the test result includes a total number of statistical use cases, a number of passed use cases, and a number of failed use cases.
The invention also discloses a test device based on the automatic generation case, which comprises:
the test list acquisition module is used for responding to the list selection operation of a user and taking out a test list selected by the user from a plurality of preset test lists;
the requirement template positioning module is used for responding to the data item selection operation of the selected test list by the user and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
the rule template positioning module is used for acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
the data rule obtaining module is used for obtaining a corresponding rule template from a plurality of preset rule templates according to the rule template number and obtaining a data rule from the corresponding rule template;
and the test case generating module is used for generating and storing a test case according to the configuration information of the data item and the data rule.
Preferably, the test apparatus based on automatically generated use case further includes:
the data generation module is used for generating test data according to the test case;
and the test execution module is used for executing the test according to the input test data, and generating and outputting a test result after the test is finished.
The invention also discloses a computer device, comprising a memory and a processor, wherein the memory is stored with a computer program, and the computer program realizes the following steps when being executed by the processor:
responding to list selection operation of a user, and taking out a test list selected by the user from a plurality of preset test lists;
responding to the data item selection operation of the selected test list by a user, and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template;
and generating and storing a test case according to the configuration information of the data item and the data rule.
The present invention also discloses a computer-readable storage medium having a computer program stored therein, the computer program being executable by at least one processor to perform the steps of:
responding to list selection operation of a user, and taking out a test list selected by the user from a plurality of preset test lists;
responding to the data item selection operation of the selected test list by a user, and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template;
and generating and storing a test case according to the configuration information of the data item and the data rule.
The positive progress effects of the invention are as follows: and the rules in the analysis template are utilized to automatically generate the test cases and the corresponding test data, so that the writing time of the cases and the preparation time of the test data are reduced.
Drawings
FIG. 1 is a flow chart of a first embodiment of a test method based on an automatic generation case according to the present invention;
FIG. 2 is a flow chart of a second embodiment of the test method based on automatic generation of use cases according to the present invention;
FIG. 3 is a block diagram showing a first embodiment of a test apparatus for automatically generating use cases according to the present invention;
FIG. 4 is a block diagram showing a second embodiment of the test apparatus for automatically generating use cases according to the present invention;
fig. 5 shows a hardware architecture diagram of an embodiment of the computer apparatus of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Firstly, the invention provides a test method based on an automatic generation case.
In an embodiment, as shown in fig. 1, the test method based on an automatic generation use case includes the following steps:
step 01: and responding to the list selection operation of the user, and taking out the test list selected by the user from a plurality of preset test lists.
The test list is preset in the system, each test point is listed in the list, and a user can select the test point by selecting a mouse to click.
The test point refers to a certain service parameter in the test function requirement.
The test lists correspond to the demands one by one, each test list corresponds to one demand number, each test list comprises a plurality of test points, the test points are contained in the test lists, and the test lists correspond to the demand numbers one by one.
Step 02: and responding to the data item selection operation of the selected test list by the user, and acquiring the requirement template number corresponding to the data item selected by the user from the test list.
After the test list is selected, a specific test point needs to be selected from the test list, namely, data item selection operation is performed, the number of the data items can be one or more, and each test item corresponds to a requirement template number according to actual needs.
Step 03: and acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of the data item and the rule template number corresponding to the data item from the corresponding demand template.
The requirement template is also preset in the system, the corresponding requirement template is obtained from the preset requirement template according to the requirement template number, the requirement template is stored by taking the rule template number as the file name, and therefore after the requirement template number is obtained, the corresponding requirement template can be directly found according to the code.
Configuration information of the data items, including data types, lengths and the like, is set in the requirement template. In addition, the requirement template defines data items, and is also provided with rule template numbers corresponding to the data items, so that the applicable rule template can be matched through the rule template numbers.
Step 04: and acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template.
The rule templates are pre-configured templates, each rule template comprises a specific verification rule, each rule template has a unique rule template number, and each rule template is also stored by taking the rule template number as a file name, so that the corresponding rule template can be conveniently obtained after knowing the rule template number.
Step 05: and generating and storing a test case according to the configuration information of the data item and the data rule.
After the data item is selected, configuration information and a data rule are automatically acquired, then generation of a test case is triggered, the test case is stored according to a specific naming rule and comprises a case number prefix and a case number suffix, the case number prefix is generated by the case number prefix of the test list selected by the user, the case number suffix is composed of a plurality of digits, the digits are sequentially increased according to the generation sequence of the test case, for example, the case number suffix is 3 digits, the initial value can be 001, and then the digits are sequentially increased.
According to the embodiment, the following data length check case can be generated:
1. the Parameter is fixed length;
the test contents are as follows: the Parameter length is equal to X;
the testing steps are as follows: the Parameter in the request message is X bit;
the expected results are: 1) the Parameter length check passes: the Parameter format passes the check;
the test contents are as follows: the Parameter length is not equal to X;
the testing steps are as follows: the Parameter in the request message is X bit (is larger than X or smaller than X);
the expected results are: 1) the Parameter length check does not pass: respCode: respMsg: parameter, format check failed.
2. Parameter is indefinite length, X is boundary value;
the test contents are as follows: the Parameter length is greater than X (X is the maximum boundary value);
the testing steps are as follows: the Parameter in the request message is X bit;
the expected results are: 1) the Parameter length check passes: the Parameter format passes the check;
2) the Parameter length check does not pass: respCode: respMsg: parameter, format check fails;
the test contents are as follows: the Parameter length is greater than X (X is a boundary value);
the testing steps are as follows: the Parameter in the request message is X bit;
the expected results are: 1) the Parameter length check passes: the Parameter format passes the check;
2) the Parameter length check does not pass: respCode: respMsg: parameter, format check not passing
The test contents are as follows: the Parameter length is greater than X (X is the minimum boundary value);
the testing steps are as follows: the Parameter in the request message is X bit;
the expected results are: 1) the Parameter length check passes: the Parameter format passes the check;
2) the Parameter length check does not pass: respCode: respMsg: parameter, format check fails;
the Parameter value is x-y (x is a lower boundary, and y is an upper boundary);
x is an open interval:
the lower bound invalid equivalence class test case is: p ═ X;
the lower bound effective equivalence class test case is: p ═ X + 1;
x is a closed interval:
the lower bound invalid equivalence class test case is: p ═ X;
the lower bound effective equivalence class test case is: p ═ X-1;
y is an open interval:
the lower bound invalid equivalence class test case is: p ═ Y;
the lower bound effective equivalence class test case is: p ═ Y-1;
y is a closed interval:
the lower bound invalid equivalence class test case is: p ═ Y;
the lower bound effective equivalence class test case is: p ═ Y + 1.
In the second embodiment, based on the first embodiment, as shown in fig. 2, the test method based on the automatic generation of the use case includes the following steps:
steps 01-05 are the same as those of the first embodiment, and are not repeated herein.
Step 06: and generating test data according to the test case.
Specifically, when the requirement template has a fixed value, the fixed value is one of the test data, and when the requirement template has no fixed value, the test data is randomly generated according to the data rule.
The test data all exist in the form of messages.
Step 07: and inputting the test data to execute the test, and generating and outputting a test result after the test is finished.
Inputting the obtained test data into an application program to be tested to execute a test, synchronously writing each data return result into a corresponding execution return result after the execution is finished, and automatically generating and outputting test results after the execution of all data is finished, wherein the test results comprise the total number of statistical cases, the number of passed cases, the number of failed cases and the like.
Secondly, the invention provides a test device based on automatic generation of use cases, and the device 20 can be divided into one or more modules.
For example, fig. 3 shows a structure diagram of a first embodiment of the test apparatus 20 for automatically generating use cases, in this embodiment, the apparatus 20 may be divided into a test list obtaining module 201, a requirement template positioning module 202, a rule template positioning module 203, a data rule obtaining module 204, and a test case generating module 205. The following description will specifically describe the specific functions of the module 201 and 205.
The test list obtaining module 201 is configured to, in response to a list selection operation of a user, take out a test list selected by the user from a plurality of preset test lists.
The test list is preset in the system, each test point is listed in the list, and a user can select the test point by selecting a mouse to click.
The test point refers to a certain service parameter in the test function requirement.
The test lists correspond to the demands one by one, each test list corresponds to one demand number, each test list comprises a plurality of test points, the test points are contained in the test lists, and the test lists correspond to the demand numbers one by one.
The requirement template positioning module 202 is configured to, in response to a data item selection operation of the selected test list by a user, obtain a requirement template number corresponding to the data item selected by the user from the test list.
After the test list is selected, a specific test point needs to be selected from the test list, namely, data item selection operation is performed, the number of the data items can be one or more, and each test item corresponds to a requirement template number according to actual needs.
The rule template positioning module 203 is configured to obtain a corresponding requirement template from a plurality of preset requirement templates according to the requirement template number, and obtain configuration information of a data item and a rule template number corresponding to the data item from the corresponding requirement template.
The requirement template is also preset in the system, the corresponding requirement template is obtained from the preset requirement template according to the requirement template number, the requirement template is stored by taking the rule template number as the file name, and therefore after the requirement template number is obtained, the corresponding requirement template can be directly found according to the code.
Configuration information of the data items, including data types, lengths and the like, is set in the requirement template. In addition, the requirement template defines data items, and is also provided with rule template numbers corresponding to the data items, so that the applicable rule template can be matched through the rule template numbers.
The data rule obtaining module 204 is configured to obtain a corresponding rule template from a plurality of preset rule templates according to the rule template number, and obtain a data rule from the corresponding rule template.
The rule templates are pre-configured templates, each rule template comprises a specific verification rule, each rule template has a unique rule template number, and each rule template is also stored by taking the rule template number as a file name, so that the corresponding rule template can be conveniently obtained after knowing the rule template number.
The test case generating module 205 is configured to generate and store a test case according to the configuration information of the data item and the data rule.
After the data item is selected, configuration information and a data rule are automatically acquired, then generation of a test case is triggered, the test case is stored according to a specific naming rule and comprises a case number prefix and a case number suffix, the case number prefix is generated by the case number prefix of the test list selected by the user, the case number suffix is composed of a plurality of digits, the digits are sequentially increased according to the generation sequence of the test case, for example, the case number suffix is 3 digits, the initial value can be 001, and then the digits are sequentially increased.
For another example, fig. 4 shows a structure diagram of a second embodiment of the test apparatus 20 for automatically generating use cases, in this embodiment, the test apparatus 20 for automatically generating use cases may be further divided into a test list obtaining module 201, a requirement template positioning module 202, a rule template positioning module 203, a data rule obtaining module 204, a test use case generating module 205, a data generating module 206, and a test executing module 207.
The module 201 and 205 are the same as those of the first embodiment, and are not described herein again.
The data generating module 206 is configured to generate test data according to the test case.
Specifically, when the requirement template has a fixed value, the fixed value is one of the test data, and when the requirement template has no fixed value, the test data is randomly generated according to the data rule.
The test data all exist in the form of messages.
The test execution module 207 is configured to execute a test according to the input test data, and generate and output a test result after the test is completed.
Inputting the obtained test data into an application program to be tested to execute a test, synchronously writing each data return result into a corresponding execution return result after the execution is finished, and automatically generating and outputting test results after the execution of all data is finished, wherein the test results comprise the total number of statistical cases, the number of passed cases, the number of failed cases and the like.
The invention further provides computer equipment.
Fig. 5 is a schematic diagram of a hardware architecture of an embodiment of the computer device according to 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. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, 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). As shown, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, and a network interface 23 communicatively coupled to each other via a system bus. Wherein:
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, etc. In some embodiments, the memory 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), and the like provided on the computer device 2. Of course, the memory 21 may also comprise both an internal storage unit of the computer device 2 and an external storage device thereof. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed in the computer device 2, for example, a computer program for implementing the test method based on automatically generated use cases. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is generally configured to control the overall operation of the computer device 2, such as performing control and processing related to data interaction or communication with the computer device 2. In this embodiment, the processor 22 is configured to run a program code or process data stored in the memory 21, for example, run a computer program or the like for implementing the test method based on the automatically generated use case.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is typically used to establish a communication connection between the computer device 2 and other computer devices. 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. 5 only shows the computer device 2 with components 21-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 computer program stored in the memory 21 for implementing the test method based on automatically generated use cases may be executed by one or more processors (in this embodiment, the processor 22) to perform the following steps:
step 01: responding to list selection operation of a user, and taking out a test list selected by the user from a plurality of preset test lists;
step 02: responding to the data item selection operation of the selected test list by a user, and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
step 03: acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
step 04: acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template;
step 05: and generating and storing a test case according to the configuration information of the data item and the data rule.
Further, the steps may further include:
step 06: generating test data according to the test case;
step 07: and inputting the test data to execute the test, and generating and outputting a test result after the test is finished.
In addition, the present invention relates to a computer-readable storage medium, which is a non-volatile readable storage medium, and a computer program is stored in the computer-readable storage medium, and the computer program can be executed by at least one processor to implement the operation of the test method or apparatus based on automatically generated use cases.
The computer-readable storage medium includes, among others, 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 computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in a computer device, such as the aforementioned computer program for implementing the test method based on automatically generated use cases. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. A test method based on automatic generation of use cases is characterized by comprising the following steps:
responding to list selection operation of a user, and taking out a test list selected by the user from a plurality of preset test lists;
responding to the data item selection operation of the selected test list by a user, and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
acquiring a corresponding rule template from a plurality of preset rule templates according to the rule template number, and acquiring a data rule from the corresponding rule template;
and generating and storing a test case according to the configuration information of the data item and the data rule.
2. The method for testing based on automatic generation of use cases according to claim 1, further comprising the steps of:
generating test data according to the test case;
and inputting the test data to execute the test, and generating and outputting a test result after the test is finished.
3. The test method based on the automatic generation of the use cases according to claim 1, wherein the requirement template and the rule template are respectively saved by taking a requirement template number and a rule template number as file names.
4. The method according to claim 1, wherein the file name of the test case comprises a case number prefix and a case number suffix, the case number prefix is generated from the case number prefix of the test list selected by the user, the case number suffix comprises a plurality of digits, and the digits are sequentially increased according to the generation sequence of the test case.
5. The test method based on the automatic generation of the use case as claimed in claim 2, wherein when a fixed value is set in the requirement template, the test data is the fixed value; and when no fixed value is set in the requirement template, the test data are randomly generated according to the data rule.
6. The method according to claim 2, wherein the test results include a total number of statistical use cases, a number of passed use cases, and a number of failed use cases.
7. A test device based on automatic generation of use cases is characterized by comprising:
the test list acquisition module is used for responding to the list selection operation of a user and taking out a test list selected by the user from a plurality of preset test lists;
the requirement template positioning module is used for responding to the data item selection operation of the selected test list by the user and acquiring a requirement template number corresponding to the data item selected by the user from the test list;
the rule template positioning module is used for acquiring a corresponding demand template from a plurality of preset demand templates according to the demand template number, and acquiring configuration information of a data item and a rule template number corresponding to the data item from the corresponding demand template;
the data rule obtaining module is used for obtaining a corresponding rule template from a plurality of preset rule templates according to the rule template number and obtaining a data rule from the corresponding rule template;
and the test case generating module is used for generating and storing a test case according to the configuration information of the data item and the data rule.
8. The automatic use case generation-based test device according to claim 7, further comprising:
the data generation module is used for generating test data according to the test case;
and the test execution module is used for executing the test according to the input test data, and generating and outputting a test result after the test is finished.
9. A computer device comprising a memory and a processor, characterized in that the memory has stored thereon a computer program which, when executed by the processor, carries out the steps of the method for automatically generating use case based test according to any one of claims 1-6.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being executable by at least one processor to implement the steps of the method for testing based on automatically generated use cases according to any one of claims 1 to 6.
CN201911341687.4A 2019-12-24 2019-12-24 Test method, device, equipment and storage medium based on automatic generation use case Active CN110928802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911341687.4A CN110928802B (en) 2019-12-24 2019-12-24 Test method, device, equipment and storage medium based on automatic generation use case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911341687.4A CN110928802B (en) 2019-12-24 2019-12-24 Test method, device, equipment and storage medium based on automatic generation use case

Publications (2)

Publication Number Publication Date
CN110928802A true CN110928802A (en) 2020-03-27
CN110928802B CN110928802B (en) 2024-09-24

Family

ID=69860729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911341687.4A Active CN110928802B (en) 2019-12-24 2019-12-24 Test method, device, equipment and storage medium based on automatic generation use case

Country Status (1)

Country Link
CN (1) CN110928802B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069054A (en) * 2020-07-22 2020-12-11 北京思特奇信息技术股份有限公司 Method and system for end-to-end configuration test of configuration requirement class
CN112256558A (en) * 2020-09-17 2021-01-22 苏宁云计算有限公司 Test case generation method and device, computer equipment and storage medium
CN112988603A (en) * 2021-04-30 2021-06-18 中国工商银行股份有限公司 Big data test case generation method and device
CN113535563A (en) * 2021-07-19 2021-10-22 上海复深蓝软件股份有限公司 Test case duplication removing method and device, computer equipment and storage medium
CN113535223A (en) * 2021-07-19 2021-10-22 长鑫存储技术有限公司 Configuration method and device of test flow, storage medium and equipment
CN113672498A (en) * 2021-07-19 2021-11-19 华人运通(江苏)技术有限公司 Automatic diagnosis test method, device and equipment
CN115576523A (en) * 2022-12-12 2023-01-06 数云科际(深圳)技术有限公司 Method for automatically generating check rule statement based on template
CN115620851A (en) * 2022-12-19 2023-01-17 一临云(深圳)科技有限公司 Data verification method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186639A (en) * 2011-12-31 2013-07-03 腾讯科技(北京)有限公司 Data generation method and system
US20140006459A1 (en) * 2012-06-29 2014-01-02 Hewlett-Packard Development Company, L.P. Rule-based automated test data generation
CN105681126A (en) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 Automatic test method and system based on protocol interface
CN109376093A (en) * 2018-12-04 2019-02-22 泰康保险集团股份有限公司 The test method and device of insurance products, storage medium and electronic equipment
CN109815122A (en) * 2018-12-15 2019-05-28 深圳壹账通智能科技有限公司 Test data generating method, device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186639A (en) * 2011-12-31 2013-07-03 腾讯科技(北京)有限公司 Data generation method and system
US20140006459A1 (en) * 2012-06-29 2014-01-02 Hewlett-Packard Development Company, L.P. Rule-based automated test data generation
CN105681126A (en) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 Automatic test method and system based on protocol interface
CN109376093A (en) * 2018-12-04 2019-02-22 泰康保险集团股份有限公司 The test method and device of insurance products, storage medium and electronic equipment
CN109815122A (en) * 2018-12-15 2019-05-28 深圳壹账通智能科技有限公司 Test data generating method, device, electronic equipment and storage medium

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069054A (en) * 2020-07-22 2020-12-11 北京思特奇信息技术股份有限公司 Method and system for end-to-end configuration test of configuration requirement class
CN112069054B (en) * 2020-07-22 2023-11-21 北京思特奇信息技术股份有限公司 Method and system for testing end-to-end configuration of configuration requirement class
CN112256558A (en) * 2020-09-17 2021-01-22 苏宁云计算有限公司 Test case generation method and device, computer equipment and storage medium
CN112988603A (en) * 2021-04-30 2021-06-18 中国工商银行股份有限公司 Big data test case generation method and device
CN112988603B (en) * 2021-04-30 2024-03-29 中国工商银行股份有限公司 Big data test case generation method and device
CN113672498B (en) * 2021-07-19 2023-09-15 华人运通(江苏)技术有限公司 Automatic diagnosis test method, device and equipment
CN113535563A (en) * 2021-07-19 2021-10-22 上海复深蓝软件股份有限公司 Test case duplication removing method and device, computer equipment and storage medium
CN113535223A (en) * 2021-07-19 2021-10-22 长鑫存储技术有限公司 Configuration method and device of test flow, storage medium and equipment
CN113672498A (en) * 2021-07-19 2021-11-19 华人运通(江苏)技术有限公司 Automatic diagnosis test method, device and equipment
CN113535223B (en) * 2021-07-19 2023-10-24 长鑫存储技术有限公司 Configuration method, device, storage medium and equipment of test flow
CN115576523A (en) * 2022-12-12 2023-01-06 数云科际(深圳)技术有限公司 Method for automatically generating check rule statement based on template
CN115576523B (en) * 2022-12-12 2023-05-09 数云科际(深圳)技术有限公司 Method for automatically generating check rule statement based on template
CN115620851B (en) * 2022-12-19 2023-03-31 一临云(深圳)科技有限公司 Data verification method and device, electronic equipment and readable storage medium
CN115620851A (en) * 2022-12-19 2023-01-17 一临云(深圳)科技有限公司 Data verification method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN110928802B (en) 2024-09-24

Similar Documents

Publication Publication Date Title
CN110928802B (en) Test method, device, equipment and storage medium based on automatic generation use case
CN112765023B (en) Test case generation method and device
CN107689982B (en) Multi-data source data synchronization method, application server and computer readable storage medium
CN110647471B (en) Interface test case generation method, electronic device and storage medium
CN111414391A (en) Method and system for accessing multiple data sources
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN117033249A (en) Test case generation method and device, computer equipment and storage medium
CN111459812A (en) Interface test case generation method, electronic device and storage medium
CN113704110A (en) Automatic testing method and device for user interface
CN112486490B (en) Front-end code packaging method and device, electronic equipment and storage medium
CN111352851A (en) Program testing method and device, computer equipment and storage medium
CN108021621A (en) Database data acquisition method, application server and computer-readable recording medium
CN108255735B (en) Associated environment testing method, electronic device and computer readable storage medium
CN107766228B (en) Multi-language-based automatic testing method and device
CN113296752A (en) Method, system, device and storage medium for generating API document
CN113342647A (en) Test data generation method and device
CN116661758B (en) Method, device, electronic equipment and medium for optimizing log framework configuration
CN108829574B (en) Test data laying method, test server and computer readable storage medium
CN117873486A (en) Front-end and back-end code automatic generation method, device, equipment and storage medium
CN113836037B (en) Interface interaction testing method, device, equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN110327626B (en) Virtual server creation method and device
CN112817953A (en) Data verification method and device, computer equipment and computer-readable storage medium
CN113885963B (en) Secondary development file execution method, device and storage medium
CN112540747A (en) Platform development method, device and computer readable storage medium

Legal Events

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