CN115981525A - Test data construction method, device, equipment and medium - Google Patents

Test data construction method, device, equipment and medium Download PDF

Info

Publication number
CN115981525A
CN115981525A CN202211075726.2A CN202211075726A CN115981525A CN 115981525 A CN115981525 A CN 115981525A CN 202211075726 A CN202211075726 A CN 202211075726A CN 115981525 A CN115981525 A CN 115981525A
Authority
CN
China
Prior art keywords
data
test
data construction
instruction
target
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
CN202211075726.2A
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.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology 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 Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211075726.2A priority Critical patent/CN115981525A/en
Publication of CN115981525A publication Critical patent/CN115981525A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a test data construction method for data synchronization, and relates to the field of finance or other fields. The method comprises the following steps: responding to the test operation of a user, and displaying N test scene options, wherein N is an integer greater than or equal to 1; determining a target option selected by the user from the N test scenario options; and if a target data construction instruction corresponding to the target option is stored in advance, sending the target data construction instruction to a first system and/or a second system, wherein the first system and the second system are different in version, and the first system and the second system are configured to obtain test data according to the target data construction instruction so as to realize data synchronization. The present disclosure also provides a test data construction apparatus, a device, a storage medium, and a program product for data synchronization.

Description

Test data construction method, device, equipment and medium
Technical Field
The present disclosure relates to the field of finance, and more particularly, to a test data construction method, apparatus, device, medium, and program product for data synchronization.
Background
There is a merge period during the system iteration during which both the new and old systems can be used to provide service. During the track combination, the two-way synchronization is performed, that is, the data change in the old system is synchronized to the new system, and the data change in the new system is synchronized to the old system, so as to achieve the purpose of data consistency between the new system and the old system.
In the process of system iteration, after a research and development worker modifies a new system defect, a tester firstly needs to manually construct synchronous test data to verify whether the defect is repaired. If the defects are repaired, testers need to manually construct synchronous test data again for verifying all the function points of the whole system of the new system, and regression testing is carried out.
Disclosure of Invention
In the process of implementing the inventive concept disclosed herein, the inventor finds that, in the process of changing system versions for multiple times, each time the system version changes, regression testing needs to be performed on the scene manual construction synchronous test data to be tested, for example, different previous and subsequent system version changes may repeat the same scene manual construction synchronous test data to be tested, and when multiple scenes need to be tested after each time the system version changes, each scene may also manually construct data. The manual construction of synchronous test data is slow, costly and inefficient. In addition, when a defect is verified, data which is the same as that when the defect is found needs to be created so as to verify whether the defect is repaired, and due to manual entry, the situation that the data created by testing is inconsistent with the data when the defect is found often occurs, and the repair situation of the defect cannot be correctly verified.
In view of the foregoing, the present disclosure provides a test data construction method, apparatus, device, medium, and program product for data synchronization.
One aspect of the embodiments of the present disclosure provides a test data construction method for data synchronization, including: responding to the test operation of a user, and displaying N test scene options, wherein N is an integer greater than or equal to 1; determining a target option selected by the user from the N test scenario options; and if a target data construction instruction corresponding to the target option is stored in advance, sending the target data construction instruction to a first system and/or a second system, wherein the first system and the second system are different in version, and the first system and the second system are configured to obtain test data according to the target data construction instruction so as to realize data synchronization.
According to an embodiment of the present disclosure, if the target data structuring instruction is not pre-stored, the method further includes: monitoring a first log file of the first system or a second log file of the second system in response to a logging operation by the user; obtaining a data construction instruction from the first log file or the second log file; storing the data construction instructions.
According to an embodiment of the present disclosure, the storing the data construction instruction includes: determining the corresponding relation between the data construction instruction and the target option; and storing the data construction instruction based on the corresponding relation.
According to an embodiment of the present disclosure, the sending the target data structuring instruction to the first system and/or the second system comprises sending the target data structuring instruction to the first system, the first system being configured to execute the target data structuring instruction to obtain the test data, the method further comprising: monitoring a first log file of the first system using a data synchronization system; acquiring the target data construction instruction from the first log file; sending the target data construction instruction to the second system, wherein the second system is configured to execute the target data construction instruction to obtain the test data.
According to an embodiment of the present disclosure, the method further comprises: comparing the test data consistency in the first system and the second system; and/or executing the same test flow on the first system and the second system according to the test data in the first system and the second system respectively.
According to an embodiment of the present disclosure, the first system and the second system have the same M functions, M is an integer greater than or equal to 1, and the displaying N test scenario options includes: and displaying the M functions and the corresponding relation between each function and at least one test scenario option, wherein the N test scenario options comprise the at least one test scenario option.
Another aspect of the embodiments of the present disclosure provides a test data construction apparatus for data synchronization, including a data construction system including: the option display module is used for responding to the test operation of a user and displaying N test scene options, wherein N is an integer greater than or equal to 1; an option determining module, configured to determine a target option selected by the user from the N test scenario options; and the instruction sending module is used for sending the target data construction instruction to a first system and/or a second system if the target data construction instruction corresponding to the target option is stored in advance, wherein the first system and the second system are different in version, and the first system and the second system are configured to obtain test data according to the target data construction instruction so as to realize data synchronization.
According to an embodiment of the present disclosure, the apparatus further comprises: the first system is used for receiving the target data construction instruction sent by the data construction system and executing the target data construction instruction to obtain test data; the data synchronization system is used for monitoring a first log file of the first system, acquiring the target data construction instruction from the first log file, and sending the target data construction instruction to the second system; and the second system is used for receiving the target data construction instruction sent by the data synchronization system and executing the target data construction instruction to obtain test data.
Another aspect of an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as described above.
Yet another aspect of the embodiments of the present disclosure provides a computer-readable storage medium having stored thereon executable instructions, which when executed by a processor, cause the processor to perform the method as described above.
Another aspect of the embodiments of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the method as described above.
One or more of the above embodiments have the following advantageous effects:
the automatic data construction of the first system and the second system can be realized through the pre-stored target data construction instruction, the synchronous test data can be prevented from being manually constructed on the same scene to be tested repeatedly in the process of changing the system versions for multiple times, and the data can also be automatically constructed on one or more test scenes after the system versions are iterated every time, so that the efficiency is improved, the cost is reduced, the synchronous test data can be quickly constructed without losing the data, and the condition that the test data when the defect is verified is inconsistent with the test data when the defect is found due to memory errors or manual operation errors is avoided. One or more test scene options can be provided, and data construction instructions corresponding to one or more test scenes are stored in advance, so that the diversity of construction test data is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates a flow chart of a test data construction method for data synchronization according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a get data construction instruction according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow diagram of store data construction instructions according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of data synchronization according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a flow diagram of a data synchronization test according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow diagram of a test data construction method according to another embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a data construction system according to an embodiment of the present disclosure;
FIG. 8 schematically shows a block diagram of a test data construction apparatus according to an embodiment of the present disclosure; and
FIG. 9 schematically illustrates a block diagram of an electronic device suitable for implementing a test data construction method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "A, B and at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the bidirectional synchronous regression testing and defect verification process, synchronous testing data needs to be constructed to test a certain function or flow every time a defect is regressed or verified. For example, to verify the consistency of data constructed by a new system after the data is synchronized to an old system: firstly, a tester is required to log in a new system, data which needs to be synchronized is manually constructed on a page of the new system, then after the data is synchronized to an old system, the tester logs in the old system again, and the consistency of the data of the new system and the data of the old system are compared.
For example, as the localization of the system advances, there is a parallel period of data synchronization in the process of changing the system of the old C/S (client/server) architecture into the system of the new B/S (browser/server) architecture. During the iteration process of the system version, a large amount of synchronous test data needs to be constructed. The tester faces the following problems:
1. it is necessary to repeatedly construct test data for defect verification and regression testing many times, and there may be a case where data created at the time of defect verification is inconsistent with data at the time of defect discovery. For example, when a tester finds a defect, the tester does not explicitly record the content of the constructed test data, and the log file may not record the content, so that the original test data cannot be reproduced after the defect is repaired.
2. Synchronous test data needs to be constructed quickly, and data is constructed manually and is slow.
3. The diversity of the data types needs to be tested, and data is constructed manually in each scene, so that the speed is low, the cost is high, and the efficiency is low.
Therefore, the solution of manually constructing test data for data synchronization test in the related art cannot solve the above problem. Specifically, the system version iteration in the present disclosure may include a system modification of a C/S architecture into a new B/S architecture, and may also include a version iteration of a system under the same architecture (e.g., a C/S architecture or a B/S architecture), such as a defect or a function update.
The embodiment of the disclosure provides a test data construction method for data synchronization, which can automatically construct data of a first system and a second system through a pre-stored target data construction instruction, can avoid manually constructing synchronous test data for the same scene to be tested repeatedly by system versions in different times in the process of system version alternation for multiple times, and can also automatically construct data for one or more test scenes after system version iteration every time, thereby improving efficiency and reducing cost, and can quickly construct synchronous test data without losing data, and avoid the condition that the test data when defects are verified and the test data when defects are found are inconsistent due to memory errors or manual operation errors. One or more test scene options can be provided, and data construction instructions corresponding to one or more test scenes are stored in advance, so that the diversity of construction test data is improved.
It should be noted that the test data construction method, apparatus, device, medium, and program product for data synchronization according to the embodiments of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field.
FIG. 1 schematically shows a flow chart of a test data construction method for data synchronization according to an embodiment of the present disclosure.
As shown in fig. 1, the test data construction method of this embodiment includes operations S110 to S130.
In operation S110, in response to a test operation of a user, N test scenario options are presented, where N is an integer greater than or equal to 1.
Illustratively, the user may be a tester. The test operation of the user can be clicking the test module to enter a test data construction interface. For example, after a user enters the data construction system, the user is presented with a plurality of modules, among which are test modules. Then, the user clicks the test module to see the displayed N test scene options. The test scenario may be obtained according to an application scenario of each system function, for example, an account password verification scenario, an account password submission scenario, or a login return prompt verification scenario in the login function. An account password verification scene, an account password writing scene or a mobile phone number binding scene and the like in the registration function.
In operation S120, a target option selected by the user from the N test scenario options is determined.
For example, a user may click on a certain test scenario option from a terminal device, the terminal device sends a request to a backend server of the data construction system, and the backend server may receive the request and determine a target option.
A user may use a terminal device to interact with a server over a network to receive or send messages, etc. Various messaging client applications may be installed on the terminal device, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal device may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like.
The server may be a server providing various services, such as a background management server (for example only) providing support for users to utilize the terminal devices, browsed websites. The backend management server may analyze and process the received data such as the user request, and feed back a processing result (for example, a web page, information, or data obtained or generated according to the user request) to the terminal device.
In operation S130, if a target data constructing instruction corresponding to the target option is pre-stored, the target data constructing instruction is sent to a first system and/or a second system, where versions of the first system and the second system are different, and the first system and the second system are configured to obtain test data according to the target data constructing instruction to implement data synchronization.
Illustratively, the back-end server may match its corresponding target data construction instructions according to the target options. The mapping relationship between each of the N test scenario options and at least one data construction instruction may be preset, and the instruction corresponding to the option is determined according to the mapping relationship. Moreover, the data structure instruction corresponding to a certain test scenario option in the mapping relationship may be a null value, that is, the instruction corresponding to the option is not stored in advance.
The data construction instructions may be SQL statements. Structured Query Language (SQL), a special purpose programming Language, is a database Query and programming Language for accessing data and querying, updating, and managing relational database systems.
For example, the target data structuring instruction may be transmitted to the first system and the second system at the same time, or may be transmitted to either of the first system and the second system. The first system and the second system are configured to obtain the test data according to the target data construction instruction to realize data synchronization, and the following conditions are included: if the two systems send the instruction simultaneously, the two systems execute the instruction to realize the same data processing. If the data is sent to any side system, the other side system can obtain the SQL statement from the instruction receiving side system or obtain the data after the SQL statement is executed from the instruction receiving side system.
According to the embodiment of the disclosure, when the defect is verified, the condition that the test data when the defect is verified is inconsistent with the test data when the defect is found due to the memory error or the manual operation error is reduced, and the synchronous data error can be reduced. In the iterative process of multiple system versions, when the same function is regressed and tested or tested aiming at multiple scenes, data can be quickly constructed through the data construction system, and the testing efficiency is improved. For a plurality of scenes of a certain function, a plurality of types of data can be prepared, and the diversity of synchronous data of the test structure is improved.
According to an embodiment of the present disclosure, the first system and the second system have the same M functions, where M is an integer greater than or equal to 1, and the displaying N test scenario options in operation S110 includes: and displaying the M functions and the corresponding relation between each function and at least one test scene option, wherein the N test scene options comprise at least one test scene option.
Illustratively, for example in the financial field, the M systems may include a remittance function, a loan function, a payment function, a registration function, a login function, or an accounting function, etc. (by way of example only). Each function may have a different application scenario, and thus, at least one test scenario is configured for each function accordingly. Therefore, the tester can construct test data rapidly according to functions and scenes, the data construction efficiency and the test efficiency are improved, and diversified data construction functions can be provided.
FIG. 2 schematically shows a flow diagram of a get data construction instruction according to an embodiment of the disclosure.
If the target data structuring command is not stored in advance, as shown in fig. 2, the data structuring command may be acquired and stored, which may include operations S210 to S230.
In operation S210, a first log file of a first system or a second log file of a second system is monitored in response to a recording operation of a user.
For example, if the data construction system does not fetch the target data construction instruction, a prompt may be issued to the user: whether to record data construction instructions (for example only). The user may confirm yes (i.e., start the recording operation), and perform the data structuring operation on the first system or the second system, for example, the user performs an operation of adding, modifying, or deleting data on a data structuring page of a certain system. The user may select the first system or the second system to perform the data structuring operation after confirming the data structuring operation, or may set in advance which system the user needs to perform the data structuring operation in the data structuring system.
In operation S220, a data structuring instruction is acquired from the first log file or the second log file.
Illustratively, after the first system or the second system finishes the data construction operation, the first system or the second system may generate and execute the SQL statement in response to the operation content to construct the data, and in the process, the SQL statement is written into the first log file or the second log file. So that the data construction instructions (i.e., SQL statements) can be obtained in the first log file or the second log file.
In other implementations, the user can directly and manually input the SQL statements and write the first log file or the second log file by the first system or the second system.
In operation S230, a data construction instruction is stored.
Illustratively, whether the first log file or the second log file is obtained depends on the system selected for the data construction operation. For example, if the user selects the record data construction command and selects the input at the first system, the data construction system can read the contents (full or incremental contents) of the first log file in real time. The first system writes the SQL statement into the first log file, and the data construction system can identify the newly added SQL statement in the first log file for storage.
Illustratively, the user may choose to end the recording operation at the data construction system.
According to the embodiment of the disclosure, the log can be read across systems and the instruction can be automatically recognized, so that the data construction instruction of the target test scenario option is automatically recorded under the condition of no pre-storage.
Illustratively, the data construction system may store the function and target options selected by the user prior to the recording operation. This is described below with reference to fig. 3.
FIG. 3 schematically illustrates a flow diagram of store data construction instructions according to an embodiment of the disclosure.
As shown in fig. 3, storing the data structuring instruction in operation S230 includes operations S310 to S320.
In operation S310, a correspondence relationship of the data structuring instruction to the target option is determined.
Illustratively, for example, after the SQL statement is obtained from the first log file, the target option selected by the user may be determined, and the corresponding relationship between the SQL statement and the target option may be established.
In operation S320, a data structuring instruction is stored based on the correspondence relationship.
Illustratively, the target option is stored in correspondence with the SQL statement. For example in a database table or in the form of key-value pairs. The data construction instruction can be conveniently and quickly taken out subsequently to construct test data. When being convenient for follow-up test, construct data fast and raise the efficiency, avoid manual structure to produce the error.
Fig. 4 schematically shows a flow chart of data synchronization according to an embodiment of the present disclosure.
Transmitting the target data structuring instruction to the first system and/or the second system in operation S230 includes transmitting the target data structuring instruction to the first system, the first system being configured to execute the target data structuring instruction to obtain the test data, and as shown in fig. 4, the data synchronization of this embodiment includes performing operations S410 to S430 using the data synchronization system.
Illustratively, for example, the new system and the old system respectively record operation logs of the systems, and the data synchronization system sends SQL statements to the opposite system (the new system generates data changes, and then the opposite system is the old system, and vice versa) by capturing the add, delete and change SQL statements in the new and old system logs and executes the SQL statements so as to achieve the purpose of data consistency between the new system and the old system. In other embodiments, the data synchronization system may also synchronize the data after the execution of the SQL statement to the other system.
In operation S410, a first log file of a first system is monitored.
In operation S420, a target data construction instruction is acquired from the first log file.
In operation S430, the target data structuring instruction is sent to a second system, and the second system is configured to execute the target data structuring instruction to obtain the test data.
Illustratively, the data synchronization system can read the first log file in real-time or on a regular basis and identify new SQL statements in the log. And sending the obtained new SQL statement to the second system, and enabling the second system to execute the SQL statement, so that data synchronization can be realized, and the data of the two systems have consistency.
It should be noted that, when the target data structuring instruction is sent to the second system in operation S230, the synchronization process from operation S410 to operation S430 is also applied.
FIG. 5 schematically shows a flow diagram of a data synchronization test according to an embodiment of the disclosure.
As shown in fig. 5, the data synchronization test of this embodiment includes performing operation S510 and/or operation S520.
In operation S510, test data consistency in the first system and the second system is compared.
For example, during the track combining, the first system and the second system may provide services at the same time, in which case the two systems should have data consistency to avoid generating conflicts or failing to provide services. For example, data writes are performed at a first system, and data writes are also synchronized at a second system. Therefore, after the data synchronization, the consistency of the test data of the two systems is compared to see whether the test data of the two systems are the same or not, so that the two systems can normally provide services.
In operation S520, the same test procedure is performed at the first system and the second system according to the test data in the first system and the second system, respectively.
For example, according to the requirement of defect verification or regression testing, for some functions, the data with consistency of the two systems may not be able to determine whether the functions are normal, so the test data may be used as data support to perform the same test procedure for performing the functional test. For example, the login function may be used to write some account passwords in the first system and the second system as test data, perform a verification test and a login submission test in the first system and the second system based on the test data, and determine whether the login function is normal according to a test result.
FIG. 6 schematically shows a flow diagram of a test data construction method according to another embodiment of the present disclosure.
As shown in fig. 6, the test data structure of this embodiment includes operations S601 to S616, taking the example that the new system synchronizes to the old system.
In operation S601, the tester enters the data construction system and selects a module, such as a test module.
In operation S602, after the tester enters the test module, a scenario is selected, for example, from one or more test scenario options displayed by the data construction system.
In operation S603, the data construction system determines whether there is a corresponding data construction SQL according to the target scene selected by the tester. And if so, reading the SQL and sending the SQL to the new system. If not, operation S606 is performed.
In operation S604, the data structuring system pops up a prompt asking the tester whether to record a log. If so, operation S606 is performed. If not, the test is finished.
In operation S605, the new system executes the SQL statement sent by the data structuring system.
In operation S606, the tester manually performs data construction operations on the new system, such as adding, modifying, or deleting one or more accounts.
In operation S607, data is constructed in the new system, and data is generated and displayed. For example, the new system generates and executes SQL statements according to the parameters selected or input by the tester in operation S606. In some embodiments, the data may not be exposed.
In operation S608, the new system generates a log file in which the executed SQL statements are recorded.
In operation S609, the data construction system reads the log file generated by the new system. If the determination result of operation S603 is no, that is, the data structuring system does not store the corresponding target data structuring command, the step is executed.
Illustratively, the log reading across the system can be implemented at the new system by means of a data sink, such as a Java agent. The data construction system can share storage with the new system, and the data construction system can directly access the log file. The new system may send the log file to the data construction system for reading.
In operation S610, the data structuring system intercepts the data structuring SQL in the log of the new system.
In operation S611, the data construction system stores the intercepted SQL.
Illustratively, if there is no related data construction SQL, the tester operates on the page- > the new system generates the log- > the data construction system records (copies) the log generated by the new system- > the data construction system intercepts the data construction SQL- > stores SQL according to the function and the scene, and the SQL can be used when the same synchronous test data is needed next time.
In operation S612, the data synchronization system reads the log file generated by the new system. Whether the data construction system sends SQL statements to a new system for execution or a tester manually inputs the SQL statements to the new system for execution, the data synchronization system can read log files generated by the new system.
In operation S613, the data synchronization system intercepts the data structure SQL in the log of the new system.
In operation S614, the data synchronization system sends the intercepted data construction SQL to the old system.
In operation S615, the SQL statement transmitted by the data synchronization system is executed in the old system.
In operation S616, data is generated and presented. In some embodiments, no data may be presented. In other embodiments, it may be to delete data or modify data.
In operation S617, it is determined whether the new and old system data are consistent? The operation can be judged manually by a tester, and can also be executed by a judgment tool brake.
In operation S618, if the data are consistent, the test is passed.
In operation S619, if the data is inconsistent, the test fails.
Based on the test data construction method, the disclosure also provides a test data construction device for data synchronization. The apparatus will be described in detail below with reference to fig. 7 and 8.
Fig. 7 schematically shows a block diagram of a data construction system according to an embodiment of the present disclosure.
As shown in fig. 7, the test data constructing apparatus of this embodiment includes a data constructing system 700, and the data constructing system 700 includes an option presenting module 710, an option determining module 720, and an instruction transmitting module 730.
The option presenting module 710 may perform operation S110 for presenting N test scenario options in response to a test operation of a user, where N is an integer greater than or equal to 1.
According to an embodiment of the present disclosure, the option presenting module 710 may further be configured to present M functions and a corresponding relationship between each function and at least one test scenario option, where the N test scenario options include at least one test scenario option.
The option determining module 720 may perform operation S120 for determining a target option selected by the user from the N test scenario options.
The instruction sending module 730 may perform operation S130, and is configured to send the target data constructing instruction to a first system and/or a second system if the target data constructing instruction corresponding to the target option is pre-stored, where versions of the first system and the second system are different, and the first system and the second system are configured to obtain test data according to the target data constructing instruction to implement data synchronization.
According to an embodiment of the present disclosure, the data construction system 700 may further include an instruction recording module, which may perform operations S210 to S230, and operations S310 to S320, which are not described herein again.
According to the embodiment of the present disclosure, the test data constructing apparatus may further include a data synchronization system, and the system may perform operations S410 to S420, which are not described herein again.
According to the embodiment of the present disclosure, the test data constructing apparatus may further include a test module, and the test module may perform operations S510 to S520, which are not described herein.
According to the embodiment of the present disclosure, any plurality of the option presenting module 710, the option determining module 720 and the instruction sending module 730 may be combined into one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module.
According to an embodiment of the present disclosure, at least one of the option presenting module 710, the option determining module 720 and the instruction sending module 730 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of or a suitable combination of any of three implementations of software, hardware and firmware. Alternatively, at least one of the option presentation module 710, the option determination module 720 and the instruction sending module 730 may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
Fig. 8 schematically shows a block diagram of a test data construction apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the test data constructing apparatus 800 of this embodiment, the data constructing system 800 includes a data constructing system 700, a first system 810, a data synchronizing system 820, and a second system 830.
And the first system is used for receiving the target data construction instruction sent by the data construction system and executing the target data construction instruction to obtain the test data.
And the data synchronization system is used for monitoring the first log file of the first system, acquiring a target data construction instruction from the first log file, and sending the target data construction instruction to the second system.
And the second system is used for receiving the target data construction instruction sent by the data synchronization system and executing the target data construction instruction to obtain the test data. In particular, the first system and the second system may be synchronized in two directions, in other words, the first system and the second system may be converted to each other, for example, the second system receives the target data constructing command sent by the data constructing system, and the first system receives the target data constructing command sent by the data synchronizing system.
It should be noted that the implementation, solved technical problems, implemented functions, and achieved technical effects of each module/unit/subunit and the like in the apparatus part embodiment are respectively the same as or similar to the implementation, solved technical problems, implemented functions, and achieved technical effects of each corresponding step in the method part embodiment, and are not described herein again.
FIG. 9 schematically illustrates a block diagram of an electronic device suitable for implementing a test data construction method according to an embodiment of the disclosure.
As shown in fig. 9, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the program may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input section 906 including a keyboard, mouse, and the like. Including an output portion 907 such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker and the like. A storage section 908 including a hard disk and the like. And a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be embodied in the devices/apparatuses/systems described in the above embodiments. Or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 901. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, and downloaded and installed through the communication section 909 and/or installed from the removable medium 911. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 909 and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. A test data construction method for data synchronization, comprising:
responding to the test operation of a user, and displaying N test scene options, wherein N is an integer greater than or equal to 1;
determining a target option selected by the user from the N test scenario options;
and if a target data construction instruction corresponding to the target option is stored in advance, sending the target data construction instruction to a first system and/or a second system, wherein the first system and the second system are different in version, and the first system and the second system are configured to obtain test data according to the target data construction instruction so as to realize data synchronization.
2. The method of claim 1, wherein if the target data structuring instruction is not pre-stored, the method further comprises:
monitoring a first log file of the first system or a second log file of the second system in response to a logging operation by the user;
obtaining a data construction instruction from the first log file or the second log file;
storing the data construction instructions.
3. The method of claim 2, wherein the storing the data construction instructions comprises:
determining the corresponding relation between the data construction instruction and the target option;
and storing the data construction instruction based on the corresponding relation.
4. The method of claim 1, wherein the sending the target data construction instructions to a first system and/or a second system comprises sending the target data construction instructions to a first system configured to execute the target data construction instructions to obtain test data, the method further comprising: the following operations are performed using the data synchronization system,
monitoring a first log file of the first system;
acquiring the target data construction instruction from the first log file;
sending the target data construction instruction to the second system, wherein the second system is configured to execute the target data construction instruction to obtain the test data.
5. The method of claim 1, wherein the method further comprises:
comparing the test data consistency in the first system and the second system; and/or
And executing the same test flow in the first system and the second system according to the test data in the first system and the second system respectively.
6. The method of claim 1, wherein the first system and the second system have the same M functions, M being an integer greater than or equal to 1, and the presenting N test scenario options comprises:
and displaying the M functions and the corresponding relation between each function and at least one test scenario option, wherein the N test scenario options comprise the at least one test scenario option.
7. A test data construction apparatus for data synchronization, comprising a data construction system, the data construction system comprising:
the option display module is used for responding to the test operation of a user and displaying N test scene options, wherein N is an integer greater than or equal to 1;
an option determining module, configured to determine a target option selected by the user from the N test scenario options;
and the instruction sending module is used for sending the target data construction instruction to a first system and/or a second system if the target data construction instruction corresponding to the target option is stored in advance, wherein the first system and the second system are different in version, and the first system and the second system are configured to obtain test data according to the target data construction instruction so as to realize data synchronization.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the first system is used for receiving the target data construction instruction sent by the data construction system and executing the target data construction instruction to obtain test data;
the data synchronization system is used for monitoring a first log file of the first system, acquiring the target data construction instruction from the first log file and sending the target data construction instruction to the second system;
and the second system is used for receiving the target data construction instruction sent by the data synchronization system and executing the target data construction instruction to obtain test data.
9. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-6.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 6.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
CN202211075726.2A 2022-09-02 2022-09-02 Test data construction method, device, equipment and medium Pending CN115981525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211075726.2A CN115981525A (en) 2022-09-02 2022-09-02 Test data construction method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211075726.2A CN115981525A (en) 2022-09-02 2022-09-02 Test data construction method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115981525A true CN115981525A (en) 2023-04-18

