CN110990280A - Automatic test data generation system and method - Google Patents

Automatic test data generation system and method Download PDF

Info

Publication number
CN110990280A
CN110990280A CN201911218118.0A CN201911218118A CN110990280A CN 110990280 A CN110990280 A CN 110990280A CN 201911218118 A CN201911218118 A CN 201911218118A CN 110990280 A CN110990280 A CN 110990280A
Authority
CN
China
Prior art keywords
data
entity
generation request
entity data
data generation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911218118.0A
Other languages
Chinese (zh)
Other versions
CN110990280B (en
Inventor
黄震人
徐俊超
张闻天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201911218118.0A priority Critical patent/CN110990280B/en
Publication of CN110990280A publication Critical patent/CN110990280A/en
Application granted granted Critical
Publication of CN110990280B publication Critical patent/CN110990280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The invention provides a system and a method for automatically generating test data, wherein the system comprises: the routing control module is used for determining the data type of the test data to be generated according to the test data attribute corresponding to the test data generation request, forming a first data generation request when the data type is ledger data, and forming a second data generation request when the data type is entity data; the data generation module is used for receiving the first data generation request, and accessing a corresponding tested application system according to the first data generation request to construct ledger data to obtain ledger data; the data caching module is used for receiving the second data generation request, obtaining corresponding entity data according to the second data generation request and transmitting the entity data to the automatic test tool through the routing control module.

Description

Automatic test data generation system and method
Technical Field
The invention relates to the technical field of software testing, in particular to a system and a method for automatically generating test data.
Background
Nowadays, the amount of codes of the whole software system used in the fields of finance, telecommunication, internet and the like can reach hundreds of millions of lines due to the business complexity of the fields. In order to ensure that the storage function is not influenced by code modification every time, the requirement can obviously not be met only by manual testing, so that the automatic testing plays an important role in quality protection of software products. In a large software system, the number of automatic test cases is generally in the order of ten thousand or even hundreds of thousands. It is assumed that the success rate of automated test execution has reached a high level of 99%, but the number of cases of each build failure is hundreds to thousands. According to industry statistics, three factors of test environment availability, test script stability and test data validity exist in the execution failure of the automatic test case. In the aspects of test environment and test scripts, the test environment operation and maintenance investment can be strengthened, and a test framework is improved to avoid the problem. However, in the aspect of test data, due to complexity of systems and services, the construction of the test data often needs to span multiple professional fields, the data in the test environment is often polluted due to the fact that multiple groups of test environments are shared, and the effectiveness of the test data cannot be guaranteed, so that the effect of the automatic test and the maintenance cost of the automatic test are directly influenced.
Disclosure of Invention
An object of the present invention is to provide an automatic test data generation system, which can generate and manage test data conveniently and stably, and improve the stability and usability of the test data. Another object of the present invention is to provide an automatic test data generation method. It is a further object of this invention to provide such a computer apparatus. It is a further object of this invention to provide such a readable medium.
In order to achieve the above object, an aspect of the present invention discloses an automatic test data generation system, including:
the routing control module is used for receiving a test data generation request, determining that the data type of test data to be generated is background account data or entity data according to the test data attribute corresponding to the test data generation request, forming a first data generation request when the data type is the background account data, and forming a second data generation request when the data type is the entity data;
the data generation module is used for receiving a first data generation request transmitted by the routing control module and accessing a corresponding tested application system according to the first data generation request to construct ledger data to obtain ledger data;
and the data caching module is used for receiving a second data generation request transmitted by the routing control module, obtaining corresponding entity data according to the second data generation request and transmitting the entity data to an automatic test tool through the routing control module.
Preferably, the data caching module stores batch entity data, and the data caching module is specifically configured to determine whether the stored batch entity data meets the requirement of the second data generation request for the entity data according to the second data generation request, if so, obtain corresponding entity data from the batch entity data according to the second data generation request, and if not, generate and obtain the entity data meeting the second data generation request.
Preferably, the system further comprises a data activity maintaining module, which is used for performing validity check on the entity data;
the data caching module is specifically configured to acquire corresponding entity data from batch entity data according to a second data generation request, transmit the entity data to the data activity maintaining module for validity check, transmit the entity data that passes the check to the automated testing tool through the routing control module if the entity data passes the check, re-acquire part of the entity data that fails the check and perform validity check until all the entity data pass the validity check if the entity data that passes the check does not pass the check, and transmit the entity data that passes the check to the automated testing tool through the routing control module.
Preferably, the data caching module is specifically configured to generate, by the data generation module, entity data that meets the second data generation request.
Preferably, the system further comprises a data activity maintaining module, which is used for performing validity check on the entity data;
the data caching module is further used for transmitting the generated entity data to the data activity maintaining module to carry out validity check on the generated entity data, if the check is passed, the entity data passing the check is transmitted to the automatic testing tool through the routing control module, if the check is not passed, part of entity data failing to be checked is regenerated through the data generating module and subjected to validity check until the validity check of all the entity data is passed, and the entity data passing the check is transmitted to the automatic testing tool through the routing control module.
Preferably, the system further comprises an SDK invoking module, configured to form a test data generation request according to a test data attribute set by a user, and transmit the test data generation request to the routing control module.
Preferably, the data activity maintaining module is further configured to acquire batch entity data stored in the data caching module at intervals of a first preset time interval, check validity of the batch entity data, and transmit relevant information of the entity data that fails to be checked to the data caching module if the checking fails;
and the data cache module is used for deleting the corresponding entity data according to the related information of the entity data which fails to be checked.
Preferably, the data generating module is further configured to generate a preset amount of entity data at intervals of a second preset time interval and store the entity data in the data caching module.
The invention also discloses a method for automatically generating the test data, which comprises the following steps:
receiving a test data generation request, and determining the data type of test data to be generated as ledger data or entity data according to the test data attribute corresponding to the test data generation request;
when the data type is the bottom account data, forming a first data generation request, and accessing a corresponding tested application system according to the first data generation request to construct the bottom account data to obtain the bottom account data;
and when the data type is entity data, forming a second data generation request, obtaining corresponding entity data according to the second data generation request, and transmitting the entity data to an automatic test tool.
Preferably, the first and second liquid crystal materials are,
and determining whether the batch of entity data stored in the data cache module meets the requirement of the second data generation request on the entity data or not according to the second data generation request, if so, acquiring the corresponding entity data from the batch of entity data according to the second data generation request, and if not, generating and obtaining the entity data meeting the second data generation request.
Preferably, the acquiring the corresponding entity data from the batch of entity data according to the second data generation request specifically includes:
and acquiring corresponding entity data from the batch of entity data according to the second data generation request, performing validity check on the entity data, if the verification passes, transmitting the entity data passing the check to the automatic test tool, if the verification fails, re-acquiring part of the entity data failing the check, performing validity check until all the entity data pass the validity check, and transmitting the entity data passing the check to the automatic test tool.
Preferably, the generating and obtaining entity data meeting the second data generation request specifically includes:
and generating entity data meeting the second data generation request through the data generation module and caching the entity data to the data caching module.
Preferably, the generating and obtaining entity data conforming to the second data generation request further includes:
and if the verification fails, regenerating and verifying the validity of part of the entity data which fails to be verified until the validity verification of all the entity data passes, and transmitting the entity data which passes the verification to the automatic testing tool.
Preferably, before receiving the test data generation request, further comprising:
and forming a test data generation request according to the test data attribute set by the user.
Preferably, the method further comprises the following steps:
acquiring batch entity data stored in the data cache module at intervals of a first preset time interval, carrying out validity check on the batch entity data, and if the check fails, transmitting relevant information of the entity data which fails in the check to the data cache module;
and deleting the corresponding entity data according to the related information of the entity data which fails to be verified.
Preferably, the method further comprises the following steps:
and generating and caching a preset amount of entity data at intervals of a second preset time interval.
The invention also discloses a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor,
the processor, when executing the program, implements the method as described above.
The invention also discloses a computer-readable medium, having stored thereon a computer program,
which when executed by a processor implements the method as described above.
The method comprises the steps that a test data generation request is received through a routing control module, the data type of test data to be generated is determined according to the test data attribute of user requirements contained in the test data generation request, the data type comprises background account data and entity data, when the test data is background account data, a data generation module in an automatic data generation system can directly access an application system to be tested to carry out background account data construction, and when the test data is entity data, required entity data are obtained through a data cache module and sent back to an automatic test tool to carry out application system testing. The invention provides a convenient and stable automatic test data generation system, which can automatically generate available test data, is in seamless butt joint with an automatic test tool, can automatically generate the test data only by transmitting a test data generation request defining the test data attribute to the automatic test data generation system by a user, and can better solve the problems of difficult preparation, easy pollution and unreusable test data in the automatic test process.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of an embodiment of an automatic test data generation system according to the present invention;
FIG. 2 illustrates a comparison of test data generation in the prior art and test data generation of the present invention;
FIG. 3 is a second block diagram of an embodiment of an automatic test data generation system according to the present invention;
FIG. 4 is a third block diagram of an embodiment of an automatic test data generation system according to the present invention;
FIG. 5 is a fourth block diagram of an embodiment of an automatic test data generation system according to the present invention;
FIG. 6 is a fifth block diagram of an embodiment of an automatic test data generation system according to the present invention;
FIG. 7 is a flowchart illustrating an embodiment of a method for automatically generating test data according to the present invention;
FIG. 8 is a second flowchart illustrating an automatic test data generation method according to an embodiment of the present invention;
FIG. 9 is a third flowchart illustrating an exemplary method for automatically generating test data according to the present invention;
FIG. 10 is a fourth flowchart illustrating an embodiment of a method for automatically generating test data according to the present invention;
FIG. 11 is a flow chart showing a fifth embodiment of the method for automatically generating test data according to the present invention;
FIG. 12 is a flowchart illustrating a sixth embodiment of a method for automatically generating test data according to the present invention;
FIG. 13 is a seventh flowchart illustrating a method for automatically generating test data according to an embodiment of the present invention;
FIG. 14 illustrates a schematic block diagram of a computer device suitable for use in implementing embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
According to one aspect of the invention, the embodiment discloses a test data automatic generation system. As shown in fig. 1, in this embodiment, the system includes a route control module 2, a data generation module 1, and a data cache module 3.
The routing control module 2 is configured to receive a test data generation request, determine, according to a test data attribute corresponding to the test data generation request, that a data type of test data to be generated is ledger data or entity data, form a first data generation request when the data type is ledger data, and form a second data generation request when the data type is entity data.
The data generation module 1 is configured to receive a first data generation request transmitted by the routing control module 2, and access a corresponding application system to be tested according to the first data generation request to construct ledger data to obtain ledger data. Preferably, the data generation module 1 may construct the ledger data in the application system database to be tested by calling an API of the application system to be tested or by directly operating the application system database by the DML.
The data cache module 3 is configured to receive a second data generation request transmitted by the routing control module 2, obtain corresponding entity data according to the second data generation request, and transmit the entity data to an automation test tool through the routing control module 2. It is understood that the test data may include both the basic data and the entity data according to the characteristics of the test data, wherein the basic data refers to the basic data necessary for the operation of the application system under test, such as technical parameter information. Entity data refers to a particular type of test data, such as a customer. The data construction mode of the ledger data and the entity data is slightly different. When the background account data is constructed, only the data in the application system is needed to be paved, the data is not needed to be fed back to the user, and the entity data needs to be fed back to the user. The data caching module 3 may adopt an unstructured storage mode, or may adopt a structured storage mode to store the entity data constructed by the data generating module 1.
The method comprises the steps that a test data generation request is received through a routing control module 2, the data type of test data to be generated is determined according to the test data attribute of user requirements contained in the test data generation request, the data type comprises background account data and entity data, when the test data is background account data, a data generation module 1 in an automatic data generation system can directly access an application system to be tested to construct the background account data, and when the test data is entity data, the required entity data is obtained through a data cache module 3 and sent back to an automatic test tool to test the application system. The invention provides a convenient and stable automatic test data generation system, which can automatically generate available test data, and the system is in seamless connection with the automatic test tool, the user only needs to transmit a test data generation request defining the test data attribute to the automatic test data generation system to automatically generate the test data, in addition, the invention changes the existing mode of generating the test data which usually needs to set specific numerical values into the mode of acquiring the test data by the user specifying the attribute of the test data, improves the effectiveness and readability of the test data, as shown in fig. 2, the user may obtain test data by inputting test data attributes of the testing organization and the testing client, therefore, the invention can better solve the problems of difficult preparation, easy pollution and non-reusability of test data in the automatic test process.
In a preferred embodiment, the data generating module 1 may directly interact with the system under test, and the data generating module 1 may provide an input and output service interface, for example, a RESTFul API interface, to implement data interaction with the application system under test. Preferably, the input and output service interfaces can be deployed on a private cloud inside an enterprise, and the test data acquisition service is uniformly provided to the outside through the service interfaces, so that the private cloud is communicated with each tested application system, and the requirements of different users on the test data are met.
Specifically, as shown in fig. 3, the data generation module 1 may include a data generation service unit 11, a service registration unit 12, and a data bulk generation unit 13. The data generation service unit 11 includes an input service interface and an output service interface, and is configured to interact with a system under test, receive a first data generation request of the routing control module 2, and perform ledger data construction by calling an API and/or a DML of the application system under test to operate a database of the application system under test. The service registration unit 12 is configured to deploy the input and output service interfaces on a private cloud inside an enterprise, and expose the call addresses of the input and output service interfaces to the outside, so that an external application system can establish a connection with the data generation module 1 through the call addresses to implement test data construction. The data batch generation unit 13 is configured to receive a second data generation request of the routing control module 2, obtain corresponding entity data according to the second data generation request, and transmit the entity data to the automation test tool through the routing control module 2. The second data generation request may include parameters such as the number of generated test data, frequency, and the like customized by the user through the test data generation request, and the data batch generation unit 13 may automatically complete the construction of the entity data in batches through the input and output service interfaces according to the number of generated data and the frequency, and store the constructed entity data in the data cache module 3.
In a preferred embodiment, the data cache module 3 stores batch entity data, and the data cache module 3 is specifically configured to determine whether the stored batch entity data meets the requirement of the second data generation request for the entity data according to the second data generation request, if so, obtain corresponding entity data from the batch entity data according to the second data generation request, and if not, generate and obtain the entity data meeting the second data generation request.
It can be understood that the data cache module 3 may store pre-generated batch entity data, when acquiring the entity data, the data cache module 3 may determine a requirement of the entity data that needs to be acquired according to the received second data generation request, when satisfying the requirement, the entity data that directly acquires the requirement from the stored batch entity data may be transmitted to the automatic test tool at the user end through the routing control module 2 to complete the test of the application system under test, and if not, the entity data corresponding to the second data generation request is obtained through a real-time generation manner.
In a preferred embodiment, as shown in fig. 4, the system further comprises a data activity maintaining module 4 for performing validity check on the entity data. The data caching module 3 is specifically configured to obtain corresponding entity data from batch entity data according to a second data generation request, transmit the entity data to the data activity maintaining module 4 for validity check, transmit the entity data that passes the check to the automated testing tool through the routing control module 2 if the check passes, re-obtain part of the entity data that fails the check and perform validity check until all the entity data pass the validity check if the check does not pass, and transmit the entity data that passes the check to the automated testing tool through the routing control module 2. In the preferred embodiment, the data activity maintaining module 4 is arranged in the system, and the validity of the entity data can be verified through the data activity maintaining module 4, so that the entity data returned to the automatic testing tool are all valid, and the validity of the testing data is guaranteed.
In a preferred embodiment, the data caching module 3 is specifically configured to generate, by the data generation module 1, entity data that meets a second data generation request when cached bulk entity data does not meet a requirement of the second data generation request for the entity data. In a specific example, when there is a situation that the batch of entity data does not meet the requirement in the data cache module 3, the data cache module 3 may send a data generation signal to the data generation module 1, and after the data generation module 1 receives the data generation signal, the entity data may be directly constructed by interacting with the application system under test according to parameters such as the generation quantity and the frequency of the test data transmitted by the user through the test data generation request in the second data generation request.
In a preferred embodiment, the data caching module 3 is further configured to transmit the generated entity data to the data activity maintaining module 4 to perform validity check on the generated entity data, transmit the entity data that passes the check to the automated testing tool through the routing control module 2 if the check passes, and re-generate and perform validity check on part of the entity data that fails to pass the check through the data generating module 1 until all the entity data pass the validity check if the check does not pass, and transmit the entity data that passes the check to the automated testing tool through the routing control module 2. After the entity data is constructed in real time through the data generation module 1, the generated entity data can be subjected to validity check through the data activity maintaining module 4 so as to ensure the validity of the entity data returned to the automatic test tool.
In a preferred embodiment, as shown in fig. 5, the system may further include an SDK invoking module 5, configured to form a test data generation request according to a test data attribute set by a user, and transmit the test data generation request to the routing control module 2. The SDK calling module 5 can be integrated in an automatic testing tool of a user terminal, the SDK calling module 5 faces a user, can receive test data attributes input by the user, forms a test data generation request according to the test data attributes set by the user, and transmits the test data generation request to the routing control module 2, so that the test data can be automatically generated by the test data generation system, the user can generate the test data by inputting the test data attributes, and the test data can be conveniently and quickly obtained.
In a preferred embodiment, the data activity maintaining module 4 is further configured to acquire the batch of entity data stored in the data caching module 3 at intervals of a first preset time interval, perform validity check on the batch of entity data, and transmit relevant information of the entity data that fails to be checked to the data caching module 3 if the check fails. The data cache module 3 is configured to delete the corresponding entity data according to the related information of the entity data that fails to be checked. The validity of the entity data in the data caching module 3 is maintained by checking the validity of the bulk entity data in the data caching module 3 at regular time, so that the activity of the entity data is maintained. Further, if the amount of the entity data having validity in the data cache module 3 is small, the data cache module 3 may send a data generation signal to the data generation module 1 to enable the data generation module 1 to construct entity data to supplement the amount of the bulk entity data stored in the data cache module 3. The data activity maintaining module 4 checks the validity of the batch entity data after a certain period of time, deletes invalid entity data failed in the check in time and generates new entity data, can maintain the validity of valid batch entity data in the data caching module 3, and improves the efficiency of providing test data generation service.
In a preferred embodiment, the data generating module 1 is further configured to generate a preset number of entity data every second preset time interval to accelerate the construction speed of the test data, and prepare a part of batch entity data in advance, so that when a large amount of test data is required, entity data meeting requirements can be efficiently obtained, and the construction requirements of the large amount of test data are met.
In a preferred embodiment, as shown in fig. 6, the routing control module 2 may include a routing control unit 21 and an idempotent control unit 22. The route control unit 21 may receive a test data generation request, determine whether a required data type is ledger data or entity data according to a test data attribute corresponding to the test data generation request, form a first data generation request when the data type is ledger data, and form a second data generation request when the data type is entity data.
Optionally, the test data generation request sent by the user may include information such as test data information, generation quantity, frequency, and the like, the routing control unit 21 may determine a test data attribute of the requested data according to the test data information, and determine whether the requested data is background data or entity data according to the test data information, when the determination is implemented, a corresponding relationship between the test data information and the test data attribute may be preset, and a corresponding test data attribute may be obtained through actual test data information and the corresponding relationship. The route control unit 21 may set parameters such as the number of generated test data and the frequency determined by the user in the first data generation request or the second data generation request, and transmit the parameters together to the data generation module 1 or the data cache module 3, and the data generation module 1 or the data cache module 3 may form corresponding test data according to the parameters.
The data generating module 1 is configured to record entity data information of the generated entity data and a corresponding test data generation request after receiving the entity data transmitted by the data caching module 3, and transmit the entity data information corresponding to the test data generation request to the data caching module 3 when receiving the same test data generation request again, so that the data caching module 3 feeds back entity data different from the entity data information, thereby achieving a data locking purpose and ensuring that the test data acquired by each automated test tool are not interfered with each other.
Based on the same principle, the embodiment also discloses an automatic test data generation method. As shown in fig. 7, in this embodiment, the method includes:
s100: receiving a test data generation request, and determining the data type of the test data to be generated as ledger data or entity data according to the test data attribute corresponding to the test data generation request.
S200: and when the data type is the background account data, forming a first data generation request, and accessing a corresponding tested application system according to the first data generation request to construct the background account data to obtain the background account data.
S300: and when the data type is entity data, forming a second data generation request, obtaining corresponding entity data according to the second data generation request, and transmitting the entity data to an automatic test tool.
In a preferred embodiment, as shown in fig. 8, the obtaining, in S300, the corresponding entity data according to the second data generation request specifically includes:
s310: and determining whether the batch of entity data stored in the data cache module meets the requirement of the second data generation request on the entity data or not according to the second data generation request, if so, acquiring the corresponding entity data from the batch of entity data according to the second data generation request, and if not, generating and obtaining the entity data meeting the second data generation request.
In a preferred embodiment, as shown in fig. 9, the acquiring, in S310, the corresponding entity data from the batch entity data according to the second data generation request may specifically include:
s311: and acquiring corresponding entity data from the batch of entity data according to the second data generation request, performing validity check on the entity data, if the verification passes, transmitting the entity data passing the check to the automatic test tool, if the verification fails, re-acquiring part of the entity data failing the check, performing validity check until all the entity data pass the validity check, and transmitting the entity data passing the check to the automatic test tool.
In a preferred embodiment, as shown in fig. 10, the generating and obtaining entity data meeting the second data generation request in S310 may specifically include:
s312: and generating entity data meeting the second data generation request through the data generation module and caching the entity data to the data caching module.
In a preferred embodiment, the generating and obtaining entity data according to the second data generation request in S310 may further include:
s313: and if the verification fails, regenerating and verifying the validity of part of the entity data which fails to be verified until the validity verification of all the entity data passes, and transmitting the entity data which passes the verification to the automatic testing tool.
In a preferred embodiment, as shown in fig. 11, the method further comprises, before S100, the step of:
s000: and forming a test data generation request according to the test data attribute set by the user, and transmitting the test data generation request to the route control module.
In a preferred embodiment, as shown in fig. 12, the method further comprises:
s410: and acquiring batch entity data stored in the data cache module at intervals of a first preset time interval, carrying out validity check on the batch entity data, and if the check fails, transmitting relevant information of the entity data which fails in the check to the data cache module.
S420: and the data cache module is used for deleting the corresponding entity data according to the related information of the entity data which fails to be checked.
In a preferred embodiment, as shown in fig. 13, further comprising:
s500: and generating and caching a preset amount of entity data at intervals of a second preset time interval.
Since the principle of the method for solving the problem is similar to that of the above system, the implementation of the system can refer to the implementation of the method, and details are not described herein.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example, the computer device specifically comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method performed by the client as described above when executing the program, or the processor implementing the method performed by the server as described above when executing the program.
Referring now to FIG. 14, shown is a schematic block diagram of a computer device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 14, the computer apparatus 600 includes a Central Processing Unit (CPU)601 which can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM)) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a liquid crystal feedback (LCD), and the like, and a speaker and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 606 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted as necessary on the storage section 608.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (18)

