CN113656305A - Method for automatically generating test suite and related device - Google Patents

Method for automatically generating test suite and related device Download PDF

Info

Publication number
CN113656305A
CN113656305A CN202110936974.0A CN202110936974A CN113656305A CN 113656305 A CN113656305 A CN 113656305A CN 202110936974 A CN202110936974 A CN 202110936974A CN 113656305 A CN113656305 A CN 113656305A
Authority
CN
China
Prior art keywords
test
data
configuration
case
robot
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
CN202110936974.0A
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.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity 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 DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202110936974.0A priority Critical patent/CN113656305A/en
Publication of CN113656305A publication Critical patent/CN113656305A/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

Abstract

The application discloses a method for automatically generating a test suite, which comprises the following steps: reading data from a file or database; judging whether the data is configuration data or not; if yes, converting the configuration data into configuration content according to a robot format; if not, performing assertion matching according to the data to obtain a test case; and integrating and assembling the configuration content and the test case according to a robot format to obtain a test suite. The read data are divided into configuration data and non-configuration data, configuration contents and test cases are respectively generated, and finally the configuration contents and the test cases are integrated and assembled into the test suite without manually compiling the corresponding configuration contents and the corresponding test cases, so that the efficiency of obtaining the test suite is improved, the test efficiency is further improved, and the labor cost is reduced. The application also discloses a device for automatically generating the test suite, a server and a computer readable storage medium, which have the beneficial effects.

Description

