CN113553264A - Test data generation method, test data generation device, electronic device and medium - Google Patents

Test data generation method, test data generation device, electronic device and medium Download PDF

Info

Publication number
CN113553264A
CN113553264A CN202110833584.0A CN202110833584A CN113553264A CN 113553264 A CN113553264 A CN 113553264A CN 202110833584 A CN202110833584 A CN 202110833584A CN 113553264 A CN113553264 A CN 113553264A
Authority
CN
China
Prior art keywords
test
data
test data
test environment
generating
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
CN202110833584.0A
Other languages
Chinese (zh)
Inventor
杨永双
任忠铭
李昭文
张丰祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202110833584.0A priority Critical patent/CN113553264A/en
Publication of CN113553264A publication Critical patent/CN113553264A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The application provides a test data generation method, a test data generation device, electronic equipment and a test data generation medium, which are applied to the technical field of testing, wherein the method comprises the following steps: when the first test data under the first test environment is in the use state, second test data under the second test environment is generated based on the generation rule of the first test data and the corresponding second test environment information, so that the test can be performed based on the second test data. Therefore, the test data can be quickly recovered among a plurality of test environments, in addition, the utilization efficiency of the test environments is improved, and the phenomenon that users wait for test resources in a queue is reduced.

Description

Test data generation method, test data generation device, electronic device and medium
Technical Field
The present application relates to the field of test technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a medium for generating test data.
Background
In the software testing work, in order to be closer to a real use scene, a large amount of test data needs to be embedded in a testing environment. In actual test work, it often happens that a plurality of testers need to use pre-buried test data in a certain test environment at the same time. In this case, a phenomenon that a plurality of users queue for the same test environment resource occurs. At present, in order to reduce the waiting time, a common solution is to newly create a set of similar test environments and restore the required test data on the new test environments. However, the recovery of the test data needs to rely on a large amount of bottoming data, and the recovery process needs to be operated manually to a great extent, which causes a lot of unnecessary repetitive work and consumes more labor cost and time cost.
Disclosure of Invention
The application provides a test data generation method, a test data generation device, a test data generation system, an electronic device and a medium, which are used for promoting cross-environment recovery of test data and promoting test efficiency, and the technical scheme adopted by the application is as follows:
in a first aspect, a test data generation method is provided, including:
judging whether first test data under a first test environment condition is in a use state, wherein the first test data is nested with first test environment information so that the first test data can be used under the first test environment condition;
if the first test data under the first test environment condition is in a use state, acquiring a generation rule for generating the first test data;
and generating second test data under the second test environment based on a generation rule for generating the first test data and second test environment information, wherein the second test data is nested in the second test environment information so that the second test data can be used under the second test environment condition.
Optionally, the second test environment information includes bottoming data of a second test environment, and the method further includes:
and generating second test data under the second test environment based on the generation rule for generating the first test data and the bottoming data of the second test environment.
Optionally, the generating rule includes a test environment nesting rule, and the method further includes:
and generating second test data under the second test environment based on the test environment nesting rule in the generation rule for generating the first test data and second test environment information.
Optionally, the method further comprises:
receiving a call request for first test data under a first test environment condition;
and judging whether the first test data under the first test environment condition is in a use state.
Optionally, the method further comprises:
when the first test data under the first test environment condition is in a use state, acquiring the states of each test environment, wherein the states comprise a use state and a vacant state;
a second test environment is determined based on the state of each test environment.
Optionally, the method further comprises: the first test data comprises a plurality of items of first atomic data, and each item of the first atomic data corresponds to a generation rule.
Optionally, the method further comprises:
determining target atomic data under a first test environment which needs to be called in the test;
if the test data under the first test environment condition is in a use state, acquiring a generation rule for generating target atomic data under the first test environment;
and generating each target atom data under the second test environment based on the generation rule for generating each target atom data and the second test environment.
Optionally, the method further comprises:
and performing testing based on the generated second testing data under the second testing environment.
In a second aspect, a test data generating apparatus is provided, including:
the first judging module is used for judging whether first test data under a first test environment condition is in a use state or not, and the first test data is nested with first test environment information so that the first test data can be used under the first test environment condition;
a first obtaining module, configured to obtain a generation rule for generating first test data if the first test data under the first test environment condition is in a use state;
and the generating module is used for generating second test data under the second test environment based on a generating rule for generating the first test data and second test environment information, and the second test data is nested with the second test environment information so that the second test data can be used under the second test environment condition.
Optionally, the second testing environment information includes bottoming data of a second testing environment, and the generating module is specifically configured to generate the second testing data in the second testing environment based on a generation rule for generating the first testing data and the bottoming data of the second testing environment.
Optionally, the generation rule includes a test environment nesting rule, and the generation module is specifically configured to generate second test data in the second test environment based on a test environment nesting rule in the generation rule for generating the first test data and second test environment information.
Optionally, the apparatus further comprises:
the receiving module is used for receiving a calling request of first test data under a first test environment condition;
and the second judgment module is used for judging whether the first test data under the first test environment condition is in a use state.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the state of each test environment when the first test data under the first test environment condition is in a use state, wherein the state comprises a use state and an idle state;
a first determining module for determining a second test environment based on the state of each test environment.
Optionally, the first test data includes multiple items of first atomic data, and each item of the first atomic data corresponds to a generation rule.
Optionally, the apparatus further comprises:
the second determination module is used for determining target atomic data under the first test environment which needs to be called in the test;
the first obtaining module is specifically configured to obtain a generation rule for generating target atomic data in the first test environment if the test data in the first test environment is in a use state;
the generating module is specifically configured to generate each target atomic data in the second test environment based on a generation rule for generating each target atomic data and the second test environment.
Optionally, the apparatus further comprises:
and the testing module is used for testing based on the generated second testing data under the second testing environment.
In a third aspect, an electronic device is provided, which includes:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: the test data generation method shown in the first aspect is performed.
In a fourth aspect, there is provided a computer-readable storage medium for storing computer instructions which, when run on a computer, cause the computer to perform the test data generation method of the first aspect.
Compared with the prior art that when first test data under a first test environment is in a use state, other test tasks can be tested only after the current test task finishes using the first test data, whether the first test data under the first test environment condition is in the use state or not is judged, and the first test data is nested with first test environment information, so that the first test data can be used under the first test environment condition; if the first test data under the first test environment condition is in a use state, acquiring a generation rule for generating the first test data; and generating second test data under the second test environment based on a generation rule for generating the first test data and second test environment information, wherein the second test data is nested in the second test environment information so that the second test data can be used under the second test environment condition. That is, when the first test data under the first test environment is in the use state, the second test data under the second test environment is generated based on the generation rule of the first test data and the corresponding second test environment information, so that the test can be performed based on the second test data. Therefore, the test data can be quickly recovered among a plurality of test environments, in addition, the utilization efficiency of the test environments is improved, and the phenomenon that users wait for test resources in a queue is reduced.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a test data generation method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a test data generating apparatus according to an embodiment of the present application;
FIG. 3 is a diagram illustrating an example of test data recovery according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example one
An embodiment of the present application provides a test data generation method, as shown in fig. 1, including:
step S101, judging whether first test data under a first test environment condition is in a use state, wherein the first test data is nested with first test environment information so that the first test data can be used under the first test environment condition; the test data can only be used under the corresponding test environment condition, and cannot be used in other test environments; if the first test data can only be used in the corresponding first test environment, but can not be used in the second test environment; the test data may include two parts of test data information (i.e., data used in the test and unrelated to the test environment) and test environment information (i.e., test environment information that can be used in the corresponding test environment).
Step S102, if the first test data under the first test environment condition is in a use state, acquiring a generation rule for generating the first test data;
specifically, the test data corresponds to a test data generation rule, and the corresponding test data can be generated based on the test data generation rule.
Step S103, generating second test data under the second test environment based on a generation rule for generating the first test data and second test environment information, wherein the second test data is nested with the second test environment information, so that the second test data can be used under the second test environment condition.
When test data transfer is performed among a plurality of test environments, the test data Da in the test environment A is directly copied to the test environment B to obtain test data Da ', and Da' is not necessarily available in B. Because the test data needs to be compatible with the test environment, the direct copying method cannot consider the difference between the environments, and subsequently, a large amount of manual operation is needed to complete the adaptation work of the test data in the new environment, which leads to the rapid increase of the recovery workload of the test data across the environments. In order to solve the problems in the actual work, the invention carries out refinement and extraction on the data items of the test data in the test preparation work, and constructs a data generation rule base. When cross-environment test data recovery needs to be executed, test data recovery can be automatically executed only by importing the rule base into the test data recovery engine and appointing a target environment for data recovery for the data recovery engine, and test data adaptive to the target environment are generated.
Specifically, the second test data under the second test environment is generated based on the generation rule for generating the first test data and the second test environment information, so that the second test data under the second test environment can be obtained, the test can be performed based on the second test data, the test can be performed without waiting for the first test data to be used, the test efficiency is improved, and the utilization rate of the test environment is increased.
The test environment information may include a hardware environment and a software environment, the hardware is mainly replaced by a PC, and the software environment includes an operating system (mainstream operating system: windows, Linux, Unix) for software running, a database (Oracle, MySQL, SqlServer, DB2, etc.), a web application server (Apache, IIS, tomcat, Nginx, etc.), a cluster environment (such as load balancing), and the like.
Compared with the prior art that when first test data under a first test environment is in a use state, other test tasks can be tested only after the current test task finishes using the first test data, whether the first test data under the first test environment is in the use state or not is judged, and the first test data is nested with first test environment information, so that the first test data can be used under the first test environment; if the first test data under the first test environment condition is in a use state, acquiring a generation rule for generating the first test data; and generating second test data under the second test environment based on a generation rule for generating the first test data and second test environment information, wherein the second test data is nested in the second test environment information so that the second test data can be used under the second test environment condition. That is, when the first test data under the first test environment is in the use state, the second test data under the second test environment is generated based on the generation rule of the first test data and the corresponding second test environment information, so that the test can be performed based on the second test data. Therefore, the test data can be quickly recovered among a plurality of test environments, in addition, the utilization efficiency of the test environments is improved, and the phenomenon that users wait for test resources in a queue is reduced.
Optionally, the second test environment information includes bottoming data of a second test environment, and the method further includes: and generating second test data under the second test environment based on the generation rule for generating the first test data and the bottoming data of the second test environment.
The backing data is a large amount of data which is stored in a database except business logic data before performance test, and the data has no practical influence on the business logic, but can be used for testing the performance of the system under different data levels.
Specifically, the test data includes two parts, test data information (illustratively, user name data, certificate number data, transaction serial number data) and test environment information. The data generation rule may be a test data information generation rule or a test environment information nesting rule. For the embodiment of the application, the test data information generation rule may be used, so that second test data may be generated based on the test data information generation rule corresponding to the first test data and the backing data in the second test environment, where the backing data in the second test environment includes corresponding test environment information, and the generated second test data includes second test environment information, so that the second test data can be used under the second test condition.
Optionally, the generating rule includes a test environment nesting rule, and the method further includes:
and generating second test data under the second test environment based on the test environment nesting rule in the generation rule for generating the first test data and second test environment information.
Specifically, for the embodiment of the present application, the generation rule includes a test environment nesting rule and a test data information generation rule, and the second test environment information can generate the second test data directly according to the test data information generation rule and the test environment nesting rule, so that the second test data that can be used under the second test environment condition can be generated without a large amount of bottoming data.
Optionally, the method further comprises:
receiving a call request for first test data under a first test environment condition;
and judging whether the first test data under the first test environment condition is in a use state.
Optionally, the method further comprises:
when the first test data under the first test environment condition is in a use state, acquiring the states of each test environment, wherein the states comprise a use state and a vacant state;
a second test environment is determined based on the state of each test environment.
For the embodiment of the application, the second test environment is determined by the test environment in the idle state, so that the test environment is fully utilized.
Optionally, the method further comprises: the first test data comprises a plurality of items of first atomic data, and each item of the first atomic data corresponds to a generation rule.
Specifically, the test data may include a plurality of items of atomic data, each item of atomic data corresponds to a generation rule, i.e., an atomic data generation rule, similar to the aforementioned test data generation rule, where the atomic data may include atomic data information and atomic data environment information.
For example, as shown in fig. 3, a corresponding data recovery template may be determined according to a generation rule of each atomic data of the test data, and when the data is recovered, the corresponding data template may be directly called to recover the data, and specifically, the data production engine may recover the test data in the corresponding test environment using the bottoming data of the corresponding test environment. The method of the invention carries out atomization management on the test data according to the minimum data item unit and carries out slice storage on the generation rules of the data items in the test data generation stage. Assuming test data TDx, decomposing TDx to obtain x1, x2, x3, … … and xn, and generating rules r1, r2, r3, … … and rn corresponding to the x1, x2, x3, … … and xn. The TDx is generated on the test environment Env1 for the first time, and atomic data generation rules (r1, r2, r3, … …, rn) defined in the TDx generation phase are recorded in the data generation rule set Rx. When the environment Env1 is occupied by user a, user b has the data items x1, x3, xx … … in Env1 to use for performing emergency testing tasks. An idle test environment Env2 can be allocated to the user b, a data recovery template Tr is formed by selecting corresponding data generation rules r1, r3 and rx … …, and data recovery can be performed on an Env2 environment by introducing the Tr into a data production engine.
The rule combination mode reduces the coupling degree between the data generation rule and the service system, the multiplexing of the data items of the recorded data generation rule can be realized by combining different data rule atoms, meanwhile, when the data generation rule changes, the change of the whole data generation rule can be realized only by maintaining the data items, and the maintainability and the expandability of the system are improved.
The automatic test data recovery engine performs reproduction of test data in a new environment according to the atomized test data generation rule base and the bottoming data of the new environment, so that multi-environment recovery of the test data is realized. The test data recovery engine is associated with a transaction interface required to be used in test data production, and based on the appointed semantic expression in the rule base, manual intervention is not required in the data recovery process, and the whole process can be automatically executed. In the rule base, data generation rules are distributed in an atomized form and are a basic unit of data management. In the data recovery engine, the atomized data items need to be arranged and combined into a data recovery template. The test data recovery engine is directly demand oriented, i.e., which data is needed to recover which data. For example, in the above example, the data to be restored are x1, x3, xx … …, and only the corresponding rules r1, r3, rx … … need to be selected from the rule base to form the data restoration template Tr. The data recovery engine can identify transaction and bottoming data required by data recovery according to the Tr, and recover data in the target environment to realize recovery of the test data among a plurality of environments.
Optionally, the method further comprises:
determining target atomic data under a first test environment which needs to be called in the test;
if the test data under the first test environment condition is in a use state, acquiring a generation rule for generating target atomic data under the first test environment;
and generating each target atom data under the second test environment based on the generation rule for generating each target atom data and the second test environment.
Specifically, in actual use, test data information which may be part of corresponding atomic data in the first test environment is to be used, and target atomic data in the second test environment is generated only according to the generation rule of the corresponding atomic data to be used, so that flexibility of data recovery is realized, and all atomic data in the first test environment do not need to be recovered.
In the embodiment of the application, in the test preparation work, the data items of the test data are refined and extracted, the data generation rules are stored in an atomization mode, and an atomization data generation rule base is constructed, so that the cross-environment recovery of the atomic data is realized.
Optionally, the method further comprises:
and performing testing based on the generated second testing data under the second testing environment.
Example two
The embodiment of the present application provides another test data generating apparatus, which includes, as shown in fig. 2;
a first judging module 201, configured to judge whether first test data under a first test environment condition is in a use state, where the first test data is nested in first test environment information, so that the first test data can be used under the first test environment condition;
a first obtaining module 202, configured to obtain a generation rule for generating first test data under the first test environment condition if the first test data is in a use state;
the generating module 203 is configured to generate second test data in the second test environment based on a generation rule for generating the first test data and second test environment information, where the second test data is nested in the second test environment information, so that the second test data can be used under the second test environment condition.
Optionally, the second testing environment information includes bottoming data of a second testing environment, and the generating module is specifically configured to generate the second testing data in the second testing environment based on a generation rule for generating the first testing data and the bottoming data of the second testing environment.
Optionally, the generation rule includes a test environment nesting rule, and the generation module is specifically configured to generate second test data in the second test environment based on a test environment nesting rule in the generation rule for generating the first test data and second test environment information.
Optionally, the apparatus further comprises:
the receiving module is used for receiving a calling request of first test data under a first test environment condition;
and the second judgment module is used for judging whether the first test data under the first test environment condition is in a use state.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the state of each test environment when the first test data under the first test environment condition is in a use state, wherein the state comprises a use state and an idle state;
a first determining module for determining a second test environment based on the state of each test environment.
Optionally, the first test data includes multiple items of first atomic data, and each item of the first atomic data corresponds to a generation rule.
Optionally, the apparatus further comprises:
the second determination module is used for determining target atomic data under the first test environment which needs to be called in the test;
the first obtaining module is specifically configured to obtain a generation rule for generating target atomic data in the first test environment if the test data in the first test environment is in a use state;
the generating module is specifically configured to generate each target atomic data in the second test environment based on a generation rule for generating each target atomic data and the second test environment.
Optionally, the apparatus further comprises:
and the testing module is used for testing based on the generated second testing data under the second testing environment.
Compared with the prior art that when first test data under a first test environment is in a use state, other test tasks can be tested only after the current test task finishes using the first test data, the test data generation device judges whether the first test data under the first test environment is in the use state or not, and the first test data is nested with first test environment information, so that the first test data can be used under the first test environment; if the first test data under the first test environment condition is in a use state, acquiring a generation rule for generating the first test data; and generating second test data under the second test environment based on a generation rule for generating the first test data and second test environment information, wherein the second test data is nested in the second test environment information so that the second test data can be used under the second test environment condition. That is, when the first test data under the first test environment is in the use state, the second test data under the second test environment is generated based on the generation rule of the first test data and the corresponding second test environment information, so that the test can be performed based on the second test data. Therefore, the test data can be quickly recovered among a plurality of test environments, in addition, the utilization efficiency of the test environments is improved, and the phenomenon that users wait for test resources in a queue is reduced.
EXAMPLE III
An embodiment of the present application provides an electronic device, as shown in fig. 4, an electronic device 40 shown in fig. 4 includes: a processor 401 and a memory 403. Wherein the processor 401 is coupled to the memory 403, such as via a bus 402. Further, the electronic device 40 may also include a transceiver 404. It should be noted that the transceiver 404 is not limited to one in practical applications, and the structure of the electronic device 40 is not limited to the embodiment of the present application. The processor 401 is applied in the embodiment of the present application, and is used to implement the functions of the modules shown in fig. 2. The transceiver 404 includes a receiver and a transmitter.
The processor 401 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 401 may also be a combination of computing functions, e.g., comprising one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 402 may include a path that transfers information between the above components. The bus 402 may be a PCI bus or an EISA bus, etc. The bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The memory 403 may be, but is not limited to, a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, an EEPROM, a CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 403 is used for storing application program codes for executing the scheme of the application, and the execution is controlled by the processor 401. The processor 401 is configured to execute application program code stored in the memory 403 to implement the functions of the apparatus provided by the embodiment shown in fig. 2.
The embodiment of the present application provides an electronic device suitable for the above method embodiment, and specific implementation manners and technical effects are not described herein again.
Example four
The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the test data generation method shown in the above embodiment.
The embodiment of the present application provides a computer-readable storage medium suitable for the above method embodiment, and specific implementation manners and technical effects are not described herein again.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (11)

