Test method, device and equipment based on production data playback comparison
By using a testing method based on production data playback and comparison, production data instruction sets are generated and executed, solving the problem of time-consuming and labor-intensive testing of new versions and achieving more efficient and accurate testing and quality assessment.
Patent Information
- Application Number
- CN202511365390.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-12-05
AI Technical Summary
Testing the current version of the trading system requires a lot of human resources and time, and the test data is not accurate enough and does not meet actual needs.
By acquiring production data from the same trading day, a production data instruction set is generated, and these instructions are executed on the test version and the baseline version. The execution results are compared to generate a test report.
It improves testing efficiency and accuracy, reduces human resources and time consumption, better reflects real business scenarios, and improves the efficiency and intuitiveness of quality assessment.
Smart Images

Figure CN121070801A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of data processing, and particularly relates to a test method, device and equipment based on production data playback comparison. BACKGROUND
[0002] Before a new version of a transaction system is put into operation, the functions of the new version need to be tested to determine the quality of the new version. The test data and test scenarios at the time of the current test are mainly constructed by test personnel based on experience. Usually, test personnel need to perform requirement analysis based on business documents and write test cases. Therefore, the current test method needs to consume a large amount of human resources and time, and the test data is not accurate and does not meet actual requirements. SUMMARY
[0003] The present application provides a test method, device and equipment based on production data playback comparison, to improve the evaluation efficiency of the quality of a new version put into operation, restore real business scenarios, improve test accuracy, and reduce the consumption of human resources and time during testing.
[0004] The present application provides a test method based on production data playback comparison, comprising: obtaining a plurality of production data, the plurality of production data belonging to the same transaction day; generating a production data instruction set according to the plurality of production data, the production data instruction set comprising a plurality of production data instructions, the plurality of production data instructions being sorted based on a business script, the business script being used to indicate a business execution order of the plurality of production data instructions; respectively executing the production data instructions in the production data instruction set on a test version and a baseline version to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, the test version being an improved version of the baseline version; generating a test report of the test version according to the first execution result and the second execution result.
[0005] According to the test method based on production data playback comparison provided by the present application, before the production data instruction set is generated according to the plurality of production data, the method further comprises: determining a target business label corresponding to a target task, the business label being used to indicate an actual transaction situation; obtaining a reference business label of the plurality of production data; obtaining target production data from the plurality of production data according to the target business label and the reference business label; obtaining target production data instructions associated with the target task in the production data instruction set; and sorting the target production data instructions corresponding to the target production data according to the target task to obtain a business script corresponding to the target task.
[0006] According to the test method based on production data playback comparison provided in the application, the target production data instruction corresponding to the target production data is sorted according to the target task, which comprises: determining a first business scene to which the target task belongs; determining a business rule of the first business scene, the business rule being used to indicate a priority of the target business label; and sorting the target production data instruction according to the business rule and the target business label to obtain a business script corresponding to the target task.
[0007] According to the test method based on production data playback comparison provided in the application, the reference business label of the plurality of production data is obtained, which comprises: determining a second business scene to which each production data belongs; determining a label constraint dimension corresponding to the second business scene, the label constraint dimension indicating at least one data type; determining a data value of each production data in the label constraint dimension; and obtaining the reference business label of each production data according to the data value.
[0008] According to the test method based on production data playback comparison provided in the application, the production data instruction in the production data instruction set is executed on the test version and the baseline version respectively, which comprises: executing the following operations on the test version and the baseline version respectively: executing a current production data instruction; determining whether an execution result of the current production data instruction is obtained; if the execution result is obtained, determining that a next production data instruction of the current production data instruction in the production data instruction set is the current production data instruction; and repeating the above steps until the current production data instruction is the last production data instruction in the production data instruction set.
[0009] According to the test method based on production data playback comparison provided in the application, before the production data instruction set is generated according to the plurality of production data, the plurality of production data is subjected to data cleaning to obtain a plurality of reference production data; the plurality of reference production data is identified according to a data format of the plurality of reference production data to obtain an identification result; and the plurality of reference production data is parsed according to the identification result to obtain a plurality of production data instructions.
[0010] According to the test method based on production data playback comparison provided in the application, the test report of the test version is generated according to the first execution result and the second execution result, which comprises: obtaining request information, response information and return conditions of the first execution result and the second execution result respectively; comparing the request information, the response information and the return conditions of the first execution result and the second execution result respectively to obtain a comparison result; and generating the test report of the test version according to the comparison result.
[0011] The application further provides a testing device based on production data playback comparison, comprising: An acquisition unit is configured to acquire a plurality of production data, which belong to a same transaction day. A first generation unit is configured to generate a production data instruction set according to the plurality of production data, wherein the production data instruction set comprises a plurality of production data instructions, and the plurality of production data instructions are arranged based on a business script, which is used to indicate a business execution sequence of the plurality of production data instructions. An execution unit is configured to execute the production data instructions in the production data instruction set on a test version and a baseline version respectively, to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, wherein the test version is an improved version of the baseline version. A second generation unit is configured to generate a test report of the test version according to the first execution result and the second execution result.
[0012] The application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above testing methods based on production data playback comparison when executing the computer program.
[0013] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement any one of the above testing methods based on production data playback comparison.
[0014] The application further provides a computer program product, comprising a computer program, wherein the computer program is executable on a processor to implement any one of the above testing methods based on production data playback comparison.
[0015] The application provides a testing method, device and equipment based on production data playback comparison, which acquires a plurality of production data belonging to a same transaction day, obtains a production data instruction set comprising a plurality of production data instructions based on a business execution sequence in a business script, executes the production data instructions in the production data instruction set on a test version and a baseline version respectively, obtains a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, wherein the test version is an improved version of the baseline version, and finally generates a test report of the test version according to the first execution result and the second execution result.
[0016] In this way, the test can be performed based on actual production data, i.e., without test personnel constructing test data, and the test data can be close to actual user requirements. Moreover, the test is performed on the test version and the baseline version based on the production data, and the function running of the test version can be directly determined by comparing the first execution result and the second execution result. The test efficiency when testing the newly online version is improved, the real business scenario can be restored during the test, and the test accuracy is improved. Moreover, the consumption of human resources and time during the test is reduced. The quality evaluation is directly performed based on the execution result, and the quality evaluation efficiency and intuitiveness of the test version are improved. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0018] Figure 1 is a flowchart of a test method based on production data playback comparison provided by the present application.
[0019] Figure 2 is a system business flowchart provided by the present application.
[0020] Figure 3 is a structural diagram of a test device based on production data playback comparison provided by the present application.
[0021] Figure 4 is a structural diagram of an electronic device provided by the present application. DETAILED DESCRIPTION
[0022] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely in combination with the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the protection scope of the present application.
[0023] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0024] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0025] Current testing methods require a significant amount of human resources and time, and the test data is constructed by the testing personnel, which is not accurate enough or in line with actual needs.
[0026] To address the aforementioned issues, this application provides a testing method, apparatus, and equipment based on production data playback and comparison. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0027] Please see Figure 1 , Figure 1 This is a flowchart illustrating a testing method based on production data playback comparison provided in this application. The testing method based on production data playback comparison includes the following steps.
[0028] S101, acquire multiple production data.
[0029] The multiple production data points belong to the same trading day. These production data points can include network traffic, bypass logs, production flow data, and database data. Examples include user behavior data such as transaction actions or system operations, and exchange transaction behavior data. In practice, high-performance network traffic data collection technologies such as bypass traffic no-code hardware probes and agent software probes can be used for data collection. Furthermore, technologies such as large page memory, SIMD vectorization processing, and zero-copy data can be employed to further reduce CPU load, optimize memory management, and improve data collection performance while achieving production data collection.
[0030] S102, Generate a production data instruction set based on the plurality of production data.
[0031] The production data instruction set includes a plurality of production data instructions, and each production data instruction indicates a transaction behavior that actually occurs once. One production data instruction can also correspond to one production data and the data environment of the production data.
[0032] In specific implementation, the plurality of production data instructions are sorted based on a business script. The business script is used to indicate a business execution order of the plurality of production data instructions. Each production data instruction set can be associated with one business script, or each production data instruction set can be associated with a plurality of business scripts. In this case, the production data instruction set includes a plurality of production data instruction subsets, and each production data instruction subset is associated with one business script. Each business script can correspond to one target task. When generating the business script of the target task, the business scenario corresponding to the target task can be determined first, the basic business script corresponding to the business scenario is obtained, and then the business script of the target task is generated based on the target task and the basic business script.
[0033] In S103, the production data instructions in the production data instruction set are executed on the test version and the baseline version respectively, to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version.
[0034] The test version is an improved version of the baseline version. When there are a plurality of target tasks, the plurality of business scripts can be executed in parallel, that is, the target tasks are executed in multiple channels.
[0035] In S104, a test report of the test version is generated according to the first execution result and the second execution result.
[0036] The first execution result and the second execution result of each target task are compared to obtain a comparison result of the target task. When a plurality of target tasks are executed, the quality of the test version is evaluated based on the comparison result of each target task.
[0037] It can be seen that in the embodiment, the test can be performed based on actual production data, that is, test personnel do not need to construct test data, and the test data can be close to actual user demand. The test data is also executed on the test version and the baseline version based on the production data, and the function running situation of the test version can be directly determined through comparison of the first execution result and the second execution result. The test efficiency when testing the newly online version is improved, the test content is closer to actual demand, and the test accuracy is improved. Moreover, the consumption of human resources and time during the test can be reduced. The quality evaluation efficiency and intuitiveness of the test version are improved through direct quality evaluation based on the execution result.
[0038] In a possible embodiment, before the generating the production data instruction set according to the plurality of production data, the method further includes: determining a target business label corresponding to the target task, the business label being used to indicate an actual transaction condition; obtaining a reference business label of the plurality of production data; obtaining target production data from the plurality of production data according to the target business label and the reference business label; obtaining target production data instructions associated with the target task in the production data instruction set; and sorting the target production data instructions corresponding to the target production data according to the target task, to obtain a business script corresponding to the target task.
[0039] In one business script, a plurality of production data instructions can be included, and the plurality of production data instructions are sorted based on business labels. Each production data instruction corresponds to production data, and the business label of the production data is the business label corresponding to the target production data instruction. The business label of one production data can indicate an actual transaction condition in different dimensions, for example, the business label includes a timestamp indicating a transaction time, a customer number, and content indicating the authority of a customer.
[0040] In a specific implementation, when the target production data instruction is determined from the plurality of production data instructions, the target production data instruction can be selected by using an inverted index algorithm based on the business label of each production data instruction. That is, the target business label can be determined based on the target task and a business scenario corresponding to the target task, and then the target production data instruction that matches the target business label and the business label of each production data instruction can be selected.
[0041] As can be seen, in this embodiment, the target production data instruction is sorted based on the business label, the business script can be quickly generated, and the test efficiency is improved.
[0042] In a possible embodiment, the sorting the target production data instructions corresponding to the target production data according to the target task includes: determining a first business scenario to which the target task belongs; determining a business rule of the first business scenario, the business rule being used to indicate a priority of the business label; and sorting the target production data instructions according to the target business rule and the target business label, to obtain the business script corresponding to the target task.
[0043] In this embodiment, when the target production data instruction is sorted based on the business label, the business scenario can be determined based on the target task first, and different business scenarios correspond to different business rules. The business label can be sorted based on the business rule of the business scenario corresponding to the target task. The higher the priority of the business label indicated by the business rule, the earlier the execution order of the target production data instruction corresponding to the business label.
[0044] It can be seen that in the embodiment, the priority of the business tag is determined based on the business rule, and then the target production data instruction is sorted based on the business tag, so as to guarantee the consistency and rationality of task execution.
[0045] In one possible embodiment, the acquiring the reference business tag of the plurality of production data comprises: determining a second business scenario to which each production data belongs; determining a tag constraint dimension corresponding to the second business scenario, the tag constraint dimension indicating at least one data type; determining a data value of the each production data in the tag constraint dimension; and acquiring the reference business tag of the each production data according to the data value.
[0046] In the generation of the business tag of the production data, the tag constraint dimensions corresponding to different business scenarios can be different, for example, the tag constraint dimensions corresponding to the securities business and the ordinary transaction business are different. The tag constraint dimension indicates different data types, that is, the time dimension, the customer number dimension, and the fund account number dimension, etc. One business scenario can correspond to multiple tag constraint dimensions, that is, the business tag of the production data associated in the business scenario can be generated by the data content of multiple tag constraint dimensions.
[0047] In the specific implementation, when the business scenario to which the production data instruction belongs is determined, the production data can be classified by clustering analysis on the production data based on the K-means clustering algorithm, so as to determine the business scenario category to which the production data belongs.
[0048] It can be seen that in the embodiment, the corresponding tag constraint dimension is determined based on the business scenario, and then the business tag corresponding to the production data is determined based on the tag constraint dimension, so that the business tag conforms to the actual application scenario, and the completion degree of task execution is guaranteed.
[0049] In one possible embodiment, the executing the production data instructions in the production data instruction set on the test version and the baseline version respectively comprises: executing the following operations on the test version and the baseline version respectively: executing a current production data instruction; determining whether an execution result of the current production data instruction is acquired; if the execution result is acquired, determining that a next production data instruction of the current production data instruction in the production data instruction set is the current production data instruction; and repeating the above steps until the current production data instruction is the last production data instruction in the production data instruction set.
[0050] Wherein, in the order execution of the production data instruction in the production data instruction set, the target task corresponding to the multiple task scripts can be executed in parallel. For a task script corresponding to a production data instruction, the execution order of the production data instruction in the task script is sequentially performed. When the next production data instruction is triggered, it is necessary to determine that the execution result of the previous production data instruction has been returned. That is, in the execution, it is necessary to dynamically verify the production data instruction. That is, after executing a production data instruction, the execution of the production data instruction needs to be monitored, and then based on the monitoring result, it is determined whether the production data instruction is executed, It can be seen that, in the embodiment, before triggering the next production data instruction, it is necessary to ensure that the previous production data instruction returns the execution result before triggering the next production data instruction, which can ensure the execution order and accurately restore the production situation.
[0051] In one possible embodiment, before the production data instruction set is generated according to the multiple production data, the multiple production data are cleaned to obtain multiple reference production data; the multiple reference production data are identified according to the data format of the multiple reference production data to obtain an identification result; and the multiple reference production data are parsed according to the identification result to obtain multiple production data instructions.
[0052] Wherein, after obtaining the multiple production data, the principal component analysis (PCA) dimension reduction algorithm can be used to clean the obtained production data, and eliminate invalid data and redundant dimensions in the production data. Then the production data such as bypass log, database data and production flow report are identified and parsed. The format of different types of production data is identified, and parsed into production data instructions to obtain the production data instruction set.
[0053] It can be seen that, in the embodiment, the production data instruction is automatically generated based on the production data, which can fully utilize the existing production data for testing, reduce the investment of human resources, and improve the testing efficiency.
[0054] In one possible embodiment, the request information, response information and return condition of the first execution result and the second execution result are respectively obtained; the request information, response information and return condition of the first execution result and the second execution result are respectively compared to obtain a comparison result; and a test report of the test version is generated according to the comparison result.
[0055] Wherein, each target task is synchronously executed on the test version and the baseline version, and after one target task is executed, a one-to-one comparison is performed based on the request information, response information and return condition obtained from the test version and the baseline version, and then a test report is generated based on the comparison results of all target tasks, which can include the evaluation content of the quality of the test version. In a specific implementation, an intelligent analysis and diagnosis model can be constructed, and the model is used to analyze the first execution result and the second execution, output the fault content and fault type of the test version, and obtain the quality evaluation result.
[0056] It can be seen that in the embodiment, the test report is generated in sequence by comparing the logs of the test version and the baseline version, which can make the quality evaluation more intuitive and convenient.
[0057] Please refer to Figure 2 , the business implementation process of the present application is described in detail.
[0058] First, the user inputs the account and password on the login page, jumps to the welcome page, and then enters the management page from the welcome page. The system will collect network traffic, database data, bypass logs and production data such as generated water before the welcome page. Based on the production data, the production data instruction is obtained, and multiple business scripts are constructed based on the production data instruction, and then the business scripts are configured, that is, the execution order of the production data instruction in the business script under different tasks and business scenarios is determined. Then the user executes the configuration of the business script through the management page, and synchronously saves the configuration information. Then the business script detail page produces an execution task at the execution end, and executes the task. When executing the task, the target production data instruction is retrieved through the rule set inverted index algorithm, and then the target production data instruction is executed, and the execution of each target production data instruction is monitored. Based on the execution result of the previous production data instruction, the production timing verification is performed to ensure that the execution result of the previous transaction execution is obtained before triggering the next production data instruction. At the same time, based on the execution of multiple business scripts, the execution is summarized, the test report is generated based on the detailed execution, and the test report is intelligently analyzed to determine the quality of the test version.
[0059] The production data playback comparison-based test device provided by the present application is described below. The production data playback comparison-based test device described below corresponds to the production data playback comparison-based test method described above.
[0060] Please refer to Figure 3 , Figure 3is a structural schematic diagram of a test device based on production data playback comparison provided by the present application. The test device based on production data playback comparison 300 comprises an acquisition unit 301 configured to acquire a plurality of production data, the plurality of production data belonging to the same trading day; a first generation unit 302 configured to generate a production data instruction set according to the plurality of production data, the production data instruction set comprising a plurality of production data instructions, the plurality of production data instructions being sorted based on a business script, the business script being used to indicate a business execution order of the plurality of production data instructions; an execution unit 303 configured to execute the production data instructions in the production data instruction set on a test version and a baseline version respectively, to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, the test version being an improved version of the baseline version; and a second generation unit 304 configured to generate a test report of the test version according to the first execution result and the second execution result.
[0061] In one possible embodiment, before the production data instruction set is generated according to the plurality of production data, the first generation unit 302 is specifically configured to: determine a target business label corresponding to a target task, the business label being used to indicate an actual transaction situation; acquire a reference business label of the plurality of production data; acquire target production data from the plurality of production data according to the target business label and the reference business label; acquire a target production data instruction associated with the target task in the production data instruction set; and sort the target production data instruction corresponding to the target production data according to the target task, to obtain a business script corresponding to the target task.
[0062] In one possible embodiment, in the aspect of sorting the target production data instruction corresponding to the target production data according to the target task, the first generation unit 302 is specifically configured to: determine a first business scene to which the target task belongs; determine a business rule of the first business scene, the business rule being used to indicate a priority of the target business label; and sort the target production data instruction according to the business rule and the target business label, to obtain a business script corresponding to the target task.
[0063] In one possible embodiment, in the aspect of acquiring the reference business label of the plurality of production data, the acquisition unit 301 is specifically configured to: determine a second business scene to which each production data belongs; determine a label constraint dimension corresponding to the second business scene, the label constraint dimension indicating at least one data type; determine a data value of the each production data in the label constraint dimension; and acquire a reference business label of the each production data according to the data value.
[0064] In a possible implementation, in the execution of the production data instructions in the production data instruction set on the test version and the baseline version respectively, the execution unit 303 is specifically configured to: execute the following operations on the test version and the baseline version respectively: execute a current production data instruction; determine whether an execution result of the current production data instruction is obtained; if the execution result is obtained, determine that a next production data instruction of the current production data instruction in the production data instruction set is the current production data instruction; and repeat the above steps until the current production data instruction is the last production data instruction in the production data instruction set.
[0065] In a possible implementation, before the production data instruction set is generated according to the plurality of production data, the first generation unit 302 is specifically configured to: perform data cleaning on the plurality of production data to obtain a plurality of reference production data; identify the plurality of reference production data according to a data format of the plurality of reference production data to obtain an identification result; and parse the plurality of reference production data according to the identification result to obtain a plurality of production data instructions.
[0066] In a possible implementation, in the generation of the test report of the test version according to the first execution result and the second execution result, the second generation unit 304 is specifically configured to: obtain request information, response information and a return condition of the first execution result and the second execution result respectively; compare the request information, the response information and the return condition of the first execution result and the second execution result respectively to obtain a comparison result; and generate the test report of the test version according to the comparison result.
[0067] Please refer to Figure 4 , Figure 4 is a structural schematic diagram of an electronic device provided in the present application. As shown in Figure 4As shown, the electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 complete mutual communication through the communications bus 440. The processor 410 can invoke a logical instruction in the memory 430 to execute a test method based on production data playback comparison, the method including: obtaining a plurality of production data, the plurality of production data belonging to the same trading day; generating a production data instruction set according to the plurality of production data, the production data instruction set including a plurality of production data instructions, the plurality of production data instructions being sorted based on a business script, the business script being used to indicate a business execution order of the plurality of production data instructions; respectively executing the production data instructions in the production data instruction set on a test version and a baseline version to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, the test version being an improved version of the baseline version; and generating a test report of the test version according to the first execution result and the second execution result.
[0068] In addition, the logical instruction in the memory 430 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or in part with respect to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0069] In another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a test method based on production data playback comparison provided by the above method, the method comprising: obtaining a plurality of production data, the plurality of production data belonging to a same trading day; generating a production data instruction set according to the plurality of production data, the production data instruction set comprising a plurality of production data instructions, the plurality of production data instructions being sorted based on a business script, the business script being used to indicate a business execution order of the plurality of production data instructions; executing the production data instructions in the production data instruction set on a test version and a baseline version respectively to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, the test version being an improved version of the baseline version; and generating a test report of the test version according to the first execution result and the second execution result.
[0070] In yet another aspect, the present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements any of the above test methods based on production data playback comparison, the method comprising: obtaining a plurality of production data, the plurality of production data belonging to a same trading day; generating a production data instruction set according to the plurality of production data, the production data instruction set comprising a plurality of production data instructions, the plurality of production data instructions being sorted based on a business script, the business script being used to indicate a business execution order of the plurality of production data instructions; executing the production data instructions in the production data instruction set on a test version and a baseline version respectively to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, the test version being an improved version of the baseline version; and generating a test report of the test version according to the first execution result and the second execution result.
[0071] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0072] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0073] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A test method based on production data playback comparison, characterized in that, The method comprises the following steps: acquiring a plurality of production data, the plurality of production data belonging to the same trading day; generating a production data instruction set according to the plurality of production data, the production data instruction set comprising a plurality of production data instructions, the plurality of production data instructions being arranged based on a business script, the business script being used to indicate a business execution order of the plurality of production data instructions; respectively executing the production data instructions in the production data instruction set on a test version and a baseline version to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, the test version being an improved version of the baseline version; generating a test report of the test version according to the first execution result and the second execution result.
2. The method of claim 1, wherein, Before the step of generating the production data instruction set according to the plurality of production data, the method further comprises the following steps: determining a target business label corresponding to a target task, the business label being used to indicate an actual transaction situation; acquiring a reference business label of the plurality of production data; acquiring target production data from the plurality of production data according to the target business label and the reference business label; acquiring target production data instructions associated with the target task from the production data instruction set; arranging the target production data instructions corresponding to the target production data according to the target task to obtain a business script corresponding to the target task.
3. The method of claim 2, wherein, The step of arranging the target production data instructions corresponding to the target production data according to the target task comprises the following steps: determining a first business scene to which the target task belongs; determining a business rule of the first business scene, the business rule being used to indicate a priority of the target business label; arranging the target production data instructions according to the business rule and the target business label to obtain a business script corresponding to the target task.
4. The method of claim 2, wherein, The step of acquiring the reference business label of the plurality of production data comprises the following steps: determining a second business scene to which each production data belongs; determining a label constraint dimension corresponding to the second business scene, the label constraint dimension indicating at least one data type; determining a data value of each production data in the label constraint dimension; acquiring a reference business label of each production data according to the data value.
5. The method of claim 1, wherein, The step of respectively executing the production data instructions in the production data instruction set on the test version and the baseline version comprises the following steps: respectively executing the following operations on the test version and the baseline version: executing a current production data instruction; determining whether an execution result of the current production data instruction is acquired; if the execution result is acquired, determining that a next production data instruction of the current production data instruction in the production data instruction set is the current production data instruction; repeating the above steps until the current production data instruction is the last production data instruction in the production data instruction set.
6. The method of claim 1, wherein, Before the step of generating the production data instruction set according to the plurality of production data, the method comprises the following steps: performing data cleaning on the plurality of production data to obtain a plurality of reference production data; performing identification on the plurality of reference production data according to a data format of the plurality of reference production data to obtain an identification result; According to the identification result, the plurality of reference production data are parsed to obtain a plurality of production data instructions.
7. The method according to any one of claims 1 to 6, characterized in that, The test report of the test version is generated according to the first execution result and the second execution result, and the test report includes: Request information, response information and return conditions of the first execution result and the second execution result are obtained respectively; The request information, the response information and the return conditions of the first execution result and the second execution result are compared respectively to obtain a comparison result; The test report of the test version is generated according to the comparison result.
8. A test apparatus based on production data playback comparison, characterized by, It includes: An acquisition unit is configured to acquire a plurality of production data, wherein the plurality of production data belong to the same trading day; A first generation unit is configured to generate a production data instruction set according to the plurality of production data, wherein the production data instruction set includes a plurality of production data instructions, the plurality of production data instructions are sorted based on a business script, and the business script is used to indicate a business execution order of the plurality of production data instructions; An execution unit is configured to execute the production data instructions in the production data instruction set on a test version and a baseline version respectively to obtain a first execution result corresponding to the test version and a second execution result corresponding to the baseline version, wherein the test version is an improved version of the baseline version; A second unit is configured to generate a test report of the test version according to the first execution result and the second execution result.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the test method based on production data playback comparison according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the test method based on production data playback comparison according to any one of claims 1 to 7.