Method for automatically generating test suite and related device
Technical Field
The present application relates to, and in particular, to a method for automatically generating a test suite, an apparatus for automatically generating a test suite, a server, and a computer-readable storage medium.
Background
With the continuous development of information technology, in the software testing link, in order to improve the testing efficiency, a test case can be used for testing.
In the related art, when a robot frame (automated test platform) framework is used to create a data-driven test case, test data needs to be saved in a file or a database, and then the test case is manually written. That is, the specified test data is read, the input and output of the case are manually judged again, and the read data is manually written to the corresponding position in the test case. The above process has a repeated process of artificial judgment, and the test data needs to be repeatedly converted into the test case available for the frame by manpower, so that the time cost is high, and the process of artificial judgment has a high error rate and needs to repeatedly debug the test case.
Therefore, how to improve the efficiency of writing test cases and avoid the problems caused by artificial writing is a key problem concerned by the technical personnel in the field.
Disclosure of Invention
The application aims to provide a method for automatically generating a test suite, an apparatus for automatically generating a test suite, a server and a computer readable storage medium, so that the efficiency of generating a measurement case is improved.
In order to solve the technical problems, the application provides a method for automatically generating a test suite, which comprises the steps of reading data from a file or a database;
judging whether the data is configuration data or not;
if yes, converting the configuration data into configuration content according to a robot format;
if not, performing assertion matching according to the data to obtain a test case;
and integrating and assembling the configuration content and the test case according to a robot format to obtain a test suite.
Optionally, performing assertion matching according to the data to obtain a test case, including:
reading the data line by line to obtain a plurality of pieces of data;
performing content matching on each piece of data to obtain a test target, a test preposition operation, a test postposition operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data;
and converting the test target, the test preposition operation, the test postposition operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data according to a robot format to obtain the test case.
Optionally, performing assertion matching according to the data to obtain a test case, including:
performing assertion matching according to the data to obtain a plurality of test cases;
aggregating the plurality of test cases according to the scene test rule to obtain a plurality of groups of test cases;
and integrating each group of test cases into a scene case, and using the scene case as the test case.
Optionally, converting the configuration data into configuration content according to a robot format, including:
performing content matching on the configuration data according to a robot format to obtain setting information, variable information and keyword information;
integrating the setting information, the variable information and the keyword information into the configuration content.
Optionally, the configuration content and the test case are integrated and assembled according to a robot format to obtain a test suite, including:
and integrating and assembling the configuration content and the corresponding scene case according to a robot format to obtain a scene test suite as the test suite.
The present application further provides an automatic generation test suite device, including:
the data reading module is used for reading data from a file or a database;
the configuration data judging module is used for judging whether the data is configuration data or not;
the configuration content extraction module is used for converting the configuration data into configuration content according to a robot format when the data is the configuration data;
the test case extraction module is used for carrying out assertion matching according to the data to obtain a test case when the data is not the configuration data;
and the kit generation module is used for integrating and assembling the configuration content and the test case according to a robot format to obtain a test kit.
Optionally, the test case extraction module is specifically configured to read the data line by line to obtain multiple pieces of data; performing content matching on each piece of data to obtain a test target, a test preposition operation, a test postposition operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data; and converting the test target, the test preposition operation, the test postposition operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data according to a robot format to obtain the test case.
Optionally, the test case extraction module is specifically configured to perform assertion matching according to the data to obtain a plurality of test cases; aggregating the plurality of test cases according to the scene test rule to obtain a plurality of groups of test cases; and integrating each group of test cases into a scene case, and using the scene case as the test case.
The present application further provides a server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for automatically generating a test suite as described above when executing the computer program.
The present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of automatically generating a test suite, as described above.
The application provides a method for automatically generating a test suite, which comprises the following steps: reading data from a file or database; judging whether the data is configuration data or not; if yes, converting the configuration data into configuration content according to a robot format; if not, performing assertion matching according to the data to obtain a test case; and integrating and assembling the configuration content and the test case according to a robot format to obtain a test suite.
The read data are divided into configuration data and non-configuration data, configuration contents and test cases are respectively generated, and finally the configuration contents and the test cases are integrated and assembled into the test suite without manually compiling the corresponding configuration contents and the corresponding test cases, so that the efficiency of obtaining the test suite is improved, the test efficiency is further improved, and the labor cost is reduced.
The application also provides a device for automatically generating the test suite, a server and a computer readable storage medium, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for automatically generating a test suite according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an apparatus for automatically generating a test suite according to an embodiment of the present disclosure.
Detailed Description
The core of the application is to provide a method for automatically generating a test suite, a device for automatically generating the test suite, a server and a computer readable storage medium, so that the efficiency of generating a measurement case is improved.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, when a robot frame framework is used to create a data-driven test case, test data needs to be saved in a file or a database, and then the test case is manually written. That is, the specified test data is read, the input and output of the case are manually judged again, and the read data is manually written to the corresponding position in the test case. The above process has a repeated process of artificial judgment, and the test data needs to be repeatedly converted into the test case available for the frame by manpower, so that the time cost is high, and the process of artificial judgment has a high error rate and needs to repeatedly debug the test case.
Therefore, the method for automatically generating the test suite improves the efficiency of obtaining the test suite, further improves the test efficiency and reduces the labor cost by dividing the read data into the configuration data and the non-configuration data, respectively generating the configuration content and the test case, and finally integrating and assembling the configuration content and the test case into the test suite without manually writing the corresponding configuration content and the corresponding test case.
The following describes a method for automatically generating a test suite according to an embodiment.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for automatically generating a test suite according to an embodiment of the present disclosure.
In this embodiment, the method may include;
s101, reading data from a file or a database;
this step is intended to read data from a file or database. The file may be a table file, and the database may be a database storing test data.
Wherein the data is data for automatically generating a test suite.
Generally, in the prior art, a corresponding test suite is mainly manually maintained, or parameters or configurations in the test suite are manually managed or repaired, which is low in efficiency. Therefore, in the present embodiment, data of a file or a database is directly used for reading. Corresponding configuration data, or data that needs to be modified, has been recorded in the file or database. It is sufficient to read directly from the file or database without the need for manual input.
S102, judging whether the data is configuration data or not; if yes, executing S103; if not, executing S104;
on the basis of S101, this step is intended to determine whether or not the data is configuration data. That is, whether the data is configuration data or test data is determined.
The determination method may be performed according to the name of the data, or the configuration information of the data, or the page name of the data. It is obvious that the manner of determining whether the data is the configuration data in this step is not exclusive, and is not specifically limited herein.
S103, converting the configuration data into configuration contents according to a robot format;
on the basis of S102, this step is intended to convert the configuration data into configuration content according to the robot format when the data is configuration data.
The robot format is a data format of a robot file used for testing in a robot frame framework.
Further, the step may include:
step 1, performing content matching on configuration data according to a robot format to obtain setting information, variable information and keyword information;
and 2, integrating the setting information, the variable information and the keyword information into configuration content.
It can be seen that the present alternative scheme mainly explains how to process the configuration content. In this alternative, content matching is performed on the configuration data according to the robot format to obtain setting information, variable information, and keyword information, and the setting information, the variable information, and the keyword information are integrated into configuration content.
Obviously, the corresponding configuration content can be acquired from the data through the alternative scheme, so that the final test case is configured, the corresponding configuration information is not manually written, and the test case writing speed is improved.
S104, performing assertion matching according to the data to obtain a test case;
on the basis of S102, this step aims to perform assertion matching according to data to obtain a test case when the data is test data.
Further, the step may include:
step 1, reading data line by line to obtain a plurality of pieces of data;
step 2, performing content matching on each piece of data to obtain a test target, a test preposition operation, a test postposition operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data;
and 3, converting the test target, the test preposition operation, the test postposition operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data according to the robot format to obtain the test case.
It can be seen that the present alternative mainly explains how to process the test cases. In the alternative scheme, data are read line by line to obtain a plurality of pieces of data, content matching is performed on each piece of data to obtain a test target, a test pre-operation, a test post-operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data, and the test target, the test pre-operation, the test post-operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data are converted according to a robot format to obtain a test case.
Obviously, by the alternative scheme, various items of data used for constructing the test case can be matched from the test data, and the test case is obtained.
Further, the step may include:
step 1, performing assertion matching according to data to obtain a plurality of test cases;
step 2, aggregating a plurality of test cases according to the scene test rule to obtain a plurality of groups of test cases;
and step 3, integrating each group of test cases into a scene case, and using the scene case as a test case.
It can be seen that the present alternative mainly explains how to process the test cases. In the alternative scheme, a plurality of test cases are obtained by performing assertion matching according to data, the plurality of test cases are aggregated according to a scene test rule to obtain a plurality of groups of test cases, and each group of test cases are integrated into one scene case and used as the test case.
Obviously, a plurality of test cases can be aggregated into one scenario case through the present alternative. So as to realize that a plurality of test cases are executed under a specific scene, and realize scene test.
And S105, integrating and assembling the configuration content and the test case according to the robot format to obtain a test suite.
On the basis of S103 or S104, this step aims to integrate and assemble the configuration content and the test case according to the robot format, so as to obtain a test suite.
In summary, in the embodiment, the read data is divided into the configuration data and the non-configuration data, the configuration content and the test case are respectively generated, and finally the configuration content and the test case are integrated and assembled into the test suite, instead of manually writing the corresponding configuration content and the corresponding test case, so that the efficiency of obtaining the test suite is improved, the test efficiency is further improved, and the labor cost is reduced.
The method for automatically generating a test suite provided by the present application is further described below with a specific embodiment.
In the embodiment, the main purpose is to solve the problem that when test case data is stored in a file or a database, some repetitive work needs to be manually performed to convert the test data into a test case or a test suite in a robot format, due to manual operation, an error exists, the test case can be debugged and passed through only by frequently needing to be debugged for many times, and the process is time-consuming.
Therefore, the present application provides a method for automatically generating a test suite, so as to implement automatic generation of a test suite, so as to improve the efficiency of testing.
In this embodiment, the storage of the test case data in the test item is divided into two parts, for example, an excel file or a database is used as a test item. There will be a configuration portion and a test data portion in the project.
Wherein the configuration section: including settings, variables, keywords, etc. required in the robot. Stored with a dedicated sheet page name or table name. Wherein the test data part: different test contents may be placed in different sheet pages or tables of a database, including: test targets, test inputs, expected outputs, etc. test the necessary data.
Accordingly, the method in this implementation may include:
step 1, reading all sheet pages or tables from a file or a database.
And 2, judging whether the current sheet page name or the table name belongs to a configuration special name. That is, it is determined whether the current data belongs to the configuration data.
And 2.1, if the configuration is the special sheet page name or table name, reading the configuration data, and automatically converting the configuration data into the robot format content according to the corresponding configuration item.
And 2.2, if the special sheet page name or the table name is not configured, reading the configuration data line by line, and generating a test case by one line of test data. And performing assertion matching on data such as a test target, test pre-operation, test post-operation, test input, test labels, expected results and the like in the test data and the actually obtained test result, and automatically converting the data into the content in the robot format. The use case name in the robot is the use case number _ use case module _ use case name combination name in the test data.
And 3, judging whether the case number is the same as the previous data or not.
And 3.1, if the use case numbers are the same, writing the data into the content of the previous use case.
And 3.2, if the use case numbers are different, writing the data into the new use case content.
And 4, assembling the data contents, and automatically integrating the data contents into a test suite in a robot format.
And 5, automatically integrating the configuration content of the test data and the test cases into a test suite in a robot format. The name of the sheet page or the name of the table is automatically used as the name of the test suite, so that different sheet pages or tables can automatically generate different test suite names. And automatic generation of scenario use cases is supported.
Further, step 5 may include:
and 5.1, acquiring the name of the sheet page or the name of the table.
And 5.2, circularly reading each sheet page or table name, and recording each sheet page name or table name.
And 5.3, reading the test data of each sheet page or table name according to the sheet page name or table name.
And 5.4, automatically generating a corresponding test suite according to each sheet page or table name, wherein the test suite name can be in one-to-one correspondence with the sheet page name or table name.
Therefore, the configuration information is arranged in a sheet page or a table special for configuration, a user can freely configure the configuration information, the flexibility of the test suite can be realized, and other data are taken as test data. The configuration information includes, but is not limited to: test environment, variables, keywords, settings. Wherein the test data includes but is not limited to: test target, test input, expected output, pre-operation, post-operation, test method, test parameter, case label, case description, case number, case name. A test kit for automatically generated robot frame framework, including but not limited to: interface test, interface automation test, UI test and UI automation test. And generating a corresponding test suite according to each set according to the test data sets. Test sets include, but are not limited to: sheet page for excel, table in database. The method supports generation of scenario cases, including but not limited to determining whether the cases belong to the same case scenario by using a case number, a case name and a case group number.
In a specific application scenario, the method provided by this embodiment may include:
step 1, reading all sheet pages or tables from a file or a database.
In this embodiment, the storage of the test case data in the test item is divided into two parts. For example, an excel file or a database is a test item, and the item has a configuration part and a test data part. Wherein the configuration section: the contents including settings, variables, keywords, and the like required in the robot are stored in a dedicated sheet name or table name. Different test contents may be placed in different sheet pages or tables of a database, including: test targets, test inputs, expected outputs, etc. test the necessary data.
In the prior art, a test template file is used, one test data file corresponds to one test template file, the test template only provides the function of defining the template, and real test data is still in a test data sheet page, so when some common test data such as a test environment domain name or an address needs to be modified, each test data needs to be modified.
The sheet page of the configuration part is also used in the embodiment and belongs to a part of the test data, and is used for storing some general configuration data and configuration items of the test suite.
Therefore, the management and the use of the test cases in the embodiment are more flexible, and the maintenance cost is lower. Only one piece of configuration data is needed to be maintained to support a plurality of pieces of test data corresponding to one piece of configuration data, and different test templates are not needed to be maintained according to different pieces of test data. When testing is required to be carried out in different environments, the data of the test case can be modified to the minimum extent, and automatic testing can be realized more quickly.
And 2, mainly judging the name of the sheet, judging whether the current sheet page is configuration data or test data, and writing the current sheet page into a test case part in a robot format if the current sheet page is the configuration data or the test data. If the configuration data is, the setting of the robot and the corresponding part of the variable are written.
And 3, mainly judging the case data, judging whether the case data belong to the same case, if so, generating no new case in the test case in the robot format, and directly and continuously writing the test data in the previous case.
Further, the embodiment further includes a process of generating a corresponding test suite, which may include:
step 1, judging whether the name of the current sheet page or the name of the table belongs to a special configuration name.
And 1.1, if the configuration is the special sheet page name or table name, reading the configuration data, and automatically converting the configuration data into the robot format content according to the corresponding configuration item.
And 1.2, if the special sheet page name or the table name is not configured, reading the configuration data line by line, and generating a test case by one line of test data. And performing assertion matching on data such as a test target, test pre-operation, test post-operation, test input, test labels, expected results and the like in the test data and the actually obtained test result, and automatically converting the data into the content in the robot format. The use case name in the robot is the use case number _ use case module _ use case name combination name in the test data.
Step 2, judging whether the case number is the same as the previous data:
step 2.1, if the use case numbers are the same, writing the data into the content of the previous use case;
and 2.2, if the use case numbers are different, writing the data into the new use case content.
Therefore, the related test data before and after the step are put in the same test case, so that the scene case is generated. For example, in an interface test, a piece of data is directly deleted, which piece of data is deleted cannot be known in a simple automatic case, and by this means, data such as a data ID can be queried once in one case, and then the data ID in a query result is taken out, so that deletion of a certain piece of data is realized.
For example, if an event A occurs first and then an event B occurs, C should occur in anticipation; and B occurs first and a then D should be expected. Therefore, in practice, very complex scene use cases can be generated according to the steps, test data can be written in the same use case as long as the use case numbers are the same, and the use case data can be associated front and back and predicate and judge the actual test result and the expected test result.
In the prior art, the robot framework minimum granularity is a test case, and when one case needs to contain a plurality of test data, the test case in the robot format needs to be modified manually, so that testers need to be familiar with the robot test framework and writing the syntactic structure of the test case by the robot. The use threshold of the tester can be reduced through the step, and the tester can automatically generate the scene test case only by setting the same test case and different test data to be the same.
And 3, assembling the data contents, and automatically integrating into a test suite in a robot format:
and automatically integrating and assembling the configuration content and the test cases of the test data into a test suite in a robot format. The name of the sheet page or the name of the table is automatically used as the name of the test suite, so that different sheet pages or tables can automatically generate different test suite names. And automatic generation of scenario use cases is supported.
Therefore, according to the embodiment, the read data are divided into the configuration data and the non-configuration data, the configuration content and the test case are respectively generated, and finally the configuration content and the test case are integrated and assembled into the test suite, so that the corresponding configuration content and the corresponding test case do not need to be manually written, the efficiency of obtaining the test suite is improved, the test efficiency is further improved, and the labor cost is reduced.
In the following, the automatic generation test suite device provided in the embodiments of the present application is introduced, and the automatic generation test suite device described below and the automatic generation test suite method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an apparatus for automatically generating a test suite according to an embodiment of the present disclosure.
In this embodiment, the apparatus may include:
a data reading module 100 for reading data from a file or a database;
a configuration data judging module 200, configured to judge whether the data is configuration data;
a configuration content extracting module 300, configured to, when the data is configuration data, convert the configuration data into configuration content according to a robot format;
the test case extraction module 400 is configured to, when the data is not the configuration data, perform assertion matching according to the data to obtain a test case;
and the kit generating module 500 is configured to integrate and assemble the configuration content and the test case according to the robot format to obtain the test kit.
Optionally, the test case extraction module 400 is specifically configured to read data line by line to obtain multiple pieces of data; performing content matching on each piece of data to obtain a test target, a test preposition operation, a test postposition operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data; and converting the test target, the test preposition operation, the test postposition operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data according to the robot format to obtain the test case.
Optionally, the test case extraction module 400 is specifically configured to perform assertion matching according to the data to obtain a plurality of test cases; aggregating a plurality of test cases according to the scene test rule to obtain a plurality of groups of test cases; and integrating each group of test cases into a scene case and using the scene case as the test case.
An embodiment of the present application further provides a server, including:
a memory for storing a computer program;
a processor for implementing the steps of the method for automatically generating a test suite as described in the above embodiments when executing the computer program.
Embodiments of the present application further provide 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 method for automatically generating a test suite according to the above embodiments.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method for automatically generating a test suite, the device for automatically generating a test suite, the server and the computer-readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A method for automatically generating a test suite, comprising:
reading data from a file or database;
judging whether the data is configuration data or not;
if yes, converting the configuration data into configuration content according to a robot format;
if not, performing assertion matching according to the data to obtain a test case;
and integrating and assembling the configuration content and the test case according to a robot format to obtain a test suite.
2. The method of claim 1, wherein performing assertion matching according to the data to obtain a test case comprises:
reading the data line by line to obtain a plurality of pieces of data;
performing content matching on each piece of data to obtain a test target, a test preposition operation, a test postposition operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data;
and converting the test target, the test preposition operation, the test postposition operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data according to a robot format to obtain the test case.
3. The method of claim 1, wherein performing assertion matching according to the data to obtain a test case comprises:
performing assertion matching according to the data to obtain a plurality of test cases;
aggregating the plurality of test cases according to the scene test rule to obtain a plurality of groups of test cases;
and integrating each group of test cases into a scene case, and using the scene case as the test case.
4. The method of automatically generating a test suite according to claim 1, wherein converting the configuration data into configuration content according to a robot format comprises:
performing content matching on the configuration data according to a robot format to obtain setting information, variable information and keyword information;
integrating the setting information, the variable information and the keyword information into the configuration content.
5. The method of claim 3, wherein the step of integrating and assembling the configuration content and the test case according to robot format to obtain a test suite comprises:
and integrating and assembling the configuration content and the corresponding scene case according to a robot format to obtain a scene test suite as the test suite.
6. An apparatus for automatically generating a test suite, comprising:
the data reading module is used for reading data from a file or a database;
the configuration data judging module is used for judging whether the data is configuration data or not;
the configuration content extraction module is used for converting the configuration data into configuration content according to a robot format when the data is the configuration data;
the test case extraction module is used for carrying out assertion matching according to the data to obtain a test case when the data is not the configuration data;
and the kit generation module is used for integrating and assembling the configuration content and the test case according to a robot format to obtain a test kit.
7. The device for automatically generating a test suite according to claim 6, wherein the test case extraction module is specifically configured to read the data line by line to obtain a plurality of pieces of data; performing content matching on each piece of data to obtain a test target, a test preposition operation, a test postposition operation, a test input, a test label, an expected result and an actual test result corresponding to each piece of data; and converting the test target, the test preposition operation, the test postposition operation, the test input, the test label, the expected result and the actual test result corresponding to each piece of data according to a robot format to obtain the test case.
8. The device for automatically generating a test suite according to claim 6, wherein the test case extraction module is specifically configured to perform assertion matching according to the data to obtain a plurality of test cases; aggregating the plurality of test cases according to the scene test rule to obtain a plurality of groups of test cases; and integrating each group of test cases into a scene case, and using the scene case as the test case.
9. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of automatically generating a test suite as claimed in any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the method of automatically generating a test suite according to any one of claims 1 to 5.
CN202110936974.0A 2021-08-16 2021-08-16 Method for automatically generating test suite and related device Withdrawn CN113656305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110936974.0A CN113656305A (en) 2021-08-16 2021-08-16 Method for automatically generating test suite and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110936974.0A CN113656305A (en) 2021-08-16 2021-08-16 Method for automatically generating test suite and related device