1. A method for generating test data, comprising:
judging whether first test data under a first test environment condition is in a use state, wherein the first test data is nested with first test environment information so that the first test data can be used under the first test environment condition;
if the first test data under the first test environment condition is in a use state, acquiring a generation rule for generating the first test data;
and generating second test data under the second test environment based on a generation rule for generating the first test data and second test environment information, wherein the second test data is nested in the second test environment information so that the second test data can be used under the second test environment condition.
2. The method of claim 1, wherein the second test environment information includes bottoming data for a second test environment, the method further comprising:
and generating second test data under the second test environment based on the generation rule for generating the first test data and the bottoming data of the second test environment.
3. The method of claim 1, wherein the generation rule comprises a test environment nesting rule, the method further comprising:
and generating second test data under the second test environment based on the test environment nesting rule in the generation rule for generating the first test data and second test environment information.
4. The method of claim 1, further comprising:
receiving a call request for first test data under a first test environment condition;
and judging whether the first test data under the first test environment condition is in a use state.
5. The method of claim 1, further comprising:
when the first test data under the first test environment condition is in a use state, acquiring the states of each test environment, wherein the states comprise a use state and a vacant state;
a second test environment is determined based on the state of each test environment.
6. The method according to any one of claims 1 to 5,
the first test data comprises a plurality of items of first atomic data, and each item of the first atomic data corresponds to a generation rule.
7. The method of claim 6, further comprising:
determining target atomic data under a first test environment which needs to be called in the test;
if the test data under the first test environment condition is in a use state, acquiring a generation rule for generating target atomic data under the first test environment;
and generating each target atom data under the second test environment based on the generation rule for generating each target atom data and the second test environment.
8. The method according to any one of claims 1-5, further comprising:
and performing testing based on the generated second testing data under the second testing environment.
9. A test data usage apparatus, comprising:
the first judging module is used for judging whether first test data under a first test environment condition is in a use state or not, and the first test data is nested with first test environment information so that the first test data can be used under the first test environment condition;
a first obtaining module, configured to obtain a generation rule for generating first test data if the first test data under the first test environment condition is in a use state;
and the generating module is used for generating second test data under the second test environment based on a generating rule for generating the first test data and second test environment information, and the second test data is nested with the second test environment information so that the second test data can be used under the second test environment condition.
10. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: performing the test data generation method of any of claims 1 to 8.
11. A computer-readable storage medium for storing computer instructions which, when executed on a computer, cause the computer to perform the test data generation method of any one of claims 1 to 8.
CN202110833584.0A 2021-07-23 2021-07-23 Test data generation method, test data generation device, electronic device and medium Pending CN113553264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110833584.0A CN113553264A (en) 2021-07-23 2021-07-23 Test data generation method, test data generation device, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110833584.0A CN113553264A (en) 2021-07-23 2021-07-23 Test data generation method, test data generation device, electronic device and medium