1. An automatic test data generation system, comprising:
the routing control module is used for receiving a test data generation request, determining that the data type of test data to be generated is background account data or entity data according to the test data attribute corresponding to the test data generation request, forming a first data generation request when the data type is the background account data, and forming a second data generation request when the data type is the entity data;
the data generation module is used for receiving a first data generation request transmitted by the routing control module and accessing a corresponding tested application system according to the first data generation request to construct ledger data to obtain ledger data;
and the data caching module is used for receiving a second data generation request transmitted by the routing control module, obtaining corresponding entity data according to the second data generation request and transmitting the entity data to an automatic test tool through the routing control module.
2. The automatic test data generation system of claim 1, wherein the data cache module stores batch entity data, and the data cache module is specifically configured to determine whether the stored batch entity data meets a requirement of the second data generation request for the entity data according to the second data generation request, if so, obtain corresponding entity data from the batch entity data according to the second data generation request, and if not, generate and obtain the entity data meeting the second data generation request.
3. The system for automatically generating test data according to claim 2, further comprising a data activity maintaining module for performing validity check on the entity data;
the data caching module is specifically configured to acquire corresponding entity data from batch entity data according to a second data generation request, transmit the entity data to the data activity maintaining module for validity check, transmit the entity data that passes the check to the automated testing tool through the routing control module if the entity data passes the check, re-acquire part of the entity data that fails the check and perform validity check until all the entity data pass the validity check if the entity data that passes the check does not pass the check, and transmit the entity data that passes the check to the automated testing tool through the routing control module.
4. The automatic test data generation system of claim 2, wherein the data cache module is specifically configured to generate, by the data generation module, entity data that conforms to the second data generation request.
5. The system according to claim 4, further comprising a data activity keeping module for checking validity of the entity data;
the data caching module is further used for transmitting the generated entity data to the data activity maintaining module to carry out validity check on the generated entity data, if the check is passed, the entity data passing the check is transmitted to the automatic testing tool through the routing control module, if the check is not passed, part of entity data failing to be checked is regenerated through the data generating module and subjected to validity check until the validity check of all the entity data is passed, and the entity data passing the check is transmitted to the automatic testing tool through the routing control module.
6. The automatic test data generation system of claim 4, further comprising an SDK invoking module, configured to form a test data generation request according to a test data attribute set by a user, and transmit the test data generation request to the routing control module.
7. The automatic test data generation system according to claim 3 or 5, wherein the data activity maintaining module is further configured to obtain the batch entity data stored in the data caching module at intervals of a first preset time, perform validity check on the batch entity data, and transmit information about the entity data that fails to be checked to the data caching module if the check fails;
and the data cache module is used for deleting the corresponding entity data according to the related information of the entity data which fails to be checked.
8. The automatic generation system of test data according to claim 3 or 5, wherein the data generation module is further configured to generate a preset amount of entity data at intervals of a second preset time interval and store the entity data in the data cache module.
9. A method for automatically generating test data is characterized by comprising the following steps:
receiving a test data generation request, and determining the data type of test data to be generated as ledger data or entity data according to the test data attribute corresponding to the test data generation request;
when the data type is the bottom account data, forming a first data generation request, and accessing a corresponding tested application system according to the first data generation request to construct the bottom account data to obtain the bottom account data;
and when the data type is entity data, forming a second data generation request, obtaining corresponding entity data according to the second data generation request, and transmitting the entity data to an automatic test tool.
10. The method according to claim 9, wherein obtaining the corresponding entity data according to the second data generation request specifically includes:
and determining whether the batch of entity data stored in the data cache module meets the requirement of the second data generation request on the entity data or not according to the second data generation request, if so, acquiring the corresponding entity data from the batch of entity data according to the second data generation request, and if not, generating and obtaining the entity data meeting the second data generation request.
11. The method of claim 10, wherein the obtaining of the corresponding entity data from the batch of entity data according to the second data generation request specifically includes:
and acquiring corresponding entity data from the batch of entity data according to the second data generation request, performing validity check on the entity data, if the verification passes, transmitting the entity data passing the check to the automatic test tool, if the verification fails, re-acquiring part of the entity data failing the check, performing validity check until all the entity data pass the validity check, and transmitting the entity data passing the check to the automatic test tool.
12. The method according to claim 10, wherein the generating and obtaining entity data that meets the second data generation request specifically includes:
and generating entity data meeting the second data generation request through the data generation module and caching the entity data to the data caching module.
13. The method of claim 12, wherein the generating and obtaining entity data that conforms to the second data generation request further comprises:
and if the verification fails, regenerating and verifying the validity of part of the entity data which fails to be verified until the validity verification of all the entity data passes, and transmitting the entity data which passes the verification to the automatic testing tool.
14. The method of claim 12, further comprising, prior to receiving a test data generation request:
and forming a test data generation request according to the test data attribute set by the user.
15. The automatic test data generation method according to claim 11 or 13, further comprising:
acquiring batch entity data stored in the data cache module at intervals of a first preset time interval, carrying out validity check on the batch entity data, and if the check fails, transmitting relevant information of the entity data which fails in the check to the data cache module;
and deleting the corresponding entity data according to the related information of the entity data which fails to be verified.
16. The automatic test data generation method according to claim 11 or 13, further comprising:
and generating and caching a preset amount of entity data at intervals of a second preset time interval.
17. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor,
the processor, when executing the program, implements the method of any of claims 9-16.
18. A computer-readable medium, having stored thereon a computer program,
the program when executed by a processor implementing the method according to any of claims 9-16.
CN201911218118.0A 2019-12-03 2019-12-03 Automatic test data generation system and method Active CN110990280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911218118.0A CN110990280B (en) 2019-12-03 2019-12-03 Automatic test data generation system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911218118.0A CN110990280B (en) 2019-12-03 2019-12-03 Automatic test data generation system and method

