CN113238964A - Test case set generation method and device and electronic equipment - Google Patents

Test case set generation method and device and electronic equipment Download PDF

Info

Publication number
CN113238964A
CN113238964A CN202110673986.9A CN202110673986A CN113238964A CN 113238964 A CN113238964 A CN 113238964A CN 202110673986 A CN202110673986 A CN 202110673986A CN 113238964 A CN113238964 A CN 113238964A
Authority
CN
China
Prior art keywords
test case
test
case
information
case set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202110673986.9A
Other languages
Chinese (zh)
Inventor
覃联喜
晏高林
吴昊
孔丽萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime Technology 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 Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN202110673986.9A priority Critical patent/CN113238964A/en
Publication of CN113238964A publication Critical patent/CN113238964A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • 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/368Test management for test version control, e.g. updating test cases to a new software version

Landscapes

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

Abstract

The embodiment of the invention discloses a method and a device for generating a test case set and electronic equipment. The method comprises the following steps: acquiring a plurality of test cases, and extracting key case information of each test case; the key use case information comprises at least one of the following information: the type of the test case, the module to which the test case belongs and the version of the test case; dividing the plurality of test cases according to the key case information to generate a test case set; and the test cases in the test case set correspond to the same key case information.

Description

Test case set generation method and device and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating a test case set and electronic equipment.
Background
In software testing, a test suite or test set is a collection of test cases that are assembled from a set of related test cases. Generally, a series of test cases are combined according to corresponding rules in a case design stage or an execution stage, and parameters required by different test sets during execution are different. At present, the newly-increased test case sets need to be screened and edited manually by testers, the dependence on the testers is large, case errors or deletions in the test case sets are easy to cause due to human factors, and the workload is greatly increased; moreover, the requirements on the tester are high, and if the tester is unfamiliar with the test set and the parameters, the test set and the parameter selection thereof are easy to be wrong or missed, so that the test result and the test efficiency are influenced, and even a wrong test conclusion is caused.
Disclosure of Invention
In order to solve the existing technical problem, some embodiments of the present application provide a method and an apparatus for generating a test case set, and an electronic device.
In order to achieve the above purpose, the technical solutions of some embodiments of the present application are implemented as follows:
some embodiments of the present application provide a method for generating a test case set, where the method includes:
acquiring a plurality of test cases, and extracting key case information of each test case; the key use case information comprises at least one of the following information: the type of the test case, the module to which the test case belongs and the version of the test case;
dividing the plurality of test cases according to the key case information to generate a test case set; and the test cases in the test case set correspond to the same key case information.
In the above scheme, the method further comprises: and under the condition that the extracted key case information comprises at least two kinds of information, combining the at least two kinds of information according to a preset combination rule to obtain combination information, and determining the combination information as an identifier of a test case set corresponding to the key case information.
In the foregoing scheme, the dividing the plurality of test cases according to the key case information to generate a test case set includes:
judging whether a first test case set corresponding to the key case information of the first test case exists or not; the first test case is any one of the plurality of test cases;
responding to the condition that a first test case set corresponding to the key case information of the first test case does not exist, and creating the first test case set;
the method comprises the steps of responding to the condition that a first test case set corresponding to key case information of a first test case exists, and dividing the first test case into the first test case set.
In the above scheme, the method further comprises: acquiring case parameters of each test case in each test case set, and generating a parameter configuration table corresponding to each test case set based on the case parameters of each test case.
In the above scheme, the generating a parameter configuration table corresponding to each test case set based on the case parameters of each test case includes:
carrying out duplicate removal processing on the case parameters of each test case according to the parameter names;
and sequencing the case parameters subjected to the duplicate removal processing according to a preset sequencing rule, generating a parameter configuration table, and associating the parameter configuration table with the test case set.
In the above scheme, the method further comprises: determining at least one test case set to be executed from a plurality of test case sets, and obtaining a parameter configuration table corresponding to each test case set in the at least one test case set;
and generating an execution parameter list based on the parameter configuration table corresponding to each test case set in the at least one test case set, wherein the execution parameter list is used for providing corresponding test parameters for a user to input.
In the above scheme, the method further comprises: when detecting that the number of the test cases in the second test case set changes, re-acquiring case parameters of each test case in the second test case set; the second test case set is any test case set;
and generating a new parameter configuration table based on the case parameters of each test case in the second test case set, and updating the parameter configuration table corresponding to the second test case set to be the new parameter configuration table.
Some embodiments of the present application further provide a test case set generating device, where the device includes: an information extraction unit and a packet division unit; wherein the content of the first and second substances,
the information extraction unit is used for acquiring a plurality of test cases and extracting key case information of each test case; the key use case information comprises at least one of the following information: the type of the test case, the module to which the test case belongs and the version of the test case;
the grouping and dividing unit is used for dividing the plurality of test cases according to the key case information extracted by the information extracting unit to generate a test case set; and the test cases in the test case set correspond to the same key case information.
In the above scheme, the apparatus further includes a determining unit, configured to, when the key case information extracted by the information extracting unit includes at least two kinds of information, combine the at least two kinds of information according to a preset combination rule to obtain combination information, and determine the combination information as an identifier of a test case set corresponding to the key case information.
In the above scheme, the grouping and dividing unit is configured to determine whether a first test case set corresponding to key case information of a first test case exists; the first test case is any one of the plurality of test cases; responding to the condition that a first test case set corresponding to the key case information of the first test case does not exist, and creating the first test case set; the method comprises the steps of responding to the condition that a first test case set corresponding to key case information of a first test case exists, and dividing the first test case into the first test case set.
In the above scheme, the apparatus further includes a first processing unit, configured to obtain a case parameter of each test case in each test case set, and generate a parameter configuration table corresponding to each test case set based on the case parameter of each test case.
In the above scheme, the first processing unit is configured to perform deduplication processing on a case parameter of each test case according to a parameter name; and sequencing the case parameters subjected to the duplicate removal processing according to a preset sequencing rule, generating a parameter configuration table, and associating the parameter configuration table with the test case set.
In the above scheme, the apparatus further comprises: an acquisition unit and a second processing unit;
the obtaining unit is configured to determine at least one test case set to be executed from a plurality of test case sets, and obtain a parameter configuration table corresponding to each test case set in the at least one test case set;
the second processing unit is configured to generate an execution parameter list based on a parameter configuration table corresponding to each test case set in the at least one test case set, where the execution parameter list is used for providing a user with input of corresponding test parameters.
In the above scheme, the first processing unit is further configured to, when detecting that the number of test cases in the second test case set changes, reacquire case parameters of each test case in the second test case set; the second test case set is any test case set; and generating a new parameter configuration table based on the case parameters of each test case in the second test case set, and updating the parameter configuration table corresponding to the second test case set to be the new parameter configuration table.
Some embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the test case set generation method described in some embodiments of the present application.
Some embodiments of the present application further provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the steps of the test case set generation method according to some embodiments of the present application are implemented.
Some embodiments of the present application provide a method, an apparatus, and an electronic device for generating a test case set, where the method includes: acquiring a plurality of test cases, and extracting key case information of each test case; dividing the plurality of test cases according to the key case information to generate a test case set; and the test cases in the test case set correspond to the same key case information. By adopting the technical scheme of some embodiments of the application, the key case information of each test case is automatically extracted, the test cases are divided according to the key case information, the test cases belonging to the same key case information are automatically divided into a test case set, the automatic classification and combination of the test cases are realized, manual case screening by testers is not needed, the efficiency of related maintenance operation of the test cases is improved, and the problem caused by human factors is also avoided.
Drawings
FIG. 1 is a first flowchart illustrating a test case set generation method according to some embodiments of the present application;
FIG. 2 is a second flowchart illustrating a test case set generation method according to some embodiments of the present application;
FIG. 3 is a third flowchart illustrating a test case set generation method according to some embodiments of the present application;
FIG. 4 is a fourth flowchart illustrating a test case set generation method according to some embodiments of the present application;
FIG. 5 is a first schematic diagram illustrating a structure of a test case set generating apparatus according to some embodiments of the present disclosure;
fig. 6 is a schematic structural diagram of a second component of the test case set generating device according to some embodiments of the present application;
fig. 7 is a schematic structural diagram of a third component of a test case set generating device according to some embodiments of the present application;
fig. 8 is a schematic structural diagram of a test case set generating device according to some embodiments of the present application;
fig. 9 is a hardware component structure diagram of an electronic device according to some embodiments of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.
Some embodiments of the present application provide a method for generating a test case set, and fig. 1 is a first flowchart of the method for generating a test case set according to some embodiments of the present application; as shown in fig. 1, the method includes:
step 101: acquiring a plurality of test cases, and extracting key case information of each test case;
step 102: dividing the plurality of test cases according to the key case information to generate a test case set; and the test cases in the test case set correspond to the same key case information.
The test case set generating method according to the present embodiment may be applied to a test case set generating apparatus, and the test case set generating apparatus may be provided in an electronic device having a processing function, such as a personal computer or a server, or may be implemented by a processor executing a computer program. The following description will be given taking an electronic device as an execution subject.
In each embodiment of the invention, the test case is a group of test information written for a specified target so as to test whether a path or a test of a certain program or software meets a certain specified requirement, and a test scheme, a method, a technology and a strategy are embodied. For example, the content of the test case may include a test target, a test environment, input data, a test step, an expected result, a test script, and the like, and finally form a test case (or a test case file). Briefly, a test case is a set of test inputs, execution conditions, and expected results that are tailored for a particular goal.
In this embodiment, the test case is written with a certain rule, and the corresponding content can be described by corresponding computer program statements. The key case information can represent at least one of the type, the function, the purpose and the version of the test case; in other words, the test cases corresponding to the same key case information can be divided into a set of test case sets.
In some optional embodiments, the key use case information includes at least one of the following information: the type of the test case, the module to which the test case belongs, and the version of the test case.
In this embodiment, the electronic device may extract the key case information based on the field name corresponding to the key case information. For example, if the key case information is a test case type, then in general, the corresponding computer program statement may be described as': 'xxx' ", the type of the test case corresponding to the" type "field can be extracted as" xxx "by identifying the" type "field in the computer program statement.
The test case types can have different classification modes according to different classification modes. For example, if the test cases are classified according to the development phase, the test case types may include: unit testing (also may be referred to as module testing), integration testing (also may be referred to as joint testing or assembly testing), system testing, acceptance testing (also may be referred to as system testing), and so forth; if the test cases are classified according to the test objects, the test case types may include: performance tests (to check if specified performance is met), security tests (to check security), compatibility tests (to check that software can work well), document tests (to check document correctness, integrity), business tests (to concatenate modules and to simulate a real workflow), interface tests (to check if layout is reasonable, style is consistent, naming is uniform, etc.), installation tests, and so on. In this embodiment, the dividing manner of the test case types is not limited.
In this embodiment, since one piece of software may include one or more modules, one test case may correspond to one or more modules. Such as a shopping Application (APP), which may include different areas of clothing, electronics, food, etc., each area may then serve as a module.
The test case version is specifically a test case version number or a version identifier.
In some optional embodiments, in a case that the extracted key case information includes information, for example, the key case information is a test case type, a module to which the test case belongs, or a test case version, the key case information may be used as an identifier (or name) of a corresponding test case set.
In further optional embodiments, the method further comprises: and under the condition that the extracted key case information comprises at least two kinds of information, combining the at least two kinds of information according to a preset combination rule to obtain combination information, and determining the combination information as an identifier of a test case set corresponding to the key case information.
For example, in the case that the key case information includes a test case type, a module to which the test case belongs, and a test case version, the test case type, the module to which the test case belongs, and the test case version may be combined according to a preset combination rule, and the obtained combination information may be, for example: and (3) determining the combined information as the identification (or name) of the corresponding test case set by the test case type XX-the module YY to which the test case belongs-the test case version ZZ.
In some alternative embodiments, as shown in FIG. 2, step 102 may include:
step 1021: judging whether a first test case set corresponding to the key case information of the first test case exists or not; the first test case is any one of the plurality of test cases;
step 1022: responding to the condition that a first test case set corresponding to the key case information of the first test case does not exist, and creating the first test case set;
step 1023: the method comprises the steps of responding to the condition that a first test case set corresponding to key case information of a first test case exists, and dividing the first test case into the first test case set.
In this embodiment, under the condition that the test case sets are first divided for a plurality of test cases, the key case information corresponding to the same test case can be directly divided into one test case set according to the key case information of each test case, so that the plurality of test cases are divided into one or more test case sets. Under the condition that the test case sets are not divided for a plurality of test cases for the first time, that is, one or more test case sets already exist, and each test case set corresponds to one piece of key case information, for example, each test case set determines a corresponding identifier according to the identifier determination mode, then in the process of dividing the test case sets for the plurality of test cases, whether a test case set (namely, a first test case set) corresponding to the key case information exists at present is judged according to the key case information of each test case set, and if the judgment result is that the test case set (namely, the first test case set) corresponding to the key case information exists, the test case can be directly added into the test case set (namely, the first test case set); and if the judgment result is that the test case set (namely the first test case set) corresponding to the key case information does not exist, establishing a new test case set, wherein the newly established test case set can adopt the combined information identifier obtained by combining the key case information according to the preset combination rule.
By adopting the technical scheme of the embodiment, the key case information of each test case is automatically extracted, the test cases belonging to the same key case information are automatically divided into a test case set according to the key case information, the automatic classification and combination of the test cases are realized, the manual case screening by a tester is not needed, the efficiency of the related maintenance operation of the test cases is improved, and the problem caused by human factors is avoided.
Based on the foregoing embodiments, some embodiments of the present application further provide a test case set generating method, and fig. 3 is a flow diagram of the test case set generating method according to some embodiments of the present application; as shown in fig. 3, on the basis of the foregoing steps 101 and 102, the method includes:
step 103: acquiring case parameters of each test case in each test case set, and generating a parameter configuration table corresponding to each test case set based on the case parameters of each test case.
In this embodiment, the use case parameters of the test case include any configuration parameters and/or use case parameters required in the test task. Illustratively, the configuration parameters may include, for example, at least one of: testing server Internet Protocol (IP) address, port number, duration of operation, etc.; the use case parameters may include, for example, a use case name, a use case identification, a requested Application Programming Interface (API), and so on. Of course, the use case parameters of the test case in the embodiment are not limited to the above example, and other use case parameters may also be within the protection scope of the embodiment of the present invention.
The method comprises the steps that the use case parameters of all test cases in a test case set can be the same or partially the same and different, an electronic device generates a parameter configuration table according to user parameters of all test cases contained in the test case set, and the parameter configuration table comprises use case parameters contained in all test cases in the test case set.
In some optional embodiments, the generating a parameter configuration table corresponding to each test case set based on the case parameters includes: carrying out duplicate removal processing on the case parameters of each test case according to the parameter names; and sequencing the case parameters subjected to the duplicate removal processing according to a preset sequencing rule, generating a parameter configuration table, and associating the parameter configuration table with the test case set.
In this embodiment, since the case parameters of each test case in the test case set may be the same or partially the same and partially different, that is, there may be a case where the case parameters are overlapped or partially overlapped, the electronic device performs deduplication processing on the case parameters according to the parameter names first. For example, a certain test case set includes a test case 1 and a test case 2, the test case 1 includes a case parameter a, a case parameter b and a case parameter c, the test case 2 includes a case parameter a, a case parameter b and a case parameter d, and if deduplication processing is not performed, the case parameters included in the test case 1 and the test case 2 include: the method comprises the following steps of (1) using case parameters a, b, c, a b and d; after the deduplication processing is performed, the case parameters included in the test case 1 and the test case 2 include: the case parameter a, the case parameter b, the case parameter c and the case parameter d.
And then, sorting the use case parameters subjected to the duplicate removal processing according to a preset sorting rule to generate a parameter configuration table. For example, the preset ordering rule may be ordering according to an important program of the use case parameters in the test process. For example, some use case parameters are bound-fill parameters, and some use case parameters are not bound-fill, the bound-fill use case parameters are ranked first, and the non-bound-fill use case parameters are ranked later. For another example, some use case parameters have default values, and some use case parameters do not have default values, then the use case parameters not carrying the default values are sorted in the front, and the use case parameters carrying the default values are sorted in the back. Based on the method, the example parameters after the duplicate removal processing can be sequenced according to the preset sequencing rule whether the example parameters are the necessary filling parameters and/or whether the example parameters carry default values, a parameter configuration table is generated, and the incidence relation between the parameter configuration table and the test example set is established.
In some optional embodiments, the method further comprises: when detecting that the number of the test cases in the second test case set changes, re-acquiring case parameters of each test case in the second test case set; the second test case set is any test case set; and generating a new parameter configuration table based on the case parameters of each test case in the second test case set, and updating the parameter configuration table corresponding to the second test case set to be the new parameter configuration table.
In this embodiment, in the process of generating the test case set based on the foregoing test case set generation method, in the case that one or more test case sets already exist, there is a case that the test case is added to the existing test case set, that is, the number of test cases included in the test case set may change. And if the number of the test cases changes, the case parameters contained in the corresponding parameter configuration table also need to be updated in time. Based on this, when detecting that the number of the test cases in the test case set (such as the second test case set) changes, the electronic device obtains the case parameters of each test case in the test case set again; and after the duplication elimination processing is carried out again and the sorting is carried out according to the preset sorting rule, generating a new parameter configuration table, and updating the parameter configuration table associated with the test case set into the new parameter configuration table.
According to the technical scheme of the embodiment, the parameter configuration table corresponding to the test case set is automatically generated by automatically acquiring the case parameters of each test case in the test case set, so that the manual operation workload of a tester is greatly reduced, parameter selection errors or omissions caused by the fact that the tester is unfamiliar with the test case parameters are avoided, and parameter configuration is enabled to be free of errors and omissions; in addition, when the number of the test cases in the test case set changes, the parameter configuration table can be automatically updated without manual operation.
Based on the foregoing embodiments, some embodiments of the present application further provide a test case set generation method, and fig. 4 is a fourth flowchart of the test case set generation method according to some embodiments of the present application; as shown in fig. 4, on the basis of the foregoing steps 101 to 103, the method includes:
step 104: determining at least one test case set to be executed from a plurality of test case sets, and obtaining a parameter configuration table corresponding to each test case set in the at least one test case set;
step 105: and generating an execution parameter list based on the parameter configuration table corresponding to each test case set in the at least one test case set, wherein the execution parameter list is used for providing corresponding test parameters for a user to input.
In this embodiment, when a test task is to be executed, a tester may select at least one test case set to be tested from a plurality of test case sets, and obtain a parameter configuration table associated with each test case set in the at least one test case set; furthermore, merging and removing duplication of at least one parameter configuration table, namely merging and removing duplication of use case parameters in at least one parameter configuration table to obtain an execution parameter list; in other words, the use case parameters included in the execution parameter list are a union of the use case parameters included in the at least one parameter configuration table.
According to the technical scheme of the embodiment, the execution parameter list required by the test execution is automatically generated by obtaining at least one parameter configuration table corresponding to the test set to be executed according to the test set to be executed, so that the omission of test parameters caused by artificial factors is avoided.
Based on the foregoing embodiments, some embodiments of the present application further provide a test case set generating device. FIG. 5 is a first schematic diagram illustrating a structure of a test case set generating apparatus according to some embodiments of the present disclosure; as shown in fig. 5, the apparatus includes: an information extraction unit 21 and a packet division unit 22; wherein the content of the first and second substances,
the information extraction unit 21 is configured to obtain a plurality of test cases, and extract key case information of each test case; the key use case information comprises at least one of the following information: the type of the test case, the module to which the test case belongs and the version of the test case;
the grouping and dividing unit 22 is configured to divide the plurality of test cases according to the key case information extracted by the information extracting unit 21, and generate a test case set; and the test cases in the test case set correspond to the same key case information.
In some optional embodiments of the present application, as shown in fig. 6, the apparatus further includes a determining unit 23, configured to, when the key case information extracted by the information extracting unit 21 includes at least two kinds of information, combine the at least two kinds of information according to a preset combination rule to obtain combination information, and determine the combination information as an identifier of a test case set corresponding to the key case information.
In some optional embodiments of the present application, the grouping and dividing unit 22 is configured to determine whether a first test case set corresponding to the key case information of the first test case exists; the first test case is any one of the plurality of test cases; responding to the condition that a first test case set corresponding to the key case information of the first test case does not exist, and creating the first test case set; the method comprises the steps of responding to the condition that a first test case set corresponding to key case information of a first test case exists, and dividing the first test case into the first test case set.
In some optional embodiments of the present application, as shown in fig. 7, the apparatus further includes a first processing unit 24, configured to obtain a case parameter of each test case in each test case set, and generate a parameter configuration table corresponding to each test case set based on the case parameter of each test case.
In some optional embodiments of the present application, the first processing unit 24 is configured to perform deduplication processing on a case parameter of each test case according to a parameter name; and sequencing the case parameters subjected to the duplicate removal processing according to a preset sequencing rule, generating a parameter configuration table, and associating the parameter configuration table with the test case set.
In some optional embodiments of the present application, as shown in fig. 8, the apparatus further comprises: an acquisition unit 25 and a second processing unit 26;
the obtaining unit 25 is configured to determine at least one test case set to be executed from a plurality of test case sets, and obtain a parameter configuration table corresponding to each test case set in the at least one test case set;
the second processing unit 26 is configured to generate an execution parameter list based on the parameter configuration table corresponding to each test case set in the at least one test case set, where the execution parameter list is used to provide a user with input of corresponding test parameters.
In some optional embodiments of the present application, the first processing unit 24 is further configured to, when detecting that the number of test cases in the second test case set changes, re-acquire case parameters of each test case in the second test case set; the second test case set is any test case set; and generating a new parameter configuration table based on the case parameters of each test case in the second test case set, and updating the parameter configuration table corresponding to the second test case set to be the new parameter configuration table.
In some embodiments of the present application, the information extracting Unit 21, the grouping and dividing Unit 22, the determining Unit 23, the first Processing Unit 24, the obtaining Unit 25, and the second Processing Unit 26 in the apparatus may be implemented by a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU), or a Programmable Gate Array (FPGA) in practical applications.
It should be noted that: in the test case set generating device provided in the above embodiment, when generating a test case set, only the division of each program module is exemplified, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the processing described above. In addition, the test case set generating device and the test case set generating method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Some embodiments of the present application also provide an electronic device. Fig. 9 is a schematic diagram of a hardware component structure of an electronic device according to some embodiments of the present application, as shown in fig. 9, the electronic device includes a memory 32, a processor 31, and a computer program stored in the memory 32 and executable on the processor, and when the processor 31 executes the computer program, the steps of the foregoing test case set generation method according to some embodiments of the present application are implemented.
Optionally, the electronic device may further comprise a user interface 33 and at least one network interface 34. The various components in the electronic device are coupled together by a bus system 35. It will be appreciated that the bus system 35 is used to enable communications among the components. The bus system 35 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 35 in fig. 9.
The user interface 33 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, a touch screen, or the like.
It will be appreciated that the memory 32 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 32 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiments of the present invention may be applied to the processor 31, or implemented by the processor 31. The processor 31 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 31. The processor 31 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 31 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 32, and the processor 31 reads the information in the memory 32 and performs the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the electronic Device may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field-Programmable Gate arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the foregoing methods.
In an exemplary embodiment, the present invention further provides a computer readable storage medium, such as the memory 32, comprising a computer program, which is executable by the processor 31 of the electronic device to perform the steps of the aforementioned method. The computer readable storage medium can be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the foregoing test case set generation method according to the embodiment of the present invention.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for generating a test case set is characterized in that the method comprises the following steps:
acquiring a plurality of test cases, and extracting key case information of each test case; the key use case information comprises at least one of the following information: the type of the test case, the module to which the test case belongs and the version of the test case;
dividing the plurality of test cases according to the key case information to generate a test case set; and the test cases in the test case set correspond to the same key case information.
2. The method of claim 1, further comprising:
and under the condition that the extracted key case information comprises at least two kinds of information, combining the at least two kinds of information according to a preset combination rule to obtain combination information, and determining the combination information as an identifier of a test case set corresponding to the key case information.
3. The method according to claim 1 or 2, wherein the dividing the plurality of test cases according to the key case information to generate a test case set comprises:
judging whether a first test case set corresponding to the key case information of the first test case exists or not; the first test case is any one of the plurality of test cases;
responding to the condition that a first test case set corresponding to the key case information of the first test case does not exist, and creating the first test case set;
the method comprises the steps of responding to the condition that a first test case set corresponding to key case information of a first test case exists, and dividing the first test case into the first test case set.
4. The method according to any one of claims 1 to 3, further comprising:
acquiring case parameters of each test case in each test case set, and generating a parameter configuration table corresponding to each test case set based on the case parameters of each test case.
5. The method according to claim 4, wherein the generating a parameter configuration table corresponding to each test case set based on the case parameters of each test case comprises:
carrying out duplicate removal processing on the case parameters of each test case according to the parameter names;
and sequencing the case parameters subjected to the duplicate removal processing according to a preset sequencing rule, generating a parameter configuration table, and associating the parameter configuration table with the test case set.
6. The method according to any one of claims 1 to 5, further comprising:
determining at least one test case set to be executed from a plurality of test case sets, and obtaining a parameter configuration table corresponding to each test case set in the at least one test case set;
and generating an execution parameter list based on the parameter configuration table corresponding to each test case set in the at least one test case set, wherein the execution parameter list is used for providing corresponding test parameters for a user to input.
7. The method according to claim 4 or 5, characterized in that the method further comprises:
when detecting that the number of the test cases in the second test case set changes, re-acquiring case parameters of each test case in the second test case set; the second test case set is any test case set;
and generating a new parameter configuration table based on the case parameters of each test case in the second test case set, and updating the parameter configuration table corresponding to the second test case set to be the new parameter configuration table.
8. An apparatus for generating a set of test cases, the apparatus comprising: an information extraction unit and a packet division unit; wherein the content of the first and second substances,
the information extraction unit is used for acquiring a plurality of test cases and extracting key case information of each test case; the key use case information comprises at least one of the following information: the type of the test case, the module to which the test case belongs and the version of the test case;
the grouping and dividing unit is used for dividing the plurality of test cases according to the key case information extracted by the information extracting unit to generate a test case set; and the test cases in the test case set correspond to the same key case information.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of claims 1 to 7 are implemented when the program is executed by the processor.
CN202110673986.9A 2021-06-17 2021-06-17 Test case set generation method and device and electronic equipment Withdrawn CN113238964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110673986.9A CN113238964A (en) 2021-06-17 2021-06-17 Test case set generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110673986.9A CN113238964A (en) 2021-06-17 2021-06-17 Test case set generation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113238964A true CN113238964A (en) 2021-08-10

