CN116860636A - Unit test code generation method, device, equipment and storage medium - Google Patents

Unit test code generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116860636A
CN116860636A CN202310834161.XA CN202310834161A CN116860636A CN 116860636 A CN116860636 A CN 116860636A CN 202310834161 A CN202310834161 A CN 202310834161A CN 116860636 A CN116860636 A CN 116860636A
Authority
CN
China
Prior art keywords
unit test
target
data
code generation
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310834161.XA
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310834161.XA priority Critical patent/CN116860636A/en
Publication of CN116860636A publication Critical patent/CN116860636A/en
Pending legal-status Critical Current

Links

Classifications

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

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 application provides a unit test code generation method, device, equipment and storage medium, which can be used in the field of big data. The method comprises the steps of obtaining a unit test code generation request facing to a target unit test object, connecting the database based on the mapping relation of fields in the input and output participation database, obtaining data structure information of data corresponding to target fields and target fields in a data table related to input and output information in the database, and facilitating related test operation on the database. In addition, by injecting the target field and the data structure information into the unit test template, an SQL mapping file can be automatically generated, the SQL mapping file contains database operation sentences, and the input parameter information and the output parameter information are written into a JSON text. Finally, the JSON text and the unit test template are encoded according to JAVA encoding specifications, so that the unit test engineering of the target unit test object is generated, additional manual encoding is not needed, the development efficiency of the unit test code is improved, and the unit test effect is good.

Description