Publications (2)

Publication Number Publication Date
CN110990280A true CN110990280A (en) 2020-04-10
CN110990280B CN110990280B (en) 2023-09-12

Family

ID=70089455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911218118.0A Active CN110990280B (en) 2019-12-03 2019-12-03 Automatic test data generation system and method

Country Status (1)

Country Link
CN (1) CN110990280B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015657A (en) * 2020-09-02 2020-12-01 中国工商银行股份有限公司 Automatic test data management method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123227A (en) * 2014-08-13 2014-10-29 广东电网公司信息中心 Method for automatically generating testing cases
CN105302709A (en) * 2014-07-03 2016-02-03 阿里巴巴集团控股有限公司 Test data generating method and device
CN107026773A (en) * 2017-05-16 2017-08-08 四川长虹电器股份有限公司 Automatic correlation method for interface automatic test
US20180095866A1 (en) * 2016-09-30 2018-04-05 Wipro Limited Method and system for automatically generating test data for testing applications
CN110188030A (en) * 2019-04-08 2019-08-30 平安科技(深圳)有限公司 A kind of test data generating method, device and computer equipment, storage medium
CN110297760A (en) * 2019-05-22 2019-10-01 平安普惠企业管理有限公司 Building method, device, equipment and the computer readable storage medium of test data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302709A (en) * 2014-07-03 2016-02-03 阿里巴巴集团控股有限公司 Test data generating method and device
CN104123227A (en) * 2014-08-13 2014-10-29 广东电网公司信息中心 Method for automatically generating testing cases
US20180095866A1 (en) * 2016-09-30 2018-04-05 Wipro Limited Method and system for automatically generating test data for testing applications
CN107026773A (en) * 2017-05-16 2017-08-08 四川长虹电器股份有限公司 Automatic correlation method for interface automatic test
CN110188030A (en) * 2019-04-08 2019-08-30 平安科技(深圳)有限公司 A kind of test data generating method, device and computer equipment, storage medium
CN110297760A (en) * 2019-05-22 2019-10-01 平安普惠企业管理有限公司 Building method, device, equipment and the computer readable storage medium of test data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015657A (en) * 2020-09-02 2020-12-01 中国工商银行股份有限公司 Automatic test data management method and system