Publications (1)

Publication Number Publication Date
CN113656305A true CN113656305A (en) 2021-11-16

Family

ID=78479248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110936974.0A Withdrawn CN113656305A (en) 2021-08-16 2021-08-16 Method for automatically generating test suite and related device

Country Status (1)

Country Link
CN (1) CN113656305A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694114A (en) * 2017-04-06 2018-10-23 广东亿迅科技有限公司 Method and its system for detaching test case, test script and test data
CN110245083A (en) * 2019-06-11 2019-09-17 四川长虹电器股份有限公司 A kind of automatic interface testing method based on python
US20200250208A1 (en) * 2019-01-31 2020-08-06 Salesforce.Com, Inc. Automatic Discovery of Locations of Translated Text in Localized Applications
CN112100080A (en) * 2020-11-03 2020-12-18 广州市玄武无线科技股份有限公司 Control testing method and device, terminal equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694114A (en) * 2017-04-06 2018-10-23 广东亿迅科技有限公司 Method and its system for detaching test case, test script and test data
US20200250208A1 (en) * 2019-01-31 2020-08-06 Salesforce.Com, Inc. Automatic Discovery of Locations of Translated Text in Localized Applications
CN110245083A (en) * 2019-06-11 2019-09-17 四川长虹电器股份有限公司 A kind of automatic interface testing method based on python
CN112100080A (en) * 2020-11-03 2020-12-18 广州市玄武无线科技股份有限公司 Control testing method and device, terminal equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN107665171B (en) Automatic regression testing method and device
CN109254907B (en) Java-based interface test report generation method and system
Sincero et al. Approaching non-functional properties of software product lines: Learning from products
CN109522228B (en) Interface automation test data construction method, device, platform and storage medium
US20070061641A1 (en) Apparatus and method for generating test driver
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
CN111158656B (en) Test code generation method and device based on fruit tree method
CN112597062B (en) Military software structured quality data extraction method and device and software testing device
CN112597028A (en) Method and device for displaying case test result and readable storage medium
CN112181854A (en) Method, device, equipment and storage medium for generating flow automation script
CN111679808A (en) RPA robot application requirement evaluation method and device
CN109086985B (en) Professional test information management system for spacecraft assembly
CN111190814A (en) Software test case generation method and device, storage medium and terminal
CN114328278A (en) Distributed simulation test method, system, readable storage medium and computer equipment
CN111143228B (en) Test code generation method and device based on decision table method
CN115794639B (en) Visual test based on flow and visual simulation test system and method
CN113656305A (en) Method for automatically generating test suite and related device
CN116016270A (en) Switch test management method and device, electronic equipment and storage medium
CN114297961A (en) Chip test case processing method and related device
JP2016081397A (en) Design verification support device and design verification support method
CN112329124B (en) CAE model error checking method, apparatus, computer device and storage medium
CN111552639A (en) Software test comprehensive control method and system
CN107085553B (en) Input box testing method and device
CN114448851B (en) Automatic data testing method and system
CN114924992B (en) Formalized FPGA software security verification method and verification system

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: 20211116

WW01 Invention patent application withdrawn after publication