CN117093475A - Test data generation method, system, server and computer readable storage medium - Google Patents

Test data generation method, system, server and computer readable storage medium Download PDF

Info

Publication number
CN117093475A
CN117093475A CN202310886620.9A CN202310886620A CN117093475A CN 117093475 A CN117093475 A CN 117093475A CN 202310886620 A CN202310886620 A CN 202310886620A CN 117093475 A CN117093475 A CN 117093475A
Authority
CN
China
Prior art keywords
data
test
environment database
total number
test environment
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
CN202310886620.9A
Other languages
Chinese (zh)
Inventor
张力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd, Unicom Cloud Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310886620.9A priority Critical patent/CN117093475A/en
Publication of CN117093475A publication Critical patent/CN117093475A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a test data generation method, a test data generation system, a test data generation server and a computer readable storage medium, and relates to the technical field of data processing. The method is applied to a server deployed with a test data generation system, and comprises the following steps: performing data desensitization processing on sensitive data in first data, wherein the first data is actual production data in a production environment database; synchronizing first data in the production environment database to the test environment database; test data is derived from a test environment database. Based on the method, the actual production data in the production environment database is processed, so that the actual production data can meet the requirement of the test data, the production data is synchronized to the test environment database from the production environment database, and the test data is derived from the test environment database. So that the test data is more close to the actual production data, the accuracy of the test result is improved, and the working efficiency of the software performance test is further improved.

Description

