CN114116449B - Parameterization method and device for automatic test case and electronic equipment - Google Patents

Parameterization method and device for automatic test case and electronic equipment Download PDF

Info

Publication number
CN114116449B
CN114116449B CN202111240411.4A CN202111240411A CN114116449B CN 114116449 B CN114116449 B CN 114116449B CN 202111240411 A CN202111240411 A CN 202111240411A CN 114116449 B CN114116449 B CN 114116449B
Authority
CN
China
Prior art keywords
test
test case
parameter
test cases
cases
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111240411.4A
Other languages
Chinese (zh)
Other versions
CN114116449A (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.)
Hozon New Energy Automobile Co Ltd
Original Assignee
Hozon New Energy Automobile 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 Hozon New Energy Automobile Co Ltd filed Critical Hozon New Energy Automobile Co Ltd
Priority to CN202111240411.4A priority Critical patent/CN114116449B/en
Publication of CN114116449A publication Critical patent/CN114116449A/en
Application granted granted Critical
Publication of CN114116449B publication Critical patent/CN114116449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

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 parameterization method, a parameterization device and electronic equipment for automatic test cases, wherein the parameterization method comprises the steps of obtaining all existing test cases, grouping all the test cases based on similarity among the test cases, and obtaining test case groups; extracting an automatic test template from each test case group, determining input parameters to be filled in the automatic test template, and constructing an input parameter list according to each input parameter; defining different test parameters based on the input parameters, perfecting an input parameter list according to each test parameter, and obtaining a parameter test case; and importing the parameter test cases into an automatic test template to obtain complete test cases. The method and the device realize that when similar new test cases need to be written, the generation of the new test cases can be rapidly and efficiently carried out according to the complete test cases.

Description