Publications (1)

Publication Number Publication Date
CN113553264A true CN113553264A (en) 2021-10-26

Family

ID=78132554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110833584.0A Pending CN113553264A (en) 2021-07-23 2021-07-23 Test data generation method, test data generation device, electronic device and medium

Country Status (1)

Country Link
CN (1) CN113553264A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817076A (en) * 2022-06-22 2022-07-29 国汽智控(北京)科技有限公司 Data processing method, device, equipment, medium and product of vehicle-mounted operating system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960654A (en) * 2019-02-22 2019-07-02 德联易控科技(北京)有限公司 Test method, device, equipment and the storage medium of setting loss rule
CN110457212A (en) * 2019-07-24 2019-11-15 艾瑞克·李 Test modeling and test data auto generation method based on complication system
CN111881016A (en) * 2020-06-19 2020-11-03 北京三快在线科技有限公司 Data processing system, method, equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960654A (en) * 2019-02-22 2019-07-02 德联易控科技(北京)有限公司 Test method, device, equipment and the storage medium of setting loss rule
CN110457212A (en) * 2019-07-24 2019-11-15 艾瑞克·李 Test modeling and test data auto generation method based on complication system
CN111881016A (en) * 2020-06-19 2020-11-03 北京三快在线科技有限公司 Data processing system, method, equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817076A (en) * 2022-06-22 2022-07-29 国汽智控(北京)科技有限公司 Data processing method, device, equipment, medium and product of vehicle-mounted operating system