Test data generation method, system, server and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a test data generating method, a test data generating system, a test data generating server, and a computer readable storage medium.
Background
When performing performance test on software, test data required for a test scenario needs to be prepared. Currently, testers need to construct test data for testing by themselves, but for performance testing or stress testing, a large amount of test data is needed, and a large amount of time is needed for the testers to construct the test data. Moreover, for part of software, there may be an association relationship between different entries of the test data, so that it is difficult to construct the test data by itself, and inconvenience may be brought to the test work. Moreover, the test data constructed by the tester and the actual production data may have differences, so that the pressure in the actual production process cannot be well simulated, the test result may be inaccurate, and the working efficiency of the software performance test is further affected.
Disclosure of Invention
The application provides a test data generation method, a test data generation system, a server and a computer readable storage medium, so as to improve the working efficiency of software performance test.
In a first aspect, the present application provides a method for use with a server having a test data generation system deployed thereon, the method comprising: performing data desensitization processing on sensitive data in first data, wherein the first data is actual production data in a production environment database; synchronizing first data in the production environment database to the test environment database; test data is derived from a test environment database.
Based on the method, the actual production data in the production environment database is processed, so that the actual production data can meet the requirement of the test data, the production data is synchronized to the test environment database from the production environment database, and the test data is derived from the test environment database. So that the test data is more close to the actual production data, the accuracy of the test result is improved, and the working efficiency of the software performance test is further improved.
With reference to the first aspect, in certain possible implementation manners of the first aspect, before synchronizing the first data in the production environment database to the test environment database, the method further includes: judging the consistency of first data in the production environment database and second data in the test environment database, wherein the second data is data in the test environment database; in the event that the first data is inconsistent with the second data, the second data is backed up.
With reference to the first aspect, in certain possible implementation manners of the first aspect, after deriving the test data from the test environment database, the method further includes: and restoring the data in the test environment database into backup data.
With reference to the first aspect, in certain possible implementation manners of the first aspect, after synchronizing the first data in the production environment database to the test environment database, the method further includes: and generating a data synchronization log, wherein the information recorded by the data synchronization log comprises any one of network information, disk read-write information and disk capacity information.
With reference to the first aspect, in certain possible implementation manners of the first aspect, the method further includes: judging the consistency of the first data and the second data, wherein the second data is data in a test environment database; under the condition that the first data is inconsistent with the second data, analyzing the reason of data synchronization failure based on the data synchronization log, and synchronizing the first data to the test environment database again; in case the first data is consistent with the second data, the step of deriving test data from the test environment database is performed.
With reference to the first aspect, in some possible implementation manners of the first aspect, the production environment database and the test environment database are relational databases, the first data is carried in a first table, the second data is carried in a second table, the first table and the second table are two-dimensional tables, and consistency of the first data and the second data is determined according to the following manner: judging whether the total number of rows of the first table is consistent with the total number of rows of the second table, judging whether the total number of columns of the first table is consistent with the total number of columns of the second table, and if any one of the total number of columns of the first table is inconsistent with the total number of columns of the second table, the first data is inconsistent with the second data; if the total number of rows of the first table is consistent with the total number of rows of the second table, and the total number of columns of the first table is consistent with the total number of columns of the second table, judging whether the mth row of the first table is consistent with the mth row of the second table, or judging whether the nth column of the first table is consistent with the nth column of the second table, if any one of the columns is inconsistent, the first data is inconsistent with the second data, otherwise, the first data is consistent with the second data; wherein M is more than or equal to 1 and less than or equal to M, N is more than or equal to 1 and less than or equal to N, M is the total number of rows of the first table or the total number of rows of the second table, and N is the total number of columns of the first table or the total number of columns of the second table.
With reference to the first aspect, in certain possible implementation manners of the first aspect, deriving test data from a test environment database includes: the test data is derived from the test environment database based on preset data derivation rules including random derivation or sequential derivation, and the format of the test data includes a Character Separation Value (CSV) or text document (TXT).
With reference to the first aspect, in certain possible implementation manners of the first aspect, the method further includes: and verifying the authority of personnel logging in the test data generating system.
In a second aspect, the present application provides a test data generation system deployed on a server, the test data generation system comprising: the data processing module is used for carrying out data desensitization processing on sensitive data in the first data, wherein the first data is actual production data in the production environment database; the data synchronization module is used for synchronizing the first data in the production environment database to the test environment database; and the data export module is used for exporting the test data from the test environment database.
In a third aspect, the present application provides a server comprising a memory and a processor, wherein the memory is for storing a computer program; the processor is configured to invoke and execute a computer program to implement the method as described in the first aspect and any possible implementation of the first aspect.
In a fourth aspect, the application provides a computer readable storage medium comprising a computer program which, when run on a computer, causes the computer to perform the method of the first aspect and any one of the possible implementations of the first aspect.
In a fifth aspect, the application provides a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method of the first aspect and any one of the possible implementations of the first aspect.
It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the advantages obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow chart of a test data generation method according to an embodiment of the present application;
FIG. 2 is another flow chart of a test data generating method according to an embodiment of the present application;
FIG. 3 is a schematic block diagram of a test data generation system provided by an embodiment of the present application;
fig. 4 is a schematic block diagram of a server provided by an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are some, but not all, embodiments of the application.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In embodiments of the present application, the terms "first," "second," and the like are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the term "include" and any variations thereof are intended to cover a non-exclusive inclusion.
After a software developer has developed a piece of software, in order to evaluate the performance of the software in an omnibearing manner, a tester needs to test the performance of the software, for example, a performance test is performed on a web system interface of the software.
Before performance testing, the tester needs to prepare test data required by the test scenario. Currently, test personnel generally construct test data for testing by themselves, but the amount of test data required for performance testing or stress testing is quite large, possibly on the order of hundreds of thousands, millions or even higher. It takes a lot of time and effort for the tester to construct such a lot of data by himself. And for partial software or partial business in the software, the correlation exists between different items in the test data, so that the test personnel can hardly construct the test data by themselves. Moreover, the test data constructed by the tester and the actual production data may have differences, so that the pressure in the actual production process cannot be well simulated, the test result is inaccurate, and the working efficiency of the software performance test is further affected.
In view of this, the present application provides a method for generating test data, which processes actual production data in a production environment database, so that the actual production data can meet the requirement of the test data, synchronizes the production data from the production environment database to the test environment database, and derives the test data from the test environment database. So that the test data is more close to the actual production data, the accuracy of the test result is improved, and the working efficiency of the software performance test is further improved.
Fig. 1 is a flow chart of a test data generating method according to an embodiment of the present application. The method 100 is applied to a server having a test data generation system deployed, and includes steps 110 through 130, each of which is described in detail below in the method 100.
In step 110, data desensitization processing is performed on sensitive data in the first data.
The first data is actual production data in a production environment database, and the sensitive data comprises any one of a password, an identity card number and a home address.
Since the actual production data in the production environment database may relate to sensitive data related to the personal information of the user, and the security level of the production environment database will generally be higher than that of the test environment database, it may be determined whether the sensitive data is included in the production data before synchronizing the production data from the production environment database to the test environment database.
In the case where the sensitive data is included in the production data, the data desensitization processing may be performed on the sensitive data. Possible implementations of the data desensitization process may include, for example, the following:
1. invalidation processes, for example, use special characters such as asterisks to replace part of the fields in the sensitive data.
2. Random value substitution, for example, substituting letters in the sensitive data with random letters, substituting numbers in the sensitive data with random numbers, and substituting words in the sensitive data with random words.
3. Data replacement, for example, may replace a portion of the fields in the sensitive data with a predetermined field.
4. Key encryption, i.e. the encryption of sensitive data using an encryption key.
It should be understood that the above possible implementations of the data desensitization process are only examples, and the specific implementations of the data desensitization process are not limited by the present application.
In step 120, first data in the production environment database is synchronized to the test environment database.
Alternatively, before the first data is stepped into the test environment database, it may be determined whether the first data is consistent with the second data in the test environment database. If the first data and the second data are consistent, then there may be no need to synchronize the first data to the test environment database. The second data is data in the test environment database.
If the first data and the second data are inconsistent, the second data in the test environment database can be backed up, and after the backup is completed, the first data are synchronized to the test environment database.
In practical applications, the test environment database may be common to multiple testers or test teams. Therefore, prior to changing the data in the test environment database, the original data therein needs to be backed up so as to restore the test environment database to the original state after the test, so that other testers or other test teams can use the test environment database.
Optionally, after the first data is stepped to the test environment database, a data synchronization log may be generated for the current data synchronization operation. The information recorded in the data synchronization log may include any one of network information, disk read-write information, and disk capacity information.
The generation of the data synchronization log is beneficial to the testers to acquire the state of the data synchronization, and if the data synchronization fails, the testers can analyze the reason of the data synchronization failure according to the data synchronization log.
In step 130, test data is derived from the test environment database.
Optionally, in the process of data synchronization, the data synchronization may fail due to network failure, disk read/write errors, or disk capacity fullness, so that the consistency of the first data and the second data may be secondarily determined before the test data is derived.
If the first data and the second data are inconsistent, indicating that the data synchronization fails, analyzing the reason of the data synchronization failure based on the data synchronization log, and synchronizing the first data to the test environment database again.
If the first data and the second data are consistent, indicating that the data synchronization is successful, a step of exporting test data from the test environment database may be performed.
It should be appreciated that after the first data is again synchronized to the test environment database, a data synchronization log may also be generated, and a third determination of the consistency of the first data with the second data, and a third data synchronization, may also be performed. The embodiments of the present application will not be described in detail.
Alternatively, the production environment database and the test environment database may be relational databases storing data in rows and columns. A series of rows and columns in a relational database may form a two-dimensional table, with the relational database storing data in the form of two-dimensional tables.
The table carrying the first data is denoted as a first table and the table carrying the second data is denoted as a second table. The manner of judging the consistency of the first data and the second data may be:
first, whether the total number of rows of the first table is consistent with the total number of rows of the second table and whether the total number of columns of the first table is consistent with the total number of columns of the second table are judged. If the total number of rows or columns of the first table and the second table are not consistent, the data in the two tables are not consistent.
If the total number of rows and the total number of columns of the first table and the second table are consistent, that is, the total number of rows of the first table and the second table is M, and the total number of columns of the first table and the second table is N, further judging whether the data in the mth row of the first table is consistent with the data in the mth row of the second table, or judging whether the data in the nth column of the first table is consistent with the data in the nth column of the second table. If any one of the data is inconsistent, the first data and the second data are inconsistent; otherwise the first data is consistent with the second data.
In the event that the first data is determined to be consistent with the second data, the test data may be derived from the test environment database.
The test data may be derived from the test environment database based on a preset data derivation rule and a derived data amount, the data derivation rule includes a random derivation or a sequential derivation, and the format of the test data includes a character separation value CSV or a text document TXT.
The data export rules and the amount of data exported may be preset by the tester. The tester can set the derived data volume according to the data volume in the actual production process or the data volume required by the pressure test, and the data volume can reach tens of thousands, hundreds of thousands or millions, for example.
The data export rule, the exported data volume and the exported test data format support the self-setting of the testers, so that the flexibility of generating the test data is improved.
Optionally, after the test data is exported from the test environment database, the data in the test environment database may be restored to backup data to facilitate use of the test environment database by other testers or other test teams.
It should be appreciated that since the test data generation method according to the embodiment of the present application may contact sensitive data related to a user, it is necessary to perform authority verification on a person logging in the test data generation system. After verifying the authority of the person, the test data generating method according to the embodiment of the present application may be executed.
Fig. 2 is another flow chart of a test data generating method according to an embodiment of the present application.
As shown in fig. 2, the authority of the person logging in the system is verified first, and after the authority of the person is verified, the test data generating method according to the embodiment of the present application may be executed.
It is determined whether the first data relates to sensitive data. If the first data relates to the sensitive data, performing data desensitization processing on the sensitive data in the first data, and then judging whether the first data is consistent with the second data or not; if the first data does not relate to the sensitive data, directly judging whether the first data is consistent with the second data. The first data are actual production data in the production environment database, and the second data are data in the test environment database.
If the first data is consistent with the second data, the test data may be directly derived from the test environment database.
If the first data is inconsistent with the second data, the second data in the test environment database is backed up, then the first data is synchronized to the test environment database, and a data synchronization log is generated.
Then judging whether the first data are consistent with the second data again, if not, analyzing the reason of the synchronization failure based on the data synchronization log, synchronizing the first data to the test environment database again, and generating a synchronization log; if so, the test data is exported from the test environment database.
Optionally, after the test data is exported, the data in the test environment database may be restored to backup data for use by other test personnel or other test teams.
Based on the method, the actual production data in the production environment database is processed, so that the actual production data can meet the requirement of the test data, the production data is synchronized to the test environment database from the production environment database, and the test data is derived from the test environment database. So that the test data is more close to the actual production data, the accuracy of the test result is improved, and the working efficiency of the software performance test is further improved.
Fig. 3 is a schematic block diagram of a test data generation system provided by an embodiment of the present application. The test data generation system may be deployed on a server, and the test data generation system 300 may include a data processing module 310, a data synchronization module 320, and a data export module 330.
The data processing module 310 is configured to perform data desensitization processing on sensitive data in the first data, where the first data is actual production data in the production environment database, and the sensitive data may include any one of a password, an identity card number, and a home address;
the data synchronization module 320 is configured to synchronize the first data in the production environment database to the test environment database;
the data export module 330 is configured to export test data from a test environment database.
Optionally, the data processing module 310 may be further configured to determine consistency of the first data in the production environment database and the second data in the test environment database, where the second data is data in the test environment database;
the test data generation system may further comprise a data backup module 340, the data backup module 340 being operable to backup the second data in case the first data is inconsistent with the second data.
The test data generation system may also include a data restoration module 350, the data restoration module 350 being operable to restore data in the test environment database to backup data.
The test data generation system may further include a log module 360, where the log module 360 may be configured to generate a data synchronization log, and information recorded in the data synchronization log includes any one of network information, disk read-write information, and disk capacity information.
Optionally, the data processing module 310 may be further configured to determine consistency of the first data and the second data;
the log module 360 is further configured to analyze a cause of a data synchronization failure based on the data synchronization log in a case where the first data is inconsistent with the second data;
the data synchronization module 320 may also be configured to synchronize the first data to the test environment database again.
Optionally, the data export module 330 may be configured to export test data from the test environment database based on preset data export rules and exported data volumes, where the data export rules include random export or sequential export, and the format of the test data includes character separation values CSV or text documents TXT.
The test data generation system may also include a rights verification module 370, the rights verification module 370 being operable to verify the rights of a person logging into the test data generation system.
Fig. 4 is a schematic block diagram of a server provided by an embodiment of the present application. As shown in fig. 4, the server 400 may include at least one processor 410 for implementing the functionality of the test data generation system in the method provided by the present application. Reference is made specifically to the detailed description in the method examples, and details are not described here.
The server 400 may also include a memory 420 for storing program instructions and/or data. Memory 420 is coupled to processor 410. The coupling in the present application is an indirect coupling or communication connection between devices, units or modules, which may be in electrical, mechanical or other form for the exchange of information between the devices, units or modules. Processor 410 may operate in conjunction with memory 420. Processor 410 may execute program instructions stored in memory 420. At least one of the at least one memory may be included in the processor.
The server 400 may also include a communication interface 430 for communicating with other devices over a transmission medium, such that the apparatus used in the server 400 may communicate with other devices. The communication interface 430 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of implementing a transceiver function. The processor 410 may utilize the communication interface 430 to transmit and receive data and/or information and is configured to implement the test data generation method described in the corresponding embodiment of fig. 1 or fig. 2.
The specific connection medium between the processor 410, the memory 420, and the communication interface 430 is not limited in the present application. The present application is illustrated in fig. 4 as being coupled between processor 410, memory 420, and communication interface 430 via bus 440. The bus 440 is shown in bold lines in fig. 4, and the manner in which the other components are connected is illustrated schematically and not by way of limitation. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
In the embodiment of the present application, the processor may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps and logic blocks disclosed in the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
According to the method provided by the application, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores program code, when the program code runs on a computer, the computer is caused to execute the test data generating method described in the corresponding embodiment of fig. 1 or fig. 2.
According to the method provided by the application, the application also provides a computer program product comprising: computer program code. The computer program code, when run on a computer, causes the computer to perform the test data generation method described in the corresponding embodiment of fig. 1 or fig. 2.
The technical scheme provided by the application can be realized in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a network device, a terminal device, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired, such as coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium such as digital video disc (digital video disc, DVD), or a semiconductor medium, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A test data generation method for a server having a test data generation system deployed thereon, the method comprising:
performing data desensitization processing on sensitive data in first data, wherein the first data is actual production data in a production environment database;
synchronizing the first data in the production environment database to a test environment database;
test data is derived from a test environment database.
2. The method of claim 1, wherein prior to said synchronizing said first data in the production environment database to the test environment database, the method further comprises:
judging the consistency of the first data in the production environment database and the second data in the test environment database, wherein the second data is the data in the test environment database;
and backing up the second data in the case that the first data is inconsistent with the second data.
3. The method of claim 2, wherein after said deriving test data from a test environment database, the method further comprises:
and restoring the data in the test environment database into backup data.
4. The method of claim 1, wherein after said synchronizing said first data in the production environment database to the test environment database, the method further comprises:
and generating a data synchronization log, wherein the information recorded by the data synchronization log comprises any one of network information, disk read-write information and disk capacity information.
5. The method of claim 4, wherein the method further comprises:
judging the consistency of the first data and the second data, wherein the second data is data in a test environment database;
analyzing the reason of data synchronization failure based on the data synchronization log under the condition that the first data is inconsistent with the second data, and synchronizing the first data to a test environment database again;
and in the case that the first data is consistent with the second data, executing the step of deriving test data from a test environment database.
6. The method of claim 2 or 5, wherein the production environment database and the test environment database are relational databases, the first data is carried in a first table, the second data is carried in a second table, the first table and the second table are two-dimensional tables, and the consistency of the first data and the second data is determined according to the following manner:
judging whether the total number of rows of the first table is consistent with the total number of rows of the second table, judging whether the total number of columns of the first table is consistent with the total number of columns of the second table, and if any one of the total number of columns of the first table is inconsistent with the total number of columns of the second table, the first data is inconsistent with the second data;
if the total number of rows of the first table is consistent with the total number of rows of the second table, and the total number of columns of the first table is consistent with the total number of columns of the second table, judging whether the mth row of the first table is consistent with the mth row of the second table, or judging whether the nth column of the first table is consistent with the nth column of the second table, if any one of the columns is inconsistent with the nth column of the second table, the first data is inconsistent with the second data, otherwise, the first data is consistent with the second data; wherein M is more than or equal to 1 and less than or equal to M, N is more than or equal to 1 and less than or equal to N, M is the total number of rows of the first table or the total number of rows of the second table, and N is the total number of columns of the first table or the total number of columns of the second table.
7. The method of claim 1, wherein the deriving test data from a test environment database comprises:
the test data is derived from a test environment database based on preset data derivation rules including random derivation or sequential derivation, and the derived data amount, and the format of the test data includes character separation values CSV or text documents TXT.
8. The method of claim 1, wherein the method further comprises:
and verifying the authority of personnel logging in the test data generation system.
9. A test data generation system, deployed on a server, the system comprising:
the data processing module is used for carrying out data desensitization processing on sensitive data in first data, wherein the first data is actual production data in a production environment database;
the data synchronization module is used for synchronizing the first data in the production environment database to the test environment database;
and the data export module is used for exporting the test data from the test environment database.
10. A server comprising a memory and a processor, wherein,
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium comprising a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1 to 8.
CN202310886620.9A 2023-07-18 2023-07-18 Test data generation method, system, server and computer readable storage medium Pending CN117093475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310886620.9A CN117093475A (en) 2023-07-18 2023-07-18 Test data generation method, system, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310886620.9A CN117093475A (en) 2023-07-18 2023-07-18 Test data generation method, system, server and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117093475A true CN117093475A (en) 2023-11-21