Family

ID=77140233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110673986.9A Withdrawn CN113238964A (en) 2021-06-17 2021-06-17 Test case set generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113238964A (en)

Similar Documents

Publication Publication Date Title
CN108073519B (en) Test case generation method and device
WO2020000706A1 (en) Database comparison-based interface testing method and system, device and storage medium
CN109062780B (en) Development method of automatic test case and terminal equipment
US9734263B2 (en) Method and apparatus for efficient pre-silicon debug
JP6723989B2 (en) Data driven inspection framework
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN111290956B (en) Brain graph-based test method and device, electronic equipment and storage medium
CN110737689B (en) Data standard compliance detection method, device, system and storage medium
CN114117311B (en) Data access risk detection method and device, computer equipment and storage medium
CN105095059A (en) Method and device for automated testing
CN110990053A (en) Method for creating and using machine learning scheme template and device
CN110990274A (en) Data processing method, device and system for generating test case
CN111624475B (en) Method and system for testing large-scale integrated circuit
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN113704077A (en) Test case generation method and device
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN113238964A (en) Test case set generation method and device and electronic equipment
CN113282476B (en) Interface performance testing method and device and electronic equipment
CN113342632A (en) Simulation data automatic processing method and device, electronic equipment and storage medium
CN114860608A (en) Scene construction based system automation testing method, device, equipment and medium
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium storing program for executing
CN114519008A (en) Recommendation method, device, medium and equipment for regression test case
CN113791980A (en) Test case conversion analysis method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210810

WW01 Invention patent application withdrawn after publication