Similar Documents

Publication Publication Date Title
US10929244B2 (en) Optimized backup of clusters with multiple proxy servers
Zhou et al. Delta debugging microservice systems
RU2429529C2 (en) Dynamic configuration, allocation and deployment of computer systems
US8966485B2 (en) Realizing jumps in an executing process instance
US10853189B2 (en) Image restore from incremental backup
CN111324610A (en) Data synchronization method and device
CN114327861B (en) Method, device, system and storage medium for executing EDA task
CN110471754B (en) Data display method, device, equipment and storage medium in job scheduling
CN106339177A (en) Method and device for creating virtual machines
US8856775B2 (en) Unstacking software components for migration to virtualized environments
CN113553264A (en) Test data generation method, test data generation device, electronic device and medium
CN114661523A (en) Data backup method, device, program product, medium and electronic equipment
Chen et al. SOAr-DSGrid: service-oriented architecture for distributed simulation on the grid
CN108897858A (en) The appraisal procedure and device, electronic equipment of distributed type assemblies index fragment
CN112416980B (en) Data service processing method, device and equipment
JP2003242313A (en) Business progress controller and method thereof, business progress control program, and recording medium recorded with the program
CN105760215A (en) Map-reduce model based job running method for distributed file system
CN114116123A (en) Application capacity expansion method and device
CN108446182A (en) A kind of striding course communication means and device based on shared drive
CN114416311A (en) Method and device for managing message queue based on Go language
CN112395081B (en) Online automatic resource recycling method, system, server and storage medium
CN112685130A (en) Virtual machine backup method and device in distributed storage environment and storage medium
CN112181825A (en) Test case library construction method and device, electronic equipment and medium
CN116701410B (en) Method and system for storing memory state data for data language of digital networking
US11709807B2 (en) Optimized tenant schema generation

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