Family

ID=88772645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310886620.9A Pending CN117093475A (en) 2023-07-18 2023-07-18 Test data generation method, system, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117093475A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117762758A (en) * 2023-12-25 2024-03-26 中国电子技术标准化研究院 Performance efficiency consistency test method and system for web system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117762758A (en) * 2023-12-25 2024-03-26 中国电子技术标准化研究院 Performance efficiency consistency test method and system for web system
CN117762758B (en) * 2023-12-25 2024-05-14 中国电子技术标准化研究院 Performance efficiency consistency test method and system for web system

Similar Documents

Publication Publication Date Title
CN108319719B (en) Database data verification method and device, computer equipment and storage medium
CN104246767A (en) Telemetry system for a cloud synchronization system
CN104252481A (en) Dynamic check method and device for consistency of main and salve databases
CN112214411B (en) Disaster recovery system testing method, device, equipment and storage medium
CN117093475A (en) Test data generation method, system, server and computer readable storage medium
CN106547658B (en) Automatic testing method and device
CN109284331B (en) Certificate making information acquisition method based on service data resources, terminal equipment and medium
CN112202633A (en) Block chain network testing method and device, electronic equipment and readable storage medium
CN111339551A (en) Data verification method and related device and equipment
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN108228611B (en) Document information copying method and device
CN106301967B (en) A kind of method of data synchronization and outband management equipment
CN114895879B (en) Management system design scheme determining method, device, equipment and storage medium
CN113312205A (en) Data verification method and device, storage medium and computer equipment
CN111625396A (en) Backup data verification method, server and storage medium
CN113590440A (en) Pressure testing method, device, equipment and medium for bank core system
CN112506786A (en) Regression testing method and regression testing device
CN110399098A (en) A kind of data processing method and electronic equipment
CN115640236B (en) Script quality detection method and computing device
US7840945B2 (en) Software resource testing
CN111400175B (en) Recording and playback system, method and equipment for web operation event
CN113962176B (en) Method and device for verifying correctness of netlist file subjected to triple modular redundancy processing
US8799575B2 (en) Memory card cleaner and method of utilization
CN117235793A (en) Data desensitization method, device, equipment and storage medium
CN114036002A (en) Block chain data backup method and device, storage medium and electronic equipment

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