Also Published As

Publication number Publication date
CN110990280B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN111245900B (en) Distributed message sending processing system and processing method thereof
CN105472045A (en) Database migration method and database migration device
US20200167267A1 (en) Asynchronous consumer-driven contract testing in micro service architecture
CN110795147A (en) Interface protocol file management method and device
CN112346717A (en) Micro service system creating method, device, equipment, medium and micro service system
US8843587B2 (en) Retrieving availability information from published calendars
KR101596257B1 (en) System and method for developing of service based on software product line
CN109828830B (en) Method and apparatus for managing containers
EP2746944A2 (en) ABAP unified connectivity
CN110990280B (en) Automatic test data generation system and method
CN111949536B (en) JAVA application program testing method and system based on byte code technology
CN115883310A (en) Service deployment method, service deployment system, electronic device, and storage medium
US11734057B2 (en) Method and apparatus for processing a service of an abnormal server
CN110928594A (en) Service development method and platform
CN113127335A (en) System testing method and device
US20210203549A1 (en) Autonomous terraforming on cloud infrastructures
US9059992B2 (en) Distributed mobile enterprise application platform
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN115185841A (en) System reconfiguration test method, device, equipment and storage medium
CN114528140A (en) Method and device for service degradation
CN112860292A (en) Configuration management method and device based on application
CN112799744A (en) Calling method and device of industrial APP, computer readable medium and electronic equipment
CN111625866A (en) Authority management method, system, equipment and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
US20230049322A1 (en) Information processing method, device, system, and computer-readable storage medium

Legal Events

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