Family

ID=85974642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211075726.2A Pending CN115981525A (en) 2022-09-02 2022-09-02 Test data construction method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115981525A (en)

Similar Documents

Publication Publication Date Title
US20090259993A1 (en) Sandbox Support for Metadata in Running Applications
US8311794B2 (en) Testing executable logic
CN112799940B (en) Regression testing method, regression testing device, computer system and computer readable storage medium
CN113485927A (en) Test data generation method, device, equipment and storage medium
CN106990974B (en) APP updating method and device and electronic equipment
CN114281803A (en) Data migration method, device, equipment, medium and program product
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
KR20180076020A (en) Apparatus and method for application test automation
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN115981525A (en) Test data construction method, device, equipment and medium
CN115269352A (en) Database performance determination method and device, electronic equipment and storage medium
US20160132424A1 (en) Simulating sensors
CN113360417B (en) Test method, session modifier, electronic device and medium
US20240152356A1 (en) Automated developer configuration tool
CN117931668A (en) Interface test management method, device, equipment and medium
CN113568838A (en) Test data generation method, device, equipment, storage medium and program product
CN113961468A (en) Digital certificate filling method, device, equipment, medium and program product applied to U shield test
CN114253852A (en) Automatic testing method, device, equipment and medium
CN116361159A (en) Interface regression testing method, device, electronic equipment and computer readable medium
CN118312428A (en) System test method, device, equipment, storage medium and program product
CN116701421A (en) Data restoration method, device, equipment and medium
CN116881161A (en) Software testing method, system, device and electronic equipment
CN116010513A (en) Test data processing method, device, equipment and medium
CN116243961A (en) Version file processing method and device, electronic equipment and storage medium

Legal Events

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