Unit test code generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of big data, and in particular, to a method, an apparatus, a device, and a storage medium for generating a unit test code.
Background
The unit test is a software test method, can help developers to discover software BUGs (BUGs) as early as possible, and is an important link for guaranteeing the quality of software. The current transaction banking systems employ a hierarchical architecture in which the volume of data access layers is large, involving the manipulation of adding, deleting, or otherwise looking up hundreds or even more data tables, and many data tables contain near-hundred or more fields for business reasons. If the unit test of the data access layer is realized in a manual coding mode, the development period is long, and the development process is tedious and repeated.
In the related art, a tool for automatically generating the unit test code can generate a simple unit test code, but a developer needs to further modify the unit test code in the face of a data access layer in a transaction banking system, so that the development efficiency of the unit test code is lower, and the unit test effect is poorer.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for generating unit test codes, which are used for improving development efficiency of the unit test codes and providing credible unit tests.
In a first aspect, the present application provides a unit test code generating method, including:
obtaining a unit test code generation request facing to a target unit test object, wherein the unit test code generation request carries an object identifier, parameter entering information and parameter exiting information of the target unit test object, the parameter entering information comprises target parameter entering and test data corresponding to the target parameter entering, the parameter exiting information comprises target parameter exiting and test data corresponding to the target parameter exiting, the target unit test object comprises a class and/or a method in a source code to be tested, and the source code to be tested relates to database operation;
acquiring data structure information of data corresponding to a target field and a target field in a data table related to the input information and the output information in the database based on the mapping relation of the fields in the input and output participation database;
injecting the target field and the data structure information into a unit test template to generate a structured query language (Structured Query Language, SQL for short) mapping file, wherein the SQL mapping file comprises database operation sentences, and writing the parameter entering information and the parameter exiting information into a JSON text, and the JSON text is used for storing and representing data;
and encoding the JSON text and the unit test template according to JAVA encoding specifications to generate a unit test project of the target unit test object, wherein the unit test project comprises unit test codes and an XML file, and the XML file comprises information in an SQL mapping file and configuration injection information of related components.
In one possible implementation manner, the obtaining the unit test code generation request for the target unit test object includes:
receiving a first interaction operation acting on a first control on a unit test code generation interface, wherein the first control is used for triggering the generation of the unit test code;
and responding to the first interaction operation, and acquiring a unit test code generation request facing the target unit test object.
In one possible implementation manner, the unit test code generating interface further displays an optional input parameter and an optional output parameter, where the unit test code generating interface further includes a first area and a second area, the optional input parameter is displayed in the first area, the optional output parameter is displayed in the second area, and before receiving the first interaction operation, the unit test code generating interface further includes:
responding to a first selection operation aiming at the optional ginseng, determining that the target ginseng is the ginseng corresponding to the first selection operation, and distinguishing and displaying the target ginseng in a first area;
and responding to a second selection operation aiming at the alternative out-taking parameters, determining the out-taking parameters of the target as the out-taking parameters corresponding to the second selection operation, and displaying the out-taking parameters of the target in a second area in a distinguishing mode.
In one possible implementation manner, the first area further displays first test data corresponding to optional input parameters, and the second area further displays second test data corresponding to optional output parameters, where the first test data and the second test data are editable.
In one possible implementation manner, the unit test code generating method further includes:
responding to a first editing operation aiming at the first test data, and determining that the test data corresponding to the target entry contains the test data edited by the first editing operation, wherein the first editing operation is used for adjusting at least one of the field name, the data size, the data length and the data type of the first test data;
and/or, in response to a second editing operation for the second test data, determining that the test data corresponding to the target parameter contains the test data edited by the second editing operation, wherein the second editing operation is used for adjusting at least one of a field name, a data size, a data length and a data type of the second test data.
In one possible implementation, the naming of the optional incoming parameters and the naming of the optional outgoing parameters follow a data dictionary; and, the first test data and the second test data are both test data generated for different types of parameters based on the data dictionary.
In a possible implementation manner, the unit test code generating interface further displays a candidate unit test object, where the unit test code generating interface further includes a third area, and the candidate unit test object is displayed in the third area, and before determining the target in-parameter and the target out-parameter, the unit test code generating interface further includes:
and responding to the third selection operation aiming at the candidate unit test object, determining that the target unit test object is the unit test object selected by the third selection operation, and distinguishing and displaying the target unit test object in a third area.
In one possible implementation manner, the unit test code generating method further includes:
the candidate unit test object is a unit test object contained in the obtained source code to be tested in response to obtaining the source code to be tested;
and/or the candidate unit test object is displayed in the unit test code generation interface, or the candidate unit test object is contained in the manifest file.
In a possible implementation manner, the unit test code generation interface further includes a second control, where the second control is used to obtain the source code to be tested.
In a second aspect, the present application provides a unit test code generating apparatus comprising:
The system comprises an acquisition module, a database operation module and a database operation module, wherein the acquisition module is used for acquiring a unit test code generation request facing to a target unit test object, wherein the unit test code generation request carries an object identifier of the target unit test object, parameter entering information and parameter exiting information, the parameter entering information comprises test data corresponding to target parameter entering and parameter entering, the parameter exiting information comprises test data corresponding to target parameter exiting and target parameter exiting, the target unit test object comprises a class and/or a method in a source code to be tested, and the source code to be tested relates to the database operation;
acquiring data structure information of data corresponding to a target field and a target field in a data table related to the input information and the output information in the database based on the mapping relation of the fields in the input and output participation database;
the processing module is used for injecting the target field and the data structure information into the unit test template to generate an SQL mapping file, wherein the SQL mapping file comprises database operation sentences, and the input parameter information and the output parameter information are written into a JSON text, and the JSON text is used for storing and exchanging data;
the coding module is used for coding the JSON text and the unit test template according to JAVA coding specifications to generate a unit test project of the target unit test object, wherein the unit test project comprises unit test codes and an XML file, and the XML file comprises information in an SQL mapping file and configuration injection information of related components.
In one possible implementation, the obtaining module may be specifically configured to: receiving a first interaction operation acting on a first control on a unit test code generation interface, wherein the first control is used for triggering the generation of the unit test code; and responding to the first interaction operation, and acquiring a unit test code generation request facing the target unit test object.
In one possible implementation manner, the unit test code generation interface further displays an optional input parameter and an optional output parameter, wherein the unit test code generation interface further comprises a first area and a second area, the optional input parameter is displayed in the first area, and the optional output parameter is displayed in the second area. The acquisition module is also used for: responding to a first selection operation aiming at the optional ginseng, determining that the target ginseng is the ginseng corresponding to the first selection operation, and distinguishing and displaying the target ginseng in a first area; and responding to a second selection operation aiming at the alternative out-taking parameters, determining the out-taking parameters of the target as the out-taking parameters corresponding to the second selection operation, and displaying the out-taking parameters of the target in a second area in a distinguishing mode.
In one possible implementation manner, the first area further displays first test data corresponding to optional input parameters, and the second area further displays second test data corresponding to optional output parameters, where the first test data and the second test data are editable.
In one possible implementation, the acquisition module may also be configured to: responding to a first editing operation aiming at the first test data, and determining that the test data corresponding to the target entry contains the test data edited by the first editing operation, wherein the first editing operation is used for adjusting at least one of the field name, the data size, the data length and the data type of the first test data; and/or, in response to a second editing operation for the second test data, determining that the test data corresponding to the target parameter contains the test data edited by the second editing operation, wherein the second editing operation is used for adjusting at least one of a field name, a data size, a data length and a data type of the second test data.
In one possible implementation, the naming of the optional incoming parameters and the naming of the optional outgoing parameters follow a data dictionary; and, the first test data and the second test data are both test data generated for different types of parameters based on the data dictionary.
In a possible implementation manner, the unit test code generating interface further displays a candidate unit test object, wherein the unit test code generating interface further includes a third area, and the candidate unit test object is displayed in the third area. Correspondingly, the acquisition module may also be configured to: before determining the target in-parameter and the target out-parameter, responding to a third selection operation aiming at the candidate unit test objects, determining that the target unit test objects are the unit test objects selected by the third selection operation, and distinguishing and displaying the target unit test objects in a third area.
In one possible implementation, the candidate unit test object is a unit test object contained in the obtained source code to be tested in response to obtaining the source code to be tested.
In one possible implementation, the candidate unit test object is displayed in the unit test code generation interface or the candidate unit test object is contained in a manifest file.
In a possible implementation manner, the unit test code generation interface further includes a second control, where the second control is used to obtain the source code to be tested.
In a third aspect, the present application provides an electronic device comprising: a processor, a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory causes the processor to perform the unit test code generation method of any of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, are adapted to carry out the unit test code generation method according to any one of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed, implements the unit test code generation method according to any of the first aspects.
According to the unit test code generation method, device, equipment and storage medium provided by the application, the unit test code generation request for the target unit test object is obtained, and the data structure information of the data corresponding to the target field and the target field in the data table related to the input information and the output information in the database is obtained by connecting the database based on the mapping relation of the fields in the input and output participation database, so that the related test operation on the database is facilitated. In addition, by injecting the target field and the data structure information into the unit test template, an SQL mapping file can be automatically generated, the SQL mapping file contains database operation sentences, and the input parameter information and the output parameter information are written into the JSON text. Finally, the JSON text and the unit test template are encoded according to JAVA encoding specifications, so that the unit test engineering of the target unit test object is generated, additional manual encoding is not needed, the development efficiency of the unit test code is improved, and the unit test effect is good.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is an application scenario diagram of a unit test code generation method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for generating unit test codes according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a unit test code generation method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a unit test code generating device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The method, the device, the equipment and the storage medium for generating the unit test code can be used in the field of big data and can also be used in any field except the field of big data, and the application fields of the method, the device, the equipment and the storage medium for generating the unit test code are not limited.
Explanation of the terms involved in the present application follows:
transaction bank: china banking is oriented to online transaction online banking which is the leading global.
Data access layer: is responsible for interacting with the database, running database queries and performing updates. The simple expression is to realize the operations of inquiring, inserting, updating, deleting and the like of the data table.
The current tool for automatically generating the unit test code can generate a basic test framework, but a data access layer in a transaction banking system relates to database operation, and the current tool cannot automatically generate operation for adding, deleting and checking database data, but only performs unit test based on the tested class and method. In addition, the pain point of the data access layer unit test also comprises preparation of test data, parameterization of the test data and verification of the function call result to be tested. Especially in the face of complex data tables with hundreds or even more fields in transaction banking systems, it is more difficult to efficiently and accurately prepare data and verify test results, and the related art cannot well solve the problems.
In view of the above technical problems, the present application provides a method, an apparatus, a device, and a storage medium for generating a unit test code, in which the generated unit test code includes a related test code for a related database operation, so that the method is suitable for unit test of an object related to the database operation, and does not need to perform additional manual coding, thereby improving development efficiency of the unit test code and unit test effect.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is an application scenario diagram of a unit test code generation method according to an embodiment of the present application. Referring to fig. 1, the related personnel act on the terminal device 11, and trigger the automatic generation of the unit test code through the terminal device 11. In response to the interaction of the related person, the terminal device 11 transmits a unit test code generation request for the target unit test object to the server 12. The server 12, in response to receiving the request, acquires the source code to be tested from the terminal device 13, acquires data structure information of data corresponding to the target field and the target field in the data table related to the input information and the output information in the database based on the mapping relation of the fields in the input participation database, injects the target field and the data structure information into the unit test template, writes the input information and the output information into the JSON text, encodes the JSON text and the unit test template according to the JAVA encoding specification, and returns the generated unit test engineering of the target unit test object to the terminal device 11.
It should be noted that the application scenario shown in fig. 1 is only an example. Any two or three of the terminal device 11, the server 12, and the terminal device 13 may be the same device, and the number of the various devices is not limited. The terminal device 11 and the terminal device 13 may be wearable devices, mobile phones, computers, notebooks, personal digital assistants (Personal Digital Assistant, PDA for short), etc.; the server 12 may also be replaced with a server cluster.
Fig. 2 is a flowchart illustrating a unit test code generation method according to an embodiment of the application. Referring to fig. 2, the unit test code generating method includes:
s201, acquiring a unit test code generation request facing to a target unit test object, wherein the unit test code generation request carries an object identifier, input parameter information and output parameter information of the target unit test object, the input parameter information comprises test data corresponding to a target input parameter and a target input parameter, the output parameter information comprises test data corresponding to a target output parameter and a target output parameter, the target unit test object comprises a class and/or a method in a source code to be tested, and the source code to be tested relates to database operation.
The unit test refers to checking and verifying the smallest testable unit in the software, wherein the unit is the smallest tested functional module manually specified, for example, a JAVA unit refers to a class, and a C unit refers to a function.
A class is used to describe the behavior and state of a class of objects, and is an abstraction of objects that have the same properties and behavior. A method may be a piece of code that performs a particular function, similar to a function.
Input parameters of the input reference class and/or method, output parameters of the output reference class and/or method, and the parameters are named globally unique.
The database is used for organizing, storing and managing various business data, user data and the like, and common operations of the database comprise addition, deletion, modification, check and the like of a data table or a data item or field; correspondingly, the classes and/or methods in the test source code mainly comprise adding, deleting, modifying, checking and the like to the database.
Object identification is a globally unique value associated with an object that is used to unambiguously identify the object, ensuring that the object is properly located and managed in communication and information processing. In colloquial terms, the object identification is an identity card of the object in the network communication.
S202, based on the mapping relation of the fields in the access participation database, acquiring data structure information of data corresponding to the target fields and the target fields in a data table related to the access information and the access information in the database.
The database contains various components including data tables, views, fields, indexes, etc.; a table consisting of a set of data records, the data in the database being organized in units of tables; the fields are also called fields, each column in the table is called a field, and each field has corresponding description information, such as data type, data width, etc.; a view is a virtual table derived from one or several base tables (or views), another way to view the data in the table.
In general, the fields in the entry and exit participating database tables of the classes and/or methods in the JAVA codes are in one-to-one correspondence, and have corresponding mapping relations, so that certain fields in a certain data table in the database can be positioned through entry and exit parameters.
In this step, the database may be accessed by using a third party plug-in or software tool to access the database to obtain the relevant data information. Alternatively, the database related operation can be performed by configuring Windows system environment and connecting the database with the command of disk operating system (Disk Operating System, DOS for short)
S203, the target field and the data structure information are injected into the unit test template, an SQL mapping file is generated, the SQL mapping file contains database operation sentences, the input parameter information and the output parameter information are written into a JSON text, and the JSON text is used for storing and representing data.
In this step, the unit test templates are prepared in advance, and an open source preset template may be used, and it is understood that the template constructs the structure of the unit test code. The embodiment of the application generates the unit test code for the data access layer, and the business of the data access layer generally relates to the operations of adding, deleting, modifying, checking and the like of the database, and the unit test template is relatively simple.
The method comprises the steps of injecting target fields and data structure information into a unit template test template, wherein the unit template test template is subjected to parameter filling and template rendering according to the target fields and the data structure information.
JSON text is a file for storing simple data structures and objects, is a lightweight data exchange format, and is based on a subset of the JS specification (European Computer Manufacturers Association, ECMAScript) established by the european computer institute, using a text format that is completely independent of programming language to store and represent data for use in many Web applications for data exchange.
For example, the method in the third party Jar package can be directly called to process the in-parameter information and the out-parameter information and write the in-parameter information and the out-parameter information into the JSON text, wherein the third party Jar package refers to a JAVA tool class written by a third party and contains a plurality of written methods.
S204, encoding the JSON text and the unit test template according to JAVA encoding specifications to generate a unit test project of the target unit test object, wherein the unit test project comprises unit test codes and an XML file, and the XML file comprises information in an SQL mapping file and configuration injection information of related components.
In the step, coding the JSON text and the unit test template according to the JAVA coding specification is implemented by a code block, specifically, the test data corresponding to the access parameters in the JSON text are read, the corresponding positions in the unit test template are written, and the reading and writing processes are implemented completely according to the JAVA coding specification.
The unit test engineering can realize running unit test codes (also called automatic scripts) to realize automatic test. The unit test engineering comprises unit test codes and XML files for assisting the engineering operation, for example, the XML files contain SQL mapping information, configuration injection of beans and the like, and the beans are used for packaging data and business logic and can be understood as a reusable component.
According to the embodiment of the application, the unit test code generation request facing to the target unit test object is acquired, and the data structure information of the data corresponding to the target field and the target field in the data table related to the input information and the output information in the database is acquired by connecting the database based on the mapping relation of the fields in the input and output participation database, so that the related test operation on the database is facilitated, and the difficulty of verifying the unit test result is reduced. In addition, by injecting the target field and the data structure information into the unit test template, an SQL mapping file containing database operation sentences can be automatically generated. Finally, through coding the JSON text and the unit test template, the unit test engineering of the target unit test object is automatically generated, additional manual coding is not needed, the development efficiency of the unit test code is improved, and the unit test effect is good.
In addition, in consideration of the existing tools for automatically generating the unit test codes, a developer needs to master a certain skill before the unit test codes can be used, and the unit test codes have a certain limitation. Therefore, the unit test code is automatically generated for the user in a visual mode, so that developers are liberated, development efficiency is improved, and trusted unit tests are provided.
Based on the foregoing embodiment, in one possible implementation manner, the obtaining a unit test code generation request for a target unit test object may include:
step 1, receiving a first interaction operation acting on a first control on a unit test code generation interface, wherein the first control is used for triggering generation of the unit test code.
In this step, the unit test code generating interface may be presented through a web page version tool interface, for example, a browser/server (abbreviated as B/S architecture) is used to implement the unit test code generating tool, and the tool may be accessed on the browser in the form of a web address.
Alternatively, it may be presented in the form of a client tool, for example, using a client/server architecture (C/S architecture), where the unit test code generation tool needs to be installed.
The first control can be understood as a button on the unit test code generation interface, and the generation of the unit test code can be triggered by clicking the button corresponding to the first control, so that a unit test code generation request facing the target unit test object is generated.
It should be noted that, the embodiment of the present application is not limited to the form of the unit test code generating tool, and in practical application, is not limited to the two forms listed above. In addition, each button on the unit test code generation interface corresponds to different business logic, and the operation of the background business process can be triggered by clicking the button.
And step 2, responding to the first interactive operation, and acquiring a unit test code generation request facing the target unit test object.
According to the embodiment, on a visual tool interface, the unit test code is automatically generated by clicking the corresponding button/control on the interface, so that the unit test code generation flow is simplified, and the operation is simple and easy to use.
In some embodiments, the unit test code generating interface further displays an optional entering parameter and an optional exiting parameter, where the unit test code generating interface further includes a first area and a second area, the optional entering parameter is displayed in the first area, the optional exiting parameter is displayed in the second area, and before receiving the first interaction operation, the unit test code generating interface may further include:
Step 2-1, responding to a first selection operation for optional ginseng, determining that the target ginseng is the ginseng corresponding to the first selection operation, and distinguishing and displaying the target ginseng in a first area;
the first area displayed on the unit test code generation interface includes a plurality of entries to be selected, that is, a plurality of selectable entries, for example, a selection frame may be added in front of each entry for a user to select, and all the selection frames and entries are regularly arranged in the first area according to rows or columns.
The user can select the corresponding selecting frame of the input parameters according to the actual test requirement, and the selecting frame is selected, so that the corresponding input parameters are selected as target input parameters.
Alternatively, the corresponding color of the entry may be displayed differently than the other colors of the interface after the checkbox is selected, e.g., the corresponding entry may be highlighted blue after the checkbox is selected.
And 2-2, responding to a second selection operation for the alternative parameter, determining the target parameter as the parameter corresponding to the second selection operation, and distinguishing and displaying the target parameter in a second area.
The second area displayed on the unit test code generation interface includes a plurality of parameters to be selected, that is, a plurality of parameters to be selected, for example, a selection frame may be added in front of each parameter to be selected by a user, and all the selection frames and the parameters are arranged in the second area according to a row or a column rule.
The user can select the selection frame corresponding to the parameter at will according to the actual test requirement, and the selection frame is selected, so that the corresponding parameter is selected as the target parameter.
Alternatively, the corresponding color of the parameter may be displayed as a different color than the other colors of the interface after the checkbox is selected, e.g., the corresponding parameter changes to a highlighted green after the checkbox is selected.
In some embodiments, the first area may further display first test data corresponding to an optional entry parameter, and the second area may further display second test data corresponding to an optional exit parameter, where both the first test data and the second test data may be edited.
In one possible implementation manner, the unit test code generating method may further include at least one implementation manner of the following:
in a first implementation manner, responding to a first editing operation aiming at first test data, determining that the test data corresponding to the target entry contains the test data edited by the first editing operation, wherein the first editing operation is used for adjusting at least one of field names, data sizes, data lengths and data types of the first test data;
in a second implementation manner, in response to a second editing operation for the second test data, determining that the test data corresponding to the target parameter includes test data edited by the second editing operation, where the second editing operation is used for adjusting at least one of a field name, a data size, a data length and a data type of the second test data.
It should be noted that, the first editing operation and the second editing operation are not necessary operations in the unit test code generating process, if the first test data or the second test data automatically generated in the unit test code generating method already meets the current test requirement of the user, the first editing operation or the second editing operation is not performed; if the first test data and the second test data are not satisfied, a first editing operation or a second editing operation is required to be performed on the first test data or the second test data automatically generated in the unit test code generation method.
In the embodiment, the unit test code generation method has the function of user customization in the aspect of test data preparation, so that the test data is more reasonable and accurate, the test requirement of a customer is met, and the unit test effect is good.
Further, the naming of the optional entering parameter and the naming of the optional exiting parameter both follow a data dictionary; and, the first test data and the second test data are both test data generated for different types of parameters based on the data dictionary. That is, when developing a transaction banking system, the naming of access parameters involved in the source code of the data access layer follows the existing data dictionary to facilitate unified maintenance management and the invocation of other code modules in the system.
Correspondingly, when the development unit tests the interface of the generated code, a developer prepares a test data module in advance, and the module can provide test data corresponding to the access parameters for the target unit test object including the class and/or the method in the source code to be tested; and the module multiplexes the existing data dictionary to ensure that the names of the access parameters related in the source codes of the data access layer are unified with the names of the parameters in the test data module.
When the first test data and the second test data are generated, based on the test data module, the data can be parameterized, the data can be packaged into a data structure or type required by the class and/or the method in the source code to be tested, and the first test data and the second test data can be randomly generated according to the data type and the length.
According to the embodiment, the test data module is prepared in advance, the test data corresponding to the access parameters is provided for the class and/or the method in the test source code, the effect of preparing the test data efficiently and accurately is achieved, and the pain point of the test of the data access layer unit in the prior art is solved.
In some embodiments, the unit test code generating interface may further display a candidate unit test object, where the unit test code generating interface further includes a third area, and the candidate unit test object is displayed in the third area. In this case, before determining the target in-parameter and the target out-parameter, the unit test code generating method may further include: and responding to the third selection operation aiming at the candidate unit test object, determining that the target unit test object is the unit test object selected by the third selection operation, and distinguishing and displaying the target unit test object in a third area.
The third area displayed on the unit test code generation interface contains a plurality of candidate unit test objects, namely a plurality of classes and/or methods in the alternative source codes to be tested, and for example, a check box can be added in front of each class and/or method to be tested for a user to check, and all the check boxes and the classes and/or methods to be tested are regularly arranged in the third area according to rows or columns.
The user can select the selecting frame corresponding to the class and/or method to be tested at will according to the actual test requirement, and the selecting frame is selected, so that the class and/or method to be tested corresponding to the selecting frame is selected as the target class and/or method to be tested, namely the target unit test object.
Alternatively, the color of the corresponding target unit test object may be displayed differently from the other colors of the interface after the checkbox is selected, e.g., the corresponding target unit test object changes to a highlight purple after the checkbox is selected.
Further, the unit test code generation method may further include at least one implementation of:
in the first implementation manner, the candidate unit test objects are unit test objects contained in the obtained source code to be tested in response to obtaining the source code to be tested.
In this embodiment, after the source code to be tested is obtained, the candidate unit test object may preset the class and/or method according to the rule of the JAVA code to identify the class and/or method, that is, identify the unit test object contained in the source code to be tested.
Alternatively, the getName () method of the ready Class may be called, which returns a string representing the Class name. Alternatively, calling the getMethods () Method of the Class gets all the public methods of the Class, which returns a Method array representing all the public methods of the Class.
In one possible implementation manner, the obtaining of the source code to be tested may be achieved by: the unit test code generation interface also comprises a second control, and the second control is used for acquiring the source code to be tested.
The second control can be understood as a button on the unit test code generation interface, and the source code to be tested can be triggered and acquired by clicking the button corresponding to the second control.
Specifically, after clicking a button corresponding to the second control, the unit test code generation interface prompts the user to upload the source code to be tested, and the user can upload the source code to be tested to a third-party open source code hosting platform in advance, for example, git, hua-Chen cloud DevCloud and the like. And integrating a third-party open source code hosting platform in the unit test code generation interface, and obtaining the source code to be tested by configuring the address of the third-party open source code hosting platform on the interface.
Optionally, after clicking a button corresponding to the second control, the unit test code generating interface prompts the user to upload the source code to be tested, and uploading the source code to be tested is performed by selecting a local uploading mode, for example, clicking a local uploading button on the unit test code generating interface, selecting a local saving path of the source code to be tested, clicking and determining, and then finishing local uploading.
In a second implementation, the candidate unit test object is displayed in the unit test code generation interface or the candidate unit test object is contained in a manifest file.
For example, the candidate unit test object is to respond to the obtained source code to be tested, identify the unit test object contained in the source code to be tested, and directly display the identified result (i.e. the candidate unit test object) on the unit test code to generate an interface, and then the user checks the candidate unit test object on the interface according to the actual test requirement; alternatively, the identified result (i.e., the candidate unit test object) may be generated in the form of a manifest file, which is opened by the user to sort the candidate unit test object, and the modified manifest file is uploaded again to the unit test code generation interface after sorting is completed.
According to the embodiment of the application, the unit test code generation method is realized by the visual interface, the operation is simple, and the development efficiency is improved.
Next, the unit test code generation method is further described in connection with fig. 3 from the application point of view, referring to the flowchart shown in fig. 3.
S301, uploading source codes of a data access layer by a user.
The user uploads the source code of the data access layer to the unit test code generation interface in the manner in the embodiment, and then, the source code analysis module in the unit test code generation tool analyzes the uploaded source code to obtain the JAVA class and/or method in the source code packet to be tested, and obtains the mapping relation of the class and/or method in the source code packet to be tested, such as the mapping relation of the input and input participating database fields, the output and output participating database fields, and the like.
S302, a user selects a class and/or a method which needs to generate a unit test.
The user can select JAVA class and/or method in the source code packet to be tested obtained in S301 according to actual test requirements, and pick up the test object of the target unit.
S303, calling a test data module to acquire test data and parameterizing.
The test data module provides test data corresponding to the access parameters for the class and/or method to be tested. In the process of developing a transaction banking system, a developer should follow an existing data dictionary in parameter naming, and the module multiplexes the data dictionary and provides different strategies for generating test data for different types of data, wherein the test data is generated after parameterization.
S304, the unit test code generation interface displays the class and/or method to be tested, the input data and information and the output data and information, and supports user customization.
As described in the method in the foregoing embodiment, the unit test code generation interface may display the candidate unit test object, the target unit test object, the optional input parameter and the corresponding test data, and the optional output parameter and the corresponding test data, where the fields included in the test data correspond to the database fields.
The user can select the access parameters and adjust the test data corresponding to the access parameters, including at least one of field names, data sizes, data lengths and data types.
And S305, after the user customization is completed, generating a unit test code.
After the customization is completed, for example, a unit test code generation button can be clicked, and the operation of the unit test code automatic generation module is triggered.
Firstly, a database module is called, and the database module is used for capturing detailed information of tables, fields, views and the like in a database and generating corresponding adding, deleting and modifying check codes. The method comprises the steps of connecting a database, acquiring detailed information (target field and data structure information) of fields in a database table/view corresponding to the input and output parameters of a target unit test object from the database according to user configuration of S304, and adding, deleting and modifying the database table/view.
And secondly, calling a test data module, providing test data corresponding to the access parameters for the target unit test object including the class and/or the method in the source code to be tested in the test data module according to the access parameters in the user configuration based on the user configuration of S304, and parameterizing the test data.
And thirdly, injecting the target field and the data structure information into a unit test template prepared in advance, generating an SQL mapping file, wherein the SQL mapping file comprises database operation sentences, writing the input parameter information and the output parameter information into a JSON text, and the JSON text is used for storing and representing data.
And finally, coding the JSON text and the unit test template according to JAVA coding specifications to generate a unit test project of the target unit test object, wherein the unit test project comprises unit test codes and an XML file, and the XML file comprises information in the SQL mapping file and configuration injection information of related components.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of a unit test code generating device according to an embodiment of the application. As shown in fig. 4, the unit test code generation apparatus 400 includes: an acquisition module 401, a processing module 402 and an encoding module 403. Wherein:
The obtaining module 401 is configured to obtain a unit test code generation request for a target unit test object, where the unit test code generation request carries an object identifier of the target unit test object, parameter entering information and parameter exiting information, the parameter entering information includes test data corresponding to a target parameter entering and a target parameter entering, the parameter exiting information includes test data corresponding to a target parameter exiting and a target parameter exiting, and the target unit test object includes a class and/or a method in a source code to be tested, and the source code to be tested relates to database operation; acquiring data structure information of data corresponding to a target field and a target field in a data table related to the input information and the output information in the database based on the mapping relation of the fields in the input and output participation database;
the processing module 402 is configured to inject the target field and the data structure information into the unit test template, generate an SQL mapping file, where the SQL mapping file includes a database operation statement, and write the parameter in information and parameter out information into a JSON text, where the JSON text is used to store and exchange data;
the encoding module 403 is configured to encode the JSON text and the unit test template according to the JAVA encoding specification, and generate a unit test project of the target unit test object, where the unit test project includes a unit test code and an XML file, and the XML file includes information in the SQL mapping file and configuration injection information of related components.
Alternatively, the obtaining module 401 may be specifically configured to: receiving a first interaction operation acting on a first control on a unit test code generation interface, wherein the first control is used for triggering the generation of the unit test code; and responding to the first interaction operation, and acquiring a unit test code generation request facing the target unit test object.
Optionally, the unit test code generating interface further displays an optional input parameter and an optional output parameter, wherein the unit test code generating interface further comprises a first area and a second area, the optional input parameter is displayed in the first area, and the optional output parameter is displayed in the second area. The acquisition module 401 may also be used to: before receiving the first interactive operation, responding to a first selection operation for the optional incoming parameters, determining that the target incoming parameters are the incoming parameters corresponding to the first selection operation, and distinguishing and displaying the target incoming parameters in a first area; and responding to a second selection operation aiming at the alternative out-taking parameters, determining the out-taking parameters of the target as the out-taking parameters corresponding to the second selection operation, and displaying the out-taking parameters of the target in a second area in a distinguishing mode.
Optionally, the first area further displays first test data corresponding to optional input parameters, and the second area further displays second test data corresponding to optional output parameters, wherein the first test data and the second test data are editable.
Optionally, the obtaining module 401 may be further configured to: in response to a first editing operation for the first test data, determining that the test data corresponding to the target participation includes the test data edited by the first editing operation, wherein the first editing operation is used for adjusting at least one of a field name, a data size, a data length and a data type of the first test data.
Optionally, the obtaining module 401 may be further configured to: in response to a second editing operation for the second test data, determining that the test data corresponding to the target reference contains test data edited by the second editing operation, wherein the second editing operation is used for adjusting at least one of a field name, a data size, a data length and a data type of the second test data.
Optionally, the naming of the optional entering parameter and the naming of the optional exiting parameter follow a data dictionary; and, the first test data and the second test data are both test data generated for different types of parameters based on the data dictionary.
Optionally, the unit test code generating interface further displays a candidate unit test object, wherein the unit test code generating interface further comprises a third area, and the candidate unit test object is displayed in the third area. Correspondingly, the acquisition module 401 may also be configured to: before determining the target in-parameter and the target out-parameter, responding to a third selection operation aiming at the candidate unit test objects, determining that the target unit test objects are the unit test objects selected by the third selection operation, and distinguishing and displaying the target unit test objects in a third area.
Optionally, the candidate unit test object is a unit test object contained in the obtained source code to be tested in response to obtaining the source code to be tested.
Alternatively, the candidate unit test object is displayed in the unit test code generation interface, or the candidate unit test object is contained in a manifest file.
Optionally, the unit test code generation interface further includes a second control, where the second control is used to obtain the source code to be tested.
The unit test code generating device provided by the embodiment of the application can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and the description is omitted.
It should be noted that, it should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. For example, the processing module may be a processing element that is set up separately, may be implemented in a chip of the above-mentioned apparatus, or may be stored in a memory of the above-mentioned apparatus in the form of program codes, and the functions of the above-mentioned processing module may be called and executed by a processing element of the above-mentioned apparatus. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
For example, the modules above may be one or more integrated circuits configured to implement the methods above, such as: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more microprocessors (Digital Signal Processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital subscriber line (Digital Subscriber Line, simply DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. Usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (Digital Video Disc, abbreviated to DVD)), or semiconductor media (e.g., solid State Disk (SSD)), etc.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device 500 includes: at least one processor 501, memory 502, and a communication interface 503. The memory 502 and the communication interface 503 are connected to the processor 501 through a system bus and complete communication with each other, the memory 502 is used for storing instructions, the communication interface 503 is used for communicating with other devices, and the processor 501 is used for calling the instructions in the memory to execute the method steps provided in the above embodiment of the unit test code generation method, and specific implementation manner and technical effects are similar and are not repeated here.
The system bus may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The system bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface 503 is used to enable communication between the database access apparatus and other devices (e.g., clients, read-write libraries, and read-only libraries).
The memory 502 may include random access memory (Random Access Memory, simply RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 501 may be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP) and the like; digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field programmable gate arrays (Field Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The embodiment of the application also provides a computer readable storage medium, in which computer executable instructions are stored, and the computer executable instructions are used for implementing the method steps in the unit test code generation method embodiment when being executed by a processor, and the specific implementation manner and technical effect are similar, and are not repeated here.
Embodiments of the present application also provide a program product containing computer-executable instructions. When the computer executing instructions are executed, to implement the method steps in the above embodiment of the unit test code generating method, the specific implementation manner and technical effects are similar, and will not be described herein again.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (13)

1. A unit test code generation method, comprising:
obtaining a unit test code generation request facing to a target unit test object, wherein the unit test code generation request carries an object identifier, entry information and exit information of the target unit test object, the entry information comprises target entry and test data corresponding to the target entry, the exit information comprises target exit and test data corresponding to the target exit, the target unit test object comprises a class and/or a method in a source code to be tested, and the source code to be tested relates to database operation;
Acquiring target fields in a data table related to the entry information and the exit information in the database and data structure information of data corresponding to the target fields based on the mapping relation of the fields in the entry and exit participation database;
injecting the target field and the data structure information into a unit test template to generate a Structured Query Language (SQL) mapping file, wherein the SQL mapping file contains database operation sentences, and writing the parameter entering information and the parameter exiting information into a JSON text, and the JSON text is used for storing and representing data;
and encoding the JSON text and the unit test template according to JAVA encoding specifications to generate a unit test project of the target unit test object, wherein the unit test project comprises a unit test code and an XML file, and the XML file comprises information in the SQL mapping file and configuration injection information of related components.
2. The unit test code generation method according to claim 1, wherein the acquiring the unit test code generation request for the target unit test object includes:
receiving a first interaction operation acting on a first control on a unit test code generation interface, wherein the first control is used for triggering the generation of the unit test code;
And responding to the first interaction operation, and acquiring a unit test code generation request facing the target unit test object.
3. The unit test code generation method according to claim 2, wherein an optional in-parameter and an optional out-parameter are also displayed in the unit test code generation interface, wherein the unit test code generation interface further comprises a first area and a second area, the optional in-parameter is displayed in the first area, the optional out-parameter is displayed in the second area, and further comprising, before receiving the first interactive operation:
responding to a first selection operation for the selectable ginseng, determining the target ginseng as the ginseng corresponding to the first selection operation, and displaying the target ginseng in the first area in a distinguishing mode;
and responding to a second selection operation for the selectable parameter outlet, determining that the target parameter outlet is the parameter outlet corresponding to the second selection operation, and displaying the target parameter outlet in a distinguishing mode in the second area.
4. A unit test code generation method according to claim 3, wherein the first area further displays first test data corresponding to the alternative entry and the second area further displays second test data corresponding to the alternative exit, both the first test data and the second test data being editable.
5. The unit test code generation method according to claim 4, further comprising:
responding to a first editing operation aiming at the first test data, and determining that the test data corresponding to the target participation contains the test data edited by the first editing operation, wherein the first editing operation is used for adjusting at least one of a field name, a data size, a data length and a data type of the first test data;
and/or, responding to a second editing operation aiming at the second test data, and determining that the test data corresponding to the target out-of-reference contains the test data edited by the second editing operation, wherein the second editing operation is used for adjusting at least one of field names, data sizes, data lengths and data types of the second test data.
6. The unit test code generation method according to claim 4, wherein the naming of the alternative in-parameters and the naming of the alternative out-parameters both follow a data dictionary; and the first test data and the second test data are test data generated for different types of parameters based on the data dictionary.
7. The unit test code generation method according to claim 3, wherein a candidate unit test object is further displayed in the unit test code generation interface, wherein the unit test code generation interface further includes a third area, the candidate unit test object is displayed in the third area, and before determining the target in-parameter and the target out-parameter, the unit test code generation interface further includes:
and responding to a third selection operation aiming at the candidate unit test object, determining that the target unit test object is the unit test object selected by the third selection operation, and displaying the target unit test object in a distinguishing mode in the third area.
8. The unit test code generation method according to claim 7, further comprising:
the candidate unit test object is a unit test object contained in the source code to be tested, which is obtained by responding to the acquisition of the source code to be tested and is identified;
and/or the candidate unit test object is displayed in the unit test code generation interface, or the candidate unit test object is contained in a manifest file.
9. The unit test code generation method according to any one of claims 2 to 8, wherein the unit test code generation interface further includes a second control, and the second control is used for acquiring the source code to be tested.
10. A unit test code generation apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a unit test code generation request facing to a target unit test object, the unit test code generation request carries an object identifier, parameter entering information and parameter exiting information of the target unit test object, the parameter entering information comprises target parameter entering and test data corresponding to the target parameter entering, the parameter exiting information comprises target parameter exiting and test data corresponding to the target parameter exiting, the target unit test object comprises a class and/or a method in a source code to be tested, and the source code to be tested relates to database operation; acquiring target fields in a data table related to the entry information and the exit information in the database and data structure information of data corresponding to the target fields based on the mapping relation of the fields in the entry and exit participation database;
the processing module is used for injecting the target field and the data structure information into a unit test template to generate a Structured Query Language (SQL) mapping file, wherein the SQL mapping file comprises database operation sentences, the parameter entering information and the parameter exiting information are written into a JSON text, and the JSON text is used for storing and representing data;
The coding module is used for coding the JSON text and the unit test template according to JAVA coding specifications to generate a unit test project of the target unit test object, wherein the unit test project comprises unit test codes and an XML file, and the XML file comprises information in the SQL mapping file and configuration injection information of related components.
11. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 9.
12. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1 to 9.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 9.
CN202310834161.XA 2023-07-07 2023-07-07 Unit test code generation method, device, equipment and storage medium Pending CN116860636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310834161.XA CN116860636A (en) 2023-07-07 2023-07-07 Unit test code generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310834161.XA CN116860636A (en) 2023-07-07 2023-07-07 Unit test code generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116860636A true CN116860636A (en) 2023-10-10

Family

ID=88224748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310834161.XA Pending CN116860636A (en) 2023-07-07 2023-07-07 Unit test code generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116860636A (en)

Similar Documents

Publication Publication Date Title
CN108415832B (en) Interface automation test method, device, equipment and storage medium
CN110309071B (en) Test code generation method and module, and test method and system
US6182245B1 (en) Software test case client/server system and method
CN109302522A (en) Test method, device and computer system and medium
CN111722839B (en) Code generation method and device, electronic equipment and storage medium
CN108628748B (en) Automatic test management method and automatic test management system
CN107665171A (en) Automatic regression test method and device
CN108897687A (en) A kind of API automated testing method and system based on data-driven
CN103810196A (en) Method for testing performance of database on basis of business model
US10445675B2 (en) Confirming enforcement of business rules specified in a data access tier of a multi-tier application
CN108345532A (en) A kind of automatic test cases generation method and device
CN101996131A (en) Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word
US7203671B1 (en) System and method for validating the technical correctness of an OLAP reporting project
US9652363B2 (en) Dependent object delegation tester
CN110990274A (en) Data processing method, device and system for generating test case
CN114372006A (en) Method and system for automatically generating test case, computer equipment and storage medium
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN111949543B (en) Test method and device based on distributed platform, electronic equipment and storage medium
CN117632710A (en) Method, device, equipment and storage medium for generating test code
CN116149666A (en) Grammar checking method and system of SQL sentence, electronic equipment and readable storage medium
CN113791980B (en) Conversion analysis method, device and equipment for test cases and storage medium
CN116860636A (en) Unit test code generation method, device, equipment and storage medium
US11720553B2 (en) Schema with methods specifying data rules, and method of use
CN113761040A (en) Database and application program bidirectional mapping method, device, medium and program product
CN114385722A (en) Interface attribute consistency checking method and device, electronic 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