Parameterization method and device for automatic test case and electronic equipment
Technical Field
The application relates to the technical field of automatic testing, in particular to a parameterization method and device for an automatic test case and electronic equipment.
Background
When the traditional automatic test cases are written into similar automatic test cases (for example, only part of parameters are modified), one test case needs to be copied again, and the parameter adjustment is carried out on the copied test case manually by staff. If the parameter change interval to be tested is relatively large, the staff may be required to perform very much repeated labor, which is time-consuming and labor-consuming.
Disclosure of Invention
In order to solve the problems, the embodiment of the application provides a parameterization method and device for an automatic test case and electronic equipment.
In a first aspect, an embodiment of the present application provides a method for parameterizing an automated test case, where the method includes:
acquiring all existing test cases, and grouping all the test cases based on the similarity among the test cases to obtain test case groups;
Extracting an automatic test template from each test case group, determining input parameters to be filled in the automatic test template, and constructing an input parameter list according to each input parameter;
Defining different test parameters based on the input parameters, perfecting the input parameter list according to each test parameter, and obtaining a parameter test case;
and importing the parameter test cases into the automatic test template to obtain complete test cases.
Preferably, the grouping all the test cases based on the similarity between the test cases to obtain each test case group includes:
the method comprises the steps of obtaining a functional module of the test case, wherein the functional module comprises a precondition, an execution action and post-processing;
comparing the test cases in pairs, and confirming that at least one of the two identical test cases in the functional module has similarity;
and dividing each test case with similarity into one group to obtain each test case group.
Preferably, the automated test templates can switch and execute different pre-conditions, executing actions and post-processing according to different input parameters.
Preferably, the method further comprises:
acquiring the code complexity of each functional module;
And adjusting the arrangement sequence of the input parameters in the parameter test case according to the sequence from simple to complex of the code complexity.
Preferably, the method further comprises:
receiving a test case change instruction, and determining a change category corresponding to the test case change instruction;
When the change category is a parameter threshold, changing the parameter test case;
and when the change category is a functional requirement, changing the automatic test template.
Preferably, the method further comprises:
When a manual test case is detected, determining the test case group with similarity with the manual test case;
And adding the manual test cases to the test case group, perfecting the input parameter list, and updating the parameter test cases.
In a second aspect, an embodiment of the present application provides a parameterization apparatus for an automated test case, where the apparatus includes:
the acquisition module is used for acquiring all existing test cases, and grouping all the test cases based on the similarity among the test cases to obtain test case groups;
The extraction module is used for extracting an automatic test template from each test case group, determining input parameters needing to be filled in the automatic test template, and constructing an input parameter list according to each input parameter;
the perfecting module is used for defining different test parameters based on the input parameters, perfecting the input parameter list according to each test parameter and obtaining parameter test cases;
and the importing module is used for importing the parameter test case into the automatic test template to obtain a complete test case.
In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect or any one of the possible implementations of the first aspect when the computer program is executed.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as provided by the first aspect or any one of the possible implementations of the first aspect.
The beneficial effects of the invention are as follows: an input parameter list is constructed through the existing test cases, and detailed design of the automatic test cases is conducted by defining different parameters for the input parameter list, so that the parameter test cases are obtained, the parameter test cases are further combined with the automatic test templates to form complete test cases, and when similar new test cases need to be written, generation of the new test cases can be conducted rapidly and efficiently according to the complete test cases. And because the functional module and the parameters are maintained separately, if the required function is changed, only the main body of the test case needs to be changed, and if the required parameter threshold is changed, only the parameter table needs to be changed, so that the writing cost of different types of test cases is lower, and the writing efficiency is higher.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a parameterization method of an automated test case according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a parameterizing device for an automatic test case according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
In the following description, the terms "first," "second," and "first," are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The following description provides various embodiments of the application that may be substituted or combined between different embodiments, and thus the application is also to be considered as embracing all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the application should also be seen as embracing one or more of all other possible combinations of one or more of A, B, C, D, although such an embodiment may not be explicitly recited in the following.
The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the application. Various examples may omit, replace, or add various procedures or components as appropriate. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Referring to fig. 1, fig. 1 is a flow chart of a parameterization method of an automated test case according to an embodiment of the present application. In an embodiment of the present application, the method includes:
s101, acquiring all existing test cases, and grouping all the test cases based on the similarity among the test cases to obtain each test case group.
The execution subject of the present application may be a cloud server.
The test case can be understood as describing a test task of a specific software product in the embodiment of the application, and the test scheme, method, technology and strategy are embodied. The content of the method comprises a test target, a test environment, input data, a test step, an expected result, a test script and the like, and finally a document is formed. Briefly, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular goal to verify that a particular software requirement is met.
In the embodiment of the application, the cloud server acquires the existing test cases in the server, and because the test cases are a group of integral processes of input, execution conditions and expected results which are compiled for targets, different test cases may have similarity, namely, certain steps in the middle are the same, but different follow-up processes are different according to different processing results. Therefore, all existing test cases are grouped according to the similarity among the test cases, and the test cases with the similarity are divided into a group to obtain each test case group.
In one embodiment, step S101 includes:
the method comprises the steps of obtaining a functional module of the test case, wherein the functional module comprises a precondition, an execution action and post-processing;
comparing the test cases in pairs, and confirming that at least one of the two identical test cases in the functional module has similarity;
and dividing each test case with similarity into one group to obtain each test case group.
In the embodiment of the present application, each test case is composed of a plurality of functional modules, and specifically includes three types of preconditions, execution actions, and post-processing, and the specific processing procedure of the test case may be understood as that a certain parameter is judged and processed by the preconditions, the specific execution actions of the parameter are determined according to the judgment result of the preconditions, and after the result is obtained by the specific execution actions, different post-processing is performed according to the difference of the results. It can be seen that the test cases may have similarity, i.e. the judging process of the preconditions is the same, but the judging result is different due to different input parameters, so that the subsequent executing actions are different. Therefore, the functional modules of the test cases need to be compared, and as long as at least one of the preconditions, the execution actions and the post-processing in the functional modules is the same, the two test cases are considered to have similarity.
S102, extracting an automatic test template from each test case group, determining input parameters to be filled in the automatic test template, and constructing an input parameter list according to each input parameter.
In the embodiment of the present application, as shown in the foregoing analysis, each test case corresponds to a specific parameter for testing the test case, and each functional module performs the whole testing process by processing the specific parameter. After the test case groups are divided according to the similarity, an automatic test template can be extracted from each group by excluding specific parameters thereof, for example, parameters are judged in a precondition, an a executing action is executed when the judgment result is a, a B executing action is executed when the judgment result is B, and the like. According to the extracted automatic test template, input parameters needing to be filled in the template can be determined, and an input parameter list can be constructed according to the input parameters needing to be filled.
In one embodiment, the automated test templates can switch to execute different pre-conditions, execute actions and post-processing according to different input parameters.
S103, defining different test parameters based on the input parameters, perfecting the input parameter list according to each test parameter, and obtaining a parameter test case.
In the embodiment of the application, the input parameters are determined according to the automatic test template and the corresponding test case group, namely, the determined input parameters are specific parameter values and cannot represent all parameter ranges applicable to the automatic test template. Therefore, different test parameters are required to be defined according to the input parameters to perfect the input parameter list, and finally the finished input parameter list is used as a parameter test case.
S104, importing the parameter test cases into the automatic test template to obtain complete test cases.
In the embodiment of the application, after the parameter test case is perfected, the parameter test case is re-imported into the automatic test template, so that the complete test case can be obtained. In the subsequent new test case editing process, a worker can quickly and conveniently construct a test case wanted by the worker and simulate the test to obtain a test result only by adjusting input parameters corresponding to the input parameters based on the complete test case.
In one embodiment, the method further comprises:
acquiring the code complexity of each functional module;
And adjusting the arrangement sequence of the input parameters in the parameter test case according to the sequence from simple to complex of the code complexity.
In the embodiment of the application, codes of different functional modules have different complexity according to different functions to be realized by each functional module, and the code complexity can be specifically determined according to the number of lines of the codes and the reference times before the codes. Through the complexity of the codes, the input parameters corresponding to the parameter test cases can be reordered according to the order from simple to complex. In the subsequent test process, if staff only needs to test the function module such as the precondition, but does not care the subsequent processing process, the test can be performed by selecting the input parameters with low code complexity preferentially through the sequencing of the complexity, so that the test efficiency is ensured.
In one embodiment, the method further comprises:
receiving a test case change instruction, and determining a change category corresponding to the test case change instruction;
When the change category is a parameter threshold, changing the parameter test case;
and when the change category is a functional requirement, changing the automatic test template.
In the embodiment of the application, as known from the foregoing process, the application splits the complete test case which should be taken as a whole into two parts of an automatic test template and a parameter test case for processing and constructing independently, i.e. the functional module and the parameter are maintained separately. Therefore, when the complete test case needs to be changed based on the requirement of a certain test, the server firstly confirms the specific category of the test case change instruction sent by the staff, and the parameter change test case or the automatic test template corresponding to the change category is not influenced on the object of the other category, so that the whole change process is more flexible and efficient.
In one embodiment, the method further comprises:
When a manual test case is detected, determining the test case group with similarity with the manual test case;
And adding the manual test cases to the test case group, perfecting the input parameter list, and updating the parameter test cases.
The manual test case can be understood as a new test case manually compiled by a worker in the embodiment of the application.
In the embodiment of the application, the process is to automatically determine to generate the test case for testing according to the input parameters input by the staff, and in addition, the staff can completely rewrite a new test case, namely, the manual test case. After the server detects the manual test case, the server judges the similarity between the manual test case and the divided test case group, adds the manual test case into the test case group with similarity, and perfects the input parameter list according to the manual test case again, so that the parameter test case is updated.
The following describes in detail the parameterizing device for the automation test case provided in the embodiment of the present application with reference to fig. 2. It should be noted that, the parameterization device of the automated test case shown in fig. 2 is used to execute the method of the embodiment of fig. 1 of the present application, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the embodiment of fig. 1 of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a parameterizing device for an automatic test case according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
An obtaining module 201, configured to obtain all existing test cases, and group all the test cases based on similarity between the test cases, so as to obtain each test case group;
an extracting module 202, configured to extract an automated test template from each of the test case groups, determine input parameters to be filled in the automated test template, and construct an input parameter list according to each of the input parameters;
The perfecting module 203 is configured to define different test parameters based on the input parameters, and perfect the input parameter list according to each test parameter to obtain a parameter test case;
And the importing module 204 is configured to import the parameter test case into the automated test template to obtain a complete test case.
In one embodiment, the acquisition module 201 includes:
The functional module acquisition unit is used for acquiring a functional module of the test case, wherein the functional module comprises a precondition, an execution action and post-processing;
The comparison unit is used for pairwise comparing the test cases and confirming that at least one of the same two test cases in the functional module has similarity;
and the dividing unit is used for dividing each test case with similarity into one group to obtain each test case group.
In one embodiment, the apparatus further comprises:
the complexity acquisition module is used for acquiring the code complexity of each functional module;
And the sequencing module is used for adjusting the sequence of the input parameters in the parameter test case according to the sequence from simple to complex of the code complexity.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving the test case changing instruction and determining a changing category corresponding to the test case changing instruction;
The first changing module is used for changing the parameter test case when the changing category is a parameter threshold value;
and the second changing module is used for changing the automatic test template when the changing category is a functional requirement.
In one embodiment, the apparatus further comprises:
The similarity determining module is used for determining the test case group with similarity with the manual test case when the manual test case is detected;
and the adding module is used for adding the manual test cases to the test case group, perfecting the input parameter list again and updating the parameter test cases.
It will be clear to those skilled in the art that the technical solutions of the embodiments of the present application may be implemented by means of software and/or hardware. "unit" and "module" in this specification refer to software and/or hardware capable of performing a particular function, either alone or in combination with other components, such as Field-Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA), integrated circuits (INTEGRATED CIRCUIT, ICs), and the like.
The processing units and/or modules of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
Referring to fig. 3, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device may be used to implement the method in the embodiment shown in fig. 1. As shown in fig. 3, the electronic device 300 may include: at least one central processor 301, at least one network interface 304, a user interface 303, a memory 305, at least one communication bus 302.
Wherein the communication bus 302 is used to enable connected communication between these components.
The user interface 303 may include a Display screen (Display), a Camera (Camera), and the optional user interface 303 may further include a standard wired interface, and a wireless interface.
The network interface 304 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the central processor 301 may comprise one or more processing cores. The central processor 301 connects the various parts within the overall electronic device 300 using various interfaces and lines, performs various functions of the terminal 300 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and invoking data stored in the memory 305. Alternatively, the central processor 301 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The central processor 301 may integrate one or a combination of several of a central processor (Central Processing Unit, CPU), an image central processor (Graphics Processing Unit, GPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the cpu 301 and may be implemented by a single chip.
The Memory 305 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 305 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 305 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 305 may also optionally be at least one storage device located remotely from the aforementioned central processor 301. As shown in fig. 3, an operating system, a network communication module, a user interface module, and program instructions may be included in the memory 305, which is a type of computer storage medium.
In the electronic device 300 shown in fig. 3, the user interface 303 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the central processor 301 may be configured to invoke the parameterized application of the automation test cases stored in the memory 305, and specifically perform the following operations:
acquiring all existing test cases, and grouping all the test cases based on the similarity among the test cases to obtain test case groups;
Extracting an automatic test template from each test case group, determining input parameters to be filled in the automatic test template, and constructing an input parameter list according to each input parameter;
Defining different test parameters based on the input parameters, perfecting the input parameter list according to each test parameter, and obtaining a parameter test case;
and importing the parameter test cases into the automatic test template to obtain complete test cases.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method. The computer-readable storage medium may include, among other things, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application may be embodied essentially or partly in the form of a software product, or all or part of the technical solution, which is stored in a memory, and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by hardware associated with a program that is stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (7)

1. A method for parameterizing an automated test case, the method comprising:
acquiring all existing test cases, and grouping all the test cases based on the similarity among the test cases to obtain test case groups;
Extracting an automatic test template from each test case group, determining input parameters to be filled in the automatic test template, and constructing an input parameter list according to each input parameter;
Defining different test parameters based on the input parameters, perfecting the input parameter list according to each test parameter, and obtaining a parameter test case;
Importing the parameter test cases into the automatic test template to obtain complete test cases;
all the test cases are grouped based on the similarity among the test cases to obtain each test case group, and the method comprises the following steps:
the method comprises the steps of obtaining a functional module of the test case, wherein the functional module comprises a precondition, an execution action and post-processing;
comparing the test cases in pairs, and confirming that at least one of the two identical test cases in the functional module has similarity;
Dividing each test case with similarity into a group to obtain each test case group;
The method further comprises the steps of:
receiving a test case change instruction, and determining a change category corresponding to the test case change instruction;
When the change category is a parameter threshold, changing the parameter test case;
and when the change category is a functional requirement, changing the automatic test template.
2. The method of claim 1, wherein the automated test templates are capable of switching execution of different pre-conditions, execution actions, post-processing according to different of the input parameters.
3. The method according to claim 1, wherein the method further comprises:
acquiring the code complexity of each functional module;
And adjusting the arrangement sequence of the input parameters in the parameter test case according to the sequence from simple to complex of the code complexity.
4. The method according to claim 1, wherein the method further comprises:
When a manual test case is detected, determining the test case group with similarity with the manual test case;
And adding the manual test cases to the test case group, perfecting the input parameter list, and updating the parameter test cases.
5. An automated test case parameterization apparatus, the apparatus comprising:
the acquisition module is used for acquiring all existing test cases, and grouping all the test cases based on the similarity among the test cases to obtain test case groups;
The extraction module is used for extracting an automatic test template from each test case group, determining input parameters needing to be filled in the automatic test template, and constructing an input parameter list according to each input parameter;
the perfecting module is used for defining different test parameters based on the input parameters, perfecting the input parameter list according to each test parameter and obtaining parameter test cases;
the importing module is used for importing the parameter test cases into the automatic test template to obtain complete test cases;
Wherein, the acquisition module includes:
The functional module acquisition unit is used for acquiring a functional module of the test case, wherein the functional module comprises a precondition, an execution action and post-processing;
The comparison unit is used for pairwise comparing the test cases and confirming that at least one of the same two test cases in the functional module has similarity;
the dividing unit is used for dividing each test case with similarity into a group to obtain each test case group;
the apparatus further comprises:
the receiving module is used for receiving the test case changing instruction and determining a changing category corresponding to the test case changing instruction;
The first changing module is used for changing the parameter test case when the changing category is a parameter threshold value;
and the second changing module is used for changing the automatic test template when the changing category is a functional requirement.
6. An electronic 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 method according to any of claims 1-4 when the computer program is executed.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-4.
CN202111240411.4A 2021-10-25 2021-10-25 Parameterization method and device for automatic test case and electronic equipment Active CN114116449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111240411.4A CN114116449B (en) 2021-10-25 2021-10-25 Parameterization method and device for automatic test case and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111240411.4A CN114116449B (en) 2021-10-25 2021-10-25 Parameterization method and device for automatic test case and electronic equipment

Publications (2)

Publication Number Publication Date
CN114116449A CN114116449A (en) 2022-03-01
CN114116449B true CN114116449B (en) 2024-05-07

Family

ID=80377097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111240411.4A Active CN114116449B (en) 2021-10-25 2021-10-25 Parameterization method and device for automatic test case and electronic equipment

Country Status (1)

Country Link
CN (1) CN114116449B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555813B (en) * 2024-01-11 2024-05-14 天津异乡好居网络科技股份有限公司 Method, device, equipment and medium for determining common test case

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214139A (en) * 2011-06-01 2011-10-12 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
CN106528395A (en) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 Test case generation method and apparatus
CN109933531A (en) * 2019-03-19 2019-06-25 湖南国科微电子股份有限公司 Automatic testing method, device and electronic equipment
CN112241360A (en) * 2019-07-19 2021-01-19 腾讯科技(深圳)有限公司 Test case generation method, device, equipment and storage medium
CN112732556A (en) * 2020-12-29 2021-04-30 北京浪潮数据技术有限公司 Automatic testing method, device, equipment and storage medium for distributed system
CN113434395A (en) * 2021-06-22 2021-09-24 中国平安人寿保险股份有限公司 Automatic generation method, device, equipment and medium of test case

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080115114A1 (en) * 2006-11-10 2008-05-15 Sashank Palaparthi Automated software unit testing
US9092578B2 (en) * 2012-12-20 2015-07-28 Sap Se Automated end-to-end testing via multiple test tools

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214139A (en) * 2011-06-01 2011-10-12 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
CN106528395A (en) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 Test case generation method and apparatus
CN109933531A (en) * 2019-03-19 2019-06-25 湖南国科微电子股份有限公司 Automatic testing method, device and electronic equipment
CN112241360A (en) * 2019-07-19 2021-01-19 腾讯科技(深圳)有限公司 Test case generation method, device, equipment and storage medium
CN112732556A (en) * 2020-12-29 2021-04-30 北京浪潮数据技术有限公司 Automatic testing method, device, equipment and storage medium for distributed system
CN113434395A (en) * 2021-06-22 2021-09-24 中国平安人寿保险股份有限公司 Automatic generation method, device, equipment and medium of test case

Also Published As

Publication number Publication date
CN114116449A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN109582525B (en) Test code verification method, verification device, equipment and storage medium
CN106776334B (en) Comment-based test case generation method and device
CN107967206B (en) Data test system, request interception method and request interception device
CN110833693B (en) Game running method and device, storage medium and electronic device
CN108876764A (en) Render image acquiring method, device, system and storage medium
JP2014092878A (en) Classification model update support device, method, and program
CN107741904A (en) Test machine method of automatic configuration, device, equipment and storage medium
CN113342669B (en) Verification method and device for shortening convergence time of chip code coverage rate
CN114116449B (en) Parameterization method and device for automatic test case and electronic equipment
CN109828900A (en) Test script automatic generation method, device, electronic equipment and storage medium
CN111198815B (en) Compatibility testing method and device for user interface
CN111368497A (en) Circuit board schematic diagram design method and device, electronic equipment and storage medium
CN114201346A (en) HIL (hardware-in-the-loop) testing method and device of CAN (controller area network) communication interface and electronic equipment
CN109861874B (en) Automatic test system of equipment
CN107918584A (en) Information generating system, device, method and computer-readable recording medium
CN107569851A (en) On-hook method, apparatus of playing and system
CN109471935B (en) Questionnaire survey object determining method and device, electronic equipment and storage medium
CN109063846B (en) Machine learning operation method, device, equipment and storage medium
US20160171636A1 (en) Grouping support method and apparatus
CN110544166A (en) Sample generation method, device and storage medium
CN106126314B (en) Expand the analogy method and device of instruction
CN107609401A (en) Automatic test approach and device
CN113628077A (en) Method for generating non-repeated examination questions, terminal and readable storage medium
CN112579144B (en) Data processing method and device
CN112819030A (en) Image recognition model training method and device, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 314500 988 Tong Tong Road, Wu Tong Street, Tongxiang, Jiaxing, Zhejiang

Applicant after: United New Energy Automobile Co.,Ltd.

Address before: 314500 988 Tong Tong Road, Wu Tong Street, Tongxiang, Jiaxing, Zhejiang

Applicant before: Hozon New Energy Automobile Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant