Automated data comparison test method, device, electronic device and storage medium

Through the automated data comparison and testing method, the first full indicator in the project information is compared with the second full indicator in the shadow library, which solves the problem of low testing efficiency and accuracy when the Internet product version is updated, and the automation is achieved throughout the entire version Data quality and efficient testing of the process.

CN114461532BActive Publication Date: 2024-11-26CHINA PING AN LIFE INSURANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210139775.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-11-26
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

When the existing technology is updated with the Internet product project version, the testing efficiency and accuracy are low, and when the new indicators fail, all indicators need to be retested, resulting in inefficiency.

Method used

Through the automated data comparison and testing method, the first full indicator in the project information is used to compare data with the second full indicator in the preset shadow library, which runs through the entire version process to avoid rebuilding the platform and improve testing efficiency and accuracy.

Benefits of technology

It realizes automated data comparison and testing throughout the entire process of the version, ensures the data quality of each process stage, improves testing efficiency and accuracy, and avoids the problem of retesting the full indicators caused by new indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461532B_ABST
    Figure CN114461532B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and provides an automated data comparison test method, device, electronic device and storage medium, the method comprising: when the project stage of the project to be tested is the platform building stage, building a data automation test platform and verifying the new indicators in the project information; when the verification result passes, performing data comparison on the first full indicator in the project information and the second full indicator of the project to be tested; when the first comparison result passes, comparing the first test result within a preset time period before going online with the second test result within the same preset time period after going online; when the second comparison result passes, determining that the automated test passes. The present invention improves the efficiency of data comparison testing by performing data comparison on the first full indicator in the project information and the second full indicator in a preset shadow library corresponding to the project to be tested, and performing testing throughout the entire version process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an automated data comparison test method, device, electronic equipment and storage medium. Background Art

[0002] During the project testing process, with the gradual implementation and promotion of various agile solutions, project version updates of Internet products are becoming more and more frequent, and each updated version requires retesting the data quality of the version.

[0003] However, the prior art generally retests all indicators of the updated version without distinguishing between new and old indicators and verifying the new indicators separately. This may result in the new indicators failing and all indicators needing to be retested, resulting in low testing efficiency and accuracy.

[0004] Therefore, it is necessary to propose a method that can quickly and accurately perform data comparison testing. Summary of the invention

[0005] In view of the above content, it is necessary to propose an automated data comparison test method, device, electronic device and storage medium, which compares the first full indicator in the project information with the second full indicator in the preset shadow library corresponding to the project to be tested, and performs testing throughout the entire version process, thereby improving the efficiency of data comparison testing.

[0006] A first aspect of the present invention provides an automated data comparison test method, the method comprising:

[0007] Parse the received data comparison test request and obtain the project information and project identification of the project to be tested;

[0008] Identifying the project phase of the project to be tested based on the project identifier;

[0009] When the project stage of the project to be tested is the platform building stage of the project development stage, building a data automation test platform for the project to be tested based on the project information;

[0010] Verifying the new indicator in the project information on the data automation testing platform to obtain a verification result;

[0011] When the verification result is that the verification is passed, a data comparison is performed on the first full quantity indicator in the project information and the second full quantity indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result;

[0012] When the first comparison result is that the test passes, the item to be tested is put online, and the first test result within a preset time period before the online is compared with the second test result within the same preset time period after the online is compared to obtain a second comparison result;

[0013] When the second comparison result is that the test passes, it is determined that the automated test of the item to be tested passes.

[0014] Optionally, building a data automation testing platform for the project to be tested based on the project information includes:

[0015] Acquire an interface automation module based on interface information corresponding to the project information;

[0016] Creating a query module based on data query information corresponding to the project information;

[0017] Creating an index data comparison module based on the index data corresponding to the project information;

[0018] Creating an environment dynamic module based on dynamic management and switching information of background environment information and database environment information in the business test process corresponding to the project information;

[0019] Creating a continuous batch construction module based on the construction conditions of the batch data comparison task corresponding to the project information;

[0020] Creating a comparison result analysis module based on the test conditions corresponding to the project information;

[0021] A data automation testing platform is built based on the interface automation module, query module, index data comparison module, environment dynamic module, continuous batch construction module and comparison result analysis module to obtain a data automation testing platform corresponding to the project to be tested.

[0022] Optionally, the verifying the new indicator in the project information on the data automation testing platform to obtain the verification result includes:

[0023] Obtain all project indicators in the project information;

[0024] According to the project indicators pre-stored in the database, traverse each project indicator in all the project indicators in the project information;

[0025] Extracting untraversed project indicators from all the project indicators, and determining the untraversed project indicators as new indicators in the project information;

[0026] The new indicator is verified on the data automation testing platform to obtain a verification result.

[0027] Optionally, performing data comparison on the first full indicator in the project information and the second full indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result includes:

[0028] Parsing the project information to obtain a first full quantity indicator;

[0029] Determine a database identifier based on the project identifier of the project to be tested;

[0030] Acquire a corresponding preset shadow library based on the database identifier, and acquire a second full quantity indicator from the preset shadow library;

[0031] comparing the first full quantity indicator with the second full quantity indicator;

[0032] When the first full quantity indicator is completely consistent with the second full quantity indicator, determining that the first comparison result is verified to be passed; or

[0033] When the first full quantity indicator is not completely consistent with the second full quantity indicator, it is determined that the first comparison result is verification failure.

[0034] Optionally, the performing of going online on the item to be tested, comparing a first test result within a preset time period before going online with a second test result within the same preset time period after going online, and obtaining a second comparison result includes:

[0035] Saving the first test result within a preset time period before going online as a first picture;

[0036] Saving the second test result within the same preset time period after going online as a second picture;

[0037] comparing the first picture with the second picture;

[0038] When the first image is completely consistent with the second image, determining that the second comparison result is a test pass; or

[0039] When the first picture is not completely consistent with the second picture, it is determined that the second comparison result is a test failure.

[0040] Optionally, the identifying the project stage of the project to be tested based on the project identifier includes:

[0041] Identify the first version number of the project identifier, and match the first version number of the project identifier with the second version number in the project information of the project to be tested to obtain a matching result;

[0042] The project phase of the project to be tested is determined according to the matching result.

[0043] Optionally, the method further comprises:

[0044] When the project stage of the project to be tested is the project maintenance stage of the project development stage, obtaining an automated testing platform corresponding to a previous version of the current version based on the project maintenance stage of the project to be tested;

[0045] The automated testing platform corresponding to the previous version is updated based on the project information to obtain the automated testing platform of the current version.

[0046] A second aspect of the present invention provides an automated data comparison test device, the device comprising:

[0047] An acquisition module is used to parse the received data comparison test request and obtain the project information and project identification of the project to be tested;

[0048] An identification module, used for identifying the project phase of the project to be tested based on the project identifier;

[0049] A building module, used for building a data automation test platform for the project to be tested based on the project information when the project stage of the project to be tested is the platform building stage of the project development stage;

[0050] A verification module, used to verify the new indicator in the project information on the data automation testing platform to obtain a verification result;

[0051] A first comparison module is used to compare the first full quantity indicator in the project information with the second full quantity indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result when the verification result is verification passed;

[0052] A second comparison module is used to, when the first comparison result is that the test passes, execute the online operation of the item to be tested, and compare the first test result within a preset time period before the online operation with the second test result within the same preset time period after the online operation to obtain a second comparison result;

[0053] The determination module is used to determine that the automated test of the item to be tested has passed when the second comparison result is that the test has passed.

[0054] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement the automated data comparison test method when executing a computer program stored in the memory.

[0055] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the automated data comparison test method when executed by a processor.

[0056] In summary, the automated data comparison test method, device, electronic device and storage medium of the present invention, by identifying the project stage of the project to be tested based on the project identifier, avoids the phenomenon of rebuilding the platform when the project is a developed project, and improves the efficiency of subsequent testing. When the project stage of the project to be tested is the platform building stage of the project development stage, a data automation test platform is built for the project to be tested, which can meet the needs of multi-environment real-time switching and multi-version parallel development in the test process with the help of environment management and continuous construction capabilities. The new indicators in the project information are verified on the data automation test platform, and subsequent full-quantity indicator tests are performed after ensuring that the new indicators are accurate, thereby improving the test efficiency and accuracy. When the verification result is that the verification is passed, the first full-quantity indicator in the project information is compared with the second full-quantity indicator. When the first comparison result is that the test is passed, the first test result within the preset time period before going online is compared with the second test result within the same preset time period after going online, realizing automation throughout the entire version process, ensuring the data quality of each process stage, and improving the efficiency of data comparison testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a flow chart of the automated data comparison test method provided in Example 1 of the present invention.

[0058] Figure 2 It is a structural diagram of an automated data comparison test device provided in Embodiment 2 of the present invention.

[0059] Figure 3 It is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0060] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0062] Embodiment 1

[0063] Figure 1 It is a flow chart of the automated data comparison test method provided in Example 1 of the present invention.

[0064] In this embodiment, the automated data comparison test method can be applied to electronic devices. For electronic devices that need to perform automated data comparison testing, the automated data comparison test function provided by the method of the present invention can be directly integrated into the electronic device, or run in the electronic device in the form of a software development kit (SDK).

[0065] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0066] The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, as well as machine learning and deep learning.

[0067] like Figure 1 As shown, the automated data comparison test method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0068] S11, parsing the received data comparison test request, and obtaining the project information and project identification of the project to be tested.

[0069] In this embodiment, when performing a data comparison test, the user initiates a data comparison test request to the server through the client. Specifically, the client can be a smart phone, IPAD or other existing smart devices, and the server can be a data comparison test subsystem. During the data comparison test, the client can send a data comparison test request to the data comparison test subsystem, and the data comparison test subsystem is used to receive the data comparison test sent by the client.

[0070] In this embodiment, when the server receives a data comparison test, it parses the data comparison test request and obtains the project information and project identifier of the project to be tested, wherein the project information includes the version number and milestone identifier of the project to be tested, and the project identifier is used to uniquely determine the business project corresponding to the project to be tested. For example, the business project may be a financial insurance project, a financial management project, or other projects, and the milestone identifier refers to the project stage identifier corresponding to each stage of the entire project.

[0071] S12: Identify the project phase of the project to be tested based on the project identifier.

[0072] In this embodiment, the project stages may include: project requirements stage, project development stage, project function testing stage, project regression stage, project online stage and other project stages, wherein whether the project is in the project development stage can be determined according to the version number of the project to be tested, and whether the project to be tested is in the project requirements stage, project function testing stage, project regression stage, project online stage and other project stages can be determined according to the milestone identification of the project to be tested, and the project development stage includes: platform building stage and platform maintenance stage.

[0073] In an optional embodiment, the identifying the project stage of the project to be tested based on the project identifier includes:

[0074] Identify the first version number of the project identifier, and match the first version number of the project identifier with the second version number in the project information of the project to be tested to obtain a matching result;

[0075] The project phase of the project to be tested is determined according to the matching result.

[0076] In this embodiment, the first version number refers to the business project version number corresponding to the project identifier, and the business project version number refers to the version number determined when the project is created; the second version number refers to the project version number of the project to be tested that is continuously updated during the project execution process. If the business project has not been developed, the second version number is empty.

[0077] In this embodiment, when the first version number corresponding to the project identifier matches the second version number in the project information of the project to be tested, the returned matching result is not empty, which means the project to be tested corresponding to the project identifier has been developed; when the first version number corresponding to the project identifier does not match the second version number in the project information of the project to be tested, the returned matching result is empty, which means the project to be tested corresponding to the project identifier is a newly developed project and needs to build a platform, and the corresponding project stage is determined to be the platform building stage.

[0078] Further, determining the project stage of the project to be tested according to the matching result includes:

[0079] When the matching result is empty, determining that the project stage of the project to be tested is the platform building stage of the project development stage; or

[0080] When the matching result is not empty, it is determined that the project phase of the project to be tested is a project maintenance phase of the project development phase.

[0081] Furthermore, the method further comprises:

[0082] When the project stage of the project to be tested is the project maintenance stage of the project development stage, obtaining an automated testing platform corresponding to a previous version of the current version based on the project maintenance stage of the project to be tested;

[0083] The automated testing platform corresponding to the previous version is updated based on the project information to obtain the automated testing platform of the current version.

[0084] In this embodiment, by determining the project stage of the project to be tested based on the project identifier, the phenomenon of rebuilding the platform when the project is a developed project is avoided, thereby improving the efficiency of subsequent testing.

[0085] S13, when the project stage of the project to be tested is the platform building stage of the project development stage, building a data automation test platform for the project to be tested based on the project information.

[0086] In this embodiment, the project information includes interface configuration information, data query information, data storage information, project rule information of the project to be tested, index information, test environment information, task information, comparison condition information and other information used to build a data automation testing platform.

[0087] In an optional embodiment, building a data automation test platform for the project to be tested based on the project information includes:

[0088] Acquire an interface automation module based on interface information corresponding to the project information;

[0089] Creating a query module based on data query information corresponding to the project information;

[0090] Creating an index data comparison module based on the index data corresponding to the project information;

[0091] Creating an environment dynamic module based on dynamic management and switching information of background environment information and database environment information in the business test process corresponding to the project information;

[0092] Creating a continuous batch construction module based on the construction conditions of the batch data comparison task corresponding to the project information;

[0093] Creating a comparison result analysis module based on the test conditions corresponding to the project information;

[0094] A data automation testing platform is built based on the interface automation module, query module, index data comparison module, environment dynamic module, continuous batch construction module and comparison result analysis module to obtain a data automation testing platform corresponding to the project to be tested.

[0095] In this embodiment, the interface information includes visualization interface configuration information of the background interface, and the interface automation module can be obtained according to the interface information; the data query information refers to the data storage model and business rules created based on the project to be tested, wherein the data storage model is used to store all information in the project to be tested, and the data storage model can be provided by the developer; the business rules refer to the rules pre-set for the business needs of the project to be tested, and the business rules can be provided by the developer; the index data comparison module is created based on the test data and comparison data corresponding to the project to be tested; the construction conditions may include custom execution time or scheduled execution time; the test conditions may include other test conditions such as clustering, deduplication, labeling and structured conversion of data.

[0096] In this embodiment, a data automation testing platform is built for the project to be tested based on the project information. The built automation testing platform facilitates subsequent data comparison testing in the project function testing stage, project regression stage, and project launch stage without manual participation, thereby improving the efficiency and accuracy of the data comparison testing.

[0097] In this embodiment, by building an automated testing platform, the environment management and continuous build capabilities can be used to meet the needs of real-time switching of multiple environments and parallel development of multiple versions in the testing process, which is highly suitable for the sensitive transformation of the project.

[0098] S14, verifying the new indicator in the project information on the data automation testing platform to obtain a verification result.

[0099] In this embodiment, the new indicator refers to a project indicator created for a new business, which is an indicator that has never appeared in the data automation testing platform.

[0100] In an optional embodiment, the verifying the new indicator in the project information on the data automation testing platform to obtain the verification result includes:

[0101] Obtain all project indicators in the project information;

[0102] According to the project indicators pre-stored in the database, traverse each project indicator in all the project indicators in the project information;

[0103] Extracting untraversed project indicators from all the project indicators, and determining the untraversed project indicators as new indicators in the project information;

[0104] The new indicator is verified on the data automation testing platform to obtain a verification result.

[0105] In this embodiment, since new indicators are prone to errors, in order to avoid the problem of retesting all indicators caused by new indicators, before conducting data comparison tests in the projects to be tested, the new indicators in the project information are verified on the constructed data automation testing platform, and subsequent full indicator tests are conducted after ensuring that the new indicators are accurate, thereby improving test efficiency and accuracy.

[0106] Furthermore, the method further comprises:

[0107] After obtaining the current version of the automated testing platform, the corresponding modules in the current version of the automated testing platform are updated according to the maintenance conditions in the project information.

[0108] Exemplarily, if the update condition is to update the business rules, the business rules in the data query module in the automated testing platform are updated; if the update condition is to add or adjust the data interface protocol in the background, the interface information in the interface automation module in the automated testing platform is added or adjusted; if the update condition is to adjust part of the business time in the background data acquisition business rules, the time for obtaining business data in the continuous batch construction module in the automated testing platform is adjusted.

[0109] In this embodiment, an automated testing platform is built for each project. When updates occur later, the corresponding module parameters in the built automated testing platform are adjusted according to the update conditions, without the need to rebuild the automated testing platform, thereby improving testing efficiency.

[0110] S15, when the verification result is that the verification is passed, a data comparison is performed on the first full quantity indicator in the project information and the second full quantity indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result.

[0111] In this embodiment, the first full indicator contained in the project information of the project to be tested refers to all test indicators, and the second full indicator of the project to be tested contained in the preset shadow library refers to all reference indicators. The first full indicator and the second full indicator both include two types of indicators, namely new indicators and historical indicators. The reference indicators of the second full indicators correspond one-to-one to all test indicators corresponding to the first full indicators. For example, the test indicators may be an annual interest rate trend chart showing product A and a sales trend chart showing product A, and the corresponding reference indicators may be an annual interest rate trend chart showing product A and a sales trend chart showing product A.

[0112] In an optional embodiment, the step of performing data comparison on the first full quantity indicator in the project information and the second full quantity indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result includes:

[0113] Parsing the project information to obtain a first full quantity indicator;

[0114] Determine a database identifier based on the project identifier of the project to be tested;

[0115] Acquire a corresponding preset shadow library based on the database identifier, and acquire a second full quantity indicator from the preset shadow library;

[0116] comparing the first full quantity indicator with the second full quantity indicator;

[0117] When the first full quantity indicator is completely consistent with the second full quantity indicator, determining that the first comparison result is verified to be passed; or

[0118] When the first full quantity indicator is not completely consistent with the second full quantity indicator, it is determined that the first comparison result is verification failure.

[0119] In this embodiment, a first comparison result is obtained by performing a data comparison test on the reference indicator and the test indicator, and whether to go online is determined based on the first comparison result to ensure that the first full indicator in the item to be tested that is put online is a normal indicator.

[0120] S16, when the first comparison result is that the test passes, the item to be tested is put online, and the first test result within a preset time period before going online is compared with the second test result within the same preset time period after going online to obtain a second comparison result.

[0121] In this embodiment, when the first comparison result is that the test passed, it only ensures that the first full indicator of the project to be tested is normal, but the project to be tested is not put online. In order to ensure the accuracy of the project to be tested after going online, the project to be tested is put online, and the first test result and the second test result within a preset time period before and after going online are compared, and whether the automated verification of the project to be tested passes is determined based on the second comparison result.

[0122] In this embodiment, a preset time period may be preset, for example, the preset time period may be set to 30 minutes before going online and 30 minutes after going online.

[0123] In an optional embodiment, the item to be tested is put online, and a first test result within a preset time period before the item to be tested is compared with a second test result within the same preset time period after the item to be tested, and obtaining the second comparison result includes:

[0124] Saving the first test result within a preset time period before going online as a first picture;

[0125] Saving the second test result within the same preset time period after going online as a second picture;

[0126] comparing the first picture with the second picture;

[0127] When the first image is completely consistent with the second image, determining that the second comparison result is a test pass; or

[0128] When the first picture is not completely consistent with the second picture, it is determined that the second comparison result is a test failure.

[0129] In this embodiment, by saving the first test result and the second test result as pictures and performing comparison based on comparison, the comparison speed can be accelerated and more intuitive, which is convenient for subsequent maintenance personnel to quickly find problems and troubleshoot them, thereby improving maintenance efficiency.

[0130] S17: When the second comparison result is that the test passes, determine that the automated test of the item to be tested passes.

[0131] In this embodiment, when both the first comparison result and the second comparison result are passed, the version flow of the project to be tested is ensured, thereby improving the efficiency and accuracy of the automated test.

[0132] In this embodiment, from the project development stage of the project to be tested until the version of the project to be tested is launched, automation is implemented throughout the entire version process, while ensuring the data quality of each process stage, avoiding the problem of retesting in the event of errors in the process of directly testing the first full indicator of the project to be tested, and improving the data comparison test efficiency of the project to be tested.

[0133] In summary, the automated data comparison test method described in this embodiment improves the efficiency of subsequent testing by identifying the project stage of the project to be tested based on the project identifier, avoiding the phenomenon of rebuilding the platform when the project is a developed project. When the project stage of the project to be tested is the platform building stage of the project development stage, a data automation test platform is built for the project to be tested based on the project information. By building an automated test platform, it is possible to meet the needs of real-time switching of multiple environments and parallel development of multiple versions in the test process with the help of environmental management and continuous construction capabilities, which greatly meets the sensitive transformation of the project. The new indicators in the project information are verified on the data automation test platform to obtain verification results. After ensuring that the new indicators are accurate, subsequent full indicator tests are performed to improve test efficiency and accuracy. When the verification result is that the verification is passed, a data comparison is performed on the first full indicator in the project information and the second full indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result, and when the first comparison result is that the test is passed, the project to be tested is put online, and the first test result within the preset time period before the launch is compared with the second test result within the same preset time period after the launch to obtain a second comparison result. Starting from the project development stage of the project to be tested until the version of the project to be tested is launched, automation is implemented throughout the entire version process, while ensuring the data quality of each process stage, avoiding the problem of retesting in case of errors in the direct testing of the first full indicator in the project to be tested, and improving the data comparison test efficiency of the project to be tested.

[0134] Embodiment 2

[0135] Figure 2 It is a structural diagram of an automated data comparison test device provided in Embodiment 2 of the present invention.

[0136] In some embodiments, the automated data comparison test device 20 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the automated data comparison test device 20 may be stored in a memory of the electronic device and executed by the at least one processor to perform (see Figure 1 Description) Function of automated data comparison testing.

[0137] In this embodiment, the automated data comparison test device 20 can be divided into a plurality of functional modules according to the functions performed. The functional modules may include: an acquisition module 201, an identification module 202, a construction module 203, a verification module 204, a first comparison module 205, a second comparison module 206 and a determination module 207. The module referred to in the present invention refers to a series of computer-readable instruction segments that can be executed by at least one processor and can complete a fixed function, which is stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0138] The acquisition module 201 is used to parse the received data comparison test request and acquire the project information and project identification of the project to be tested.

[0139] In this embodiment, when performing a data comparison test, the user initiates a data comparison test request to the server through the client. Specifically, the client can be a smart phone, IPAD or other existing smart devices, and the server can be a data comparison test subsystem. During the data comparison test, the client can send a data comparison test request to the data comparison test subsystem, and the data comparison test subsystem is used to receive the data comparison test sent by the client.

[0140] In this embodiment, when the server receives a data comparison test, it parses the data comparison test request and obtains the project information and project identifier of the project to be tested, wherein the project information includes the version number and milestone identifier of the project to be tested, and the project identifier is used to uniquely determine the business project corresponding to the project to be tested. For example, the business project may be a financial insurance project, a financial management project, or other projects, and the milestone identifier refers to the project stage identifier corresponding to each stage of the entire project.

[0141] The identification module 202 is configured to identify the project phase of the project to be tested based on the project identifier.

[0142] In this embodiment, the project stages may include: project requirements stage, project development stage, project function testing stage, project regression stage, project online stage and other project stages, wherein whether the project is in the project development stage can be determined according to the version number of the project to be tested, and whether the project to be tested is in the project requirements stage, project function testing stage, project regression stage, project online stage and other project stages can be determined according to the milestone identification of the project to be tested, and the project development stage includes: platform building stage and platform maintenance stage.

[0143] In an optional embodiment, the identifying module 202 identifies the project stage of the project to be tested based on the project identifier, including:

[0144] Identify the first version number of the project identifier, and match the first version number of the project identifier with the second version number in the project information of the project to be tested to obtain a matching result;

[0145] The project phase of the project to be tested is determined according to the matching result.

[0146] In this embodiment, the first version number refers to the business project version number corresponding to the project identifier, and the business project version number refers to the version number determined when the project is created; the second version number refers to the project version number of the project to be tested that is continuously updated during the project execution process. If the business project has not been developed, the second version number is empty.

[0147] In this embodiment, when the first version number corresponding to the project identifier matches the second version number in the project information of the project to be tested, the returned matching result is not empty, which means the project to be tested corresponding to the project identifier has been developed; when the first version number corresponding to the project identifier does not match the second version number in the project information of the project to be tested, the returned matching result is empty, which means the project to be tested corresponding to the project identifier is a newly developed project and needs to build a platform, and the corresponding project stage is determined to be the platform building stage.

[0148] Further, determining the project stage of the project to be tested according to the matching result includes:

[0149] When the matching result is empty, determining that the project stage of the project to be tested is the platform building stage of the project development stage; or

[0150] When the matching result is not empty, it is determined that the project phase of the project to be tested is a project maintenance phase of the project development phase.

[0151] Furthermore, when the project stage of the project to be tested is the project maintenance stage of the project development stage, the automated testing platform corresponding to the previous version of the current version is obtained based on the project maintenance stage of the project to be tested; the automated testing platform corresponding to the previous version is updated based on the project information to obtain the automated testing platform of the current version.

[0152] In this embodiment, by determining the project stage of the project to be tested based on the project identifier, the phenomenon of rebuilding the platform when the project is a developed project is avoided, thereby improving the efficiency of subsequent testing.

[0153] The building module 203 is used to build a data automation test platform for the project to be tested based on the project information when the project stage of the project to be tested is the platform building stage of the project development stage.

[0154] In this embodiment, the project information includes interface configuration information, data query information, data storage information, project rule information of the project to be tested, index information, test environment information, task information, comparison condition information and other information used to build a data automation testing platform.

[0155] In an optional embodiment, the building module 203 builds a data automation test platform for the project to be tested based on the project information, including:

[0156] Acquire an interface automation module based on interface information corresponding to the project information;

[0157] Creating a query module based on data query information corresponding to the project information;

[0158] Creating an index data comparison module based on the index data corresponding to the project information;

[0159] Creating an environment dynamic module based on dynamic management and switching information of background environment information and database environment information in the business test process corresponding to the project information;

[0160] Creating a continuous batch construction module based on the construction conditions of the batch data comparison task corresponding to the project information;

[0161] Creating a comparison result analysis module based on the test conditions corresponding to the project information;

[0162] A data automation testing platform is built based on the interface automation module, query module, index data comparison module, environment dynamic module, continuous batch construction module and comparison result analysis module to obtain a data automation testing platform corresponding to the project to be tested.

[0163] In this embodiment, the interface information includes visualization interface configuration information of the background interface, and the interface automation module can be obtained according to the interface information; the data query information refers to the data storage model and business rules created based on the project to be tested, wherein the data storage model is used to store all information in the project to be tested, and the data storage model can be provided by the developer; the business rules refer to the rules pre-set for the business needs of the project to be tested, and the business rules can be provided by the developer; the index data comparison module is created based on the test data and comparison data corresponding to the project to be tested; the construction conditions may include custom execution time or scheduled execution time; the test conditions may include other test conditions such as clustering, deduplication, labeling and structured conversion of data.

[0164] In this embodiment, a data automation testing platform is built for the project to be tested based on the project information. The built automation testing platform facilitates subsequent data comparison testing in the project function testing stage, project regression stage, and project launch stage without manual participation, thereby improving the efficiency and accuracy of the data comparison testing.

[0165] In this embodiment, by building an automated testing platform, the environment management and continuous build capabilities can be used to meet the needs of real-time switching of multiple environments and parallel development of multiple versions in the testing process, which is highly suitable for the sensitive transformation of the project.

[0166] The verification module 204 is used to verify the new indicators in the project information on the data automation testing platform to obtain verification results.

[0167] In this embodiment, the new indicator refers to a project indicator created for a new business, which is an indicator that has never appeared in the data automation testing platform.

[0168] In an optional embodiment, the verification module 204 verifies the new indicator in the project information on the data automation testing platform, and the verification result obtained includes:

[0169] Obtain all project indicators in the project information;

[0170] According to the project indicators pre-stored in the database, traverse each project indicator in all the project indicators in the project information;

[0171] Extracting untraversed project indicators from all the project indicators, and determining the untraversed project indicators as new indicators in the project information;

[0172] The new indicator is verified on the data automation testing platform to obtain a verification result.

[0173] In this embodiment, since new indicators are prone to errors, in order to avoid the problem of retesting all indicators caused by new indicators, before conducting data comparison tests in the projects to be tested, the new indicators in the project information are verified on the constructed data automation testing platform, and subsequent full indicator tests are conducted after ensuring that the new indicators are accurate, thereby improving test efficiency and accuracy.

[0174] Furthermore, after obtaining the current version of the automated testing platform, the corresponding modules in the current version of the automated testing platform are updated according to the maintenance conditions in the project information.

[0175] Exemplarily, if the update condition is to update the business rules, the business rules in the data query module in the automated testing platform are updated; if the update condition is to add or adjust the data interface protocol in the background, the interface information in the interface automation module in the automated testing platform is added or adjusted; if the update condition is to adjust part of the business time in the background data acquisition business rules, the time for obtaining business data in the continuous batch construction module in the automated testing platform is adjusted.

[0176] In this embodiment, an automated testing platform is built for each project. When updates occur later, the corresponding module parameters in the built automated testing platform are adjusted according to the update conditions, without the need to rebuild the automated testing platform, thereby improving testing efficiency.

[0177] The first comparison module 205 is used to compare the first full quantity indicator in the project information with the second full quantity indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result when the verification result is verification passed.

[0178] In this embodiment, the first full indicator contained in the project information of the project to be tested refers to all test indicators, and the second full indicator of the project to be tested contained in the preset shadow library refers to all reference indicators. The first full indicator and the second full indicator both include two types of indicators, namely new indicators and historical indicators. The reference indicators of the second full indicators correspond one-to-one to all test indicators corresponding to the first full indicators. For example, the test indicators may be an annual interest rate trend chart showing product A and a sales trend chart showing product A, and the corresponding reference indicators may be an annual interest rate trend chart showing product A and a sales trend chart showing product A.

[0179] In an optional embodiment, the first comparison module 205 performs data comparison on the first full quantity indicator in the project information and the second full quantity indicator in the preset shadow library corresponding to the project to be tested, and obtains the first comparison result including:

[0180] Parsing the project information to obtain a first full quantity indicator;

[0181] Determine a database identifier based on the project identifier of the project to be tested;

[0182] Acquire a corresponding preset shadow library based on the database identifier, and acquire a second full quantity indicator from the preset shadow library;

[0183] comparing the first full quantity indicator with the second full quantity indicator;

[0184] When the first full quantity indicator is completely consistent with the second full quantity indicator, determining that the first comparison result is verified to be passed; or

[0185] When the first full quantity indicator is not completely consistent with the second full quantity indicator, it is determined that the first comparison result is verification failure.

[0186] In this embodiment, a first comparison result is obtained by performing a data comparison test on the reference indicator and the test indicator, and whether to go online is determined based on the first comparison result to ensure that the first full indicator in the item to be tested that is put online is a normal indicator.

[0187] The second comparison module 206 is used to, when the first comparison result is that the test passes, execute the test item online, compare the first test result within a preset time period before the online launch with the second test result within the same preset time period after the online launch, and obtain a second comparison result.

[0188] In this embodiment, when the first comparison result is that the test passed, it only ensures that the first full indicator of the project to be tested is normal, but the project to be tested is not put online. In order to ensure the accuracy of the project to be tested after going online, the project to be tested is put online, and the first test result and the second test result within the preset time period before and after going online are compared, and whether the automated verification of the project to be tested passes is determined based on the second comparison result.

[0189] In this embodiment, a preset time period may be preset, for example, the preset time period may be set to 30 minutes before going online and 30 minutes after going online.

[0190] In an optional embodiment, the second comparison module 206 performs online operation on the item to be tested, and compares the first test result within a preset time period before the online operation with the second test result within the same preset time period after the online operation, and obtains the second comparison result including:

[0191] Saving the first test result within a preset time period before going online as a first picture;

[0192] Saving the second test result within the same preset time period after going online as a second picture;

[0193] comparing the first picture with the second picture;

[0194] When the first image is completely consistent with the second image, determining that the second comparison result is a test pass; or

[0195] When the first picture is not completely consistent with the second picture, it is determined that the second comparison result is a test failure.

[0196] In this embodiment, by saving the first test result and the second test result as pictures and performing comparison based on comparison, the comparison speed can be accelerated and more intuitive, which is convenient for subsequent maintenance personnel to quickly find problems and troubleshoot them, thereby improving maintenance efficiency.

[0197] The determination module 207 is used to determine that the automated test of the item to be tested has passed when the second comparison result is that the test has passed.

[0198] In this embodiment, when both the first comparison result and the second comparison result are passed, the version flow of the project to be tested is ensured, thereby improving the efficiency and accuracy of the automated test.

[0199] In this embodiment, from the project development stage of the project to be tested until the version of the project to be tested is launched, automation is implemented throughout the entire version process, while ensuring the data quality of each process stage, avoiding the problem of retesting in the event of errors in the process of directly testing the first full indicator of the project to be tested, and improving the data comparison test efficiency of the project to be tested.

[0200] In summary, the automated data comparison test device described in this embodiment improves the efficiency of subsequent testing by identifying the project stage of the project to be tested based on the project identifier, thereby avoiding the phenomenon of rebuilding the platform when the project is a developed project. When the project stage of the project to be tested is the platform building stage of the project development stage, a data automation test platform is built for the project to be tested based on the project information. By building an automated test platform, it is possible to meet the needs of real-time switching of multiple environments and parallel development of multiple versions in the test process with the help of environmental management and continuous construction capabilities, which greatly meets the sensitive transformation of the project. The new indicators in the project information are verified on the data automation test platform to obtain verification results. After ensuring that the new indicators are accurate, subsequent full indicator tests are performed to improve test efficiency and accuracy. When the verification result is that the verification is passed, a data comparison is performed on the first full indicator in the project information and the second full indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result, and when the first comparison result is that the test is passed, the project to be tested is put online, and the first test result within the preset time period before the launch is compared with the second test result within the same preset time period after the launch to obtain a second comparison result. Starting from the project development stage of the project to be tested until the version of the project to be tested is launched, automation is implemented throughout the entire version process, while ensuring the data quality of each process stage, avoiding the problem of retesting in case of errors in the direct testing of the first full indicator in the project to be tested, and improving the data comparison test efficiency of the project to be tested.

[0201] Embodiment 3

[0202] See also Figure 3 FIG. 2 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. In a preferred embodiment of the present invention, the electronic device 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .

[0203] Those skilled in the art should understand that Figure 3 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present invention, and may be a bus structure or a star structure. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0204] In some embodiments, the electronic device 3 is an electronic device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 3 may also include client devices, which include but are not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0205] It should be noted that the electronic device 3 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0206] In some embodiments, the memory 31 is used to store program codes and various data, such as the automated data comparison test device 20 installed in the electronic device 3, and to achieve high-speed and automatic access to programs or data during the operation of the electronic device 3. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0207] In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The at least one processor 32 is the control core (Control Unit) of the electronic device 3, and uses various interfaces and lines to connect various components of the entire electronic device 3, and executes various functions and processes data of the electronic device 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31.

[0208] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.

[0209] Although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to each component. Optionally, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0210] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0211] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute a part of the method described in each embodiment of the present invention.

[0212] In a further embodiment, in combination Figure 2 The at least one processor 32 can execute the operating device of the electronic device 3 and various installed application programs (such as the automated data comparison test device 20), program codes, etc., for example, the above-mentioned modules.

[0213] The memory 31 stores program codes, and the at least one processor 32 can call the program codes stored in the memory 31 to execute related functions. For example, Figure 2 The modules described in the embodiment are program codes stored in the memory 31 and are executed by the at least one processor 32, thereby realizing the functions of the modules to achieve the purpose of automated data comparison test.

[0214] Exemplarily, the program code may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the program code in the electronic device 3. For example, the program code may be divided into an acquisition module 201, an identification module 202, a construction module 203, a verification module 204, a first comparison module 205, a second comparison module 206, and a determination module 207.

[0215] In one embodiment of the present invention, the memory 31 stores a plurality of computer-readable instructions, and the plurality of computer-readable instructions are executed by the at least one processor 32 to implement the function of automated data comparison test.

[0216] Specifically, the specific implementation method of the at least one processor 32 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0217] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0218] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0219] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0220] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. The multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. An automated data comparison test method, It is characterized in that The method comprises: Parse the received data comparison test request and obtain the project information and project identification of the project to be tested; Identifying the project phase of the project to be tested based on the project identifier; When the project stage of the project to be tested is the platform building stage of the project development stage, building a data automation test platform for the project to be tested based on the project information; Verifying the new indicator in the project information on the data automation testing platform to obtain a verification result includes: acquiring all project indicators in the project information; traversing each project indicator in all project indicators in the project information according to the project indicators pre-stored in the database; extracting the untraversed project indicators from all the project indicators, and determining the untraversed project indicators as new indicators in the project information; verifying the new indicator on the data automation testing platform to obtain a verification result; When the verification result is that the verification is passed, a data comparison is performed on the first full indicator in the project information and the second full indicator in the preset shadow library corresponding to the project to be tested to obtain a first comparison result, including: parsing the project information to obtain the first full indicator; determining the database identifier based on the project identifier of the project to be tested; obtaining the corresponding preset shadow library based on the database identifier, and obtaining the second full indicator from the preset shadow library; comparing the first full indicator with the second full indicator; when the first full indicator is completely consistent with the second full indicator, determining that the first comparison result is verified to be passed; When the first comparison result is that the test passes, the item to be tested is put online, and the first test result within a preset time period before the online is compared with the second test result within the same preset time period after the online is compared to obtain a second comparison result; When the second comparison result is that the test passes, it is determined that the automated test of the item to be tested passes.

2. The automated data comparison test method according to claim 1, It is characterized in that The step of building a data automation test platform for the project to be tested based on the project information includes: Acquire an interface automation module based on interface information corresponding to the project information; Creating a query module based on data query information corresponding to the project information; Creating an index data comparison module based on the index data corresponding to the project information; Creating an environment dynamic module based on dynamic management and switching information of background environment information and database environment information in the business test process corresponding to the project information; Creating a continuous batch construction module based on the construction conditions of the batch data comparison task corresponding to the project information; Creating a comparison result analysis module based on the test conditions corresponding to the project information; A data automation testing platform is built based on the interface automation module, query module, index data comparison module, environment dynamic module, continuous batch construction module and comparison result analysis module to obtain a data automation testing platform corresponding to the project to be tested.

3. The automated data comparison test method according to claim 1, It is characterized in that The method further comprises: When the first full quantity indicator is not completely consistent with the second full quantity indicator, it is determined that the first comparison result is verification failure.

4. The automated data comparison test method according to claim 1, It is characterized in that The step of performing the online operation on the item to be tested and comparing the first test result within a preset time period before the online operation with the second test result within the same preset time period after the online operation to obtain the second comparison result includes: Saving the first test result within a preset time period before going online as a first picture; Saving the second test result within the same preset time period after going online as a second picture; comparing the first picture with the second picture; When the first image is completely consistent with the second image, determining that the second comparison result is a test pass; or When the first picture is not completely consistent with the second picture, it is determined that the second comparison result is a test failure.

5. The automated data comparison test method according to claim 1, It is characterized in that The project phase of identifying the project to be tested based on the project identifier includes: Identify the first version number of the project identifier, and match the first version number of the project identifier with the second version number in the project information of the project to be tested to obtain a matching result; The project phase of the project to be tested is determined according to the matching result.

6. The automated data comparison test method according to claim 1, It is characterized in that The method further comprises: When the project stage of the project to be tested is the project maintenance stage of the project development stage, obtaining an automated testing platform corresponding to a previous version of the current version based on the project maintenance stage of the project to be tested; The automated testing platform corresponding to the previous version is updated based on the project information to obtain the automated testing platform of the current version.

7. An automated data comparison test device, It is characterized in that The device comprises: An acquisition module is used to parse the received data comparison test request and obtain the project information and project identification of the project to be tested; An identification module, used for identifying the project phase of the project to be tested based on the project identifier; A building module, used for building a data automation test platform for the project to be tested based on the project information when the project stage of the project to be tested is the platform building stage of the project development stage; A verification module, used for verifying the new indicator in the project information on the data automation test platform to obtain a verification result, including: obtaining all project indicators in the project information; traversing each project indicator in all project indicators in the project information according to the project indicators pre-stored in the database; extracting the untraversed project indicators from all the project indicators, and determining the untraversed project indicators as new indicators in the project information; verifying the new indicator on the data automation test platform to obtain a verification result; A first comparison module is used to compare the first full indicator in the project information with the second full indicator in the preset shadow library corresponding to the project to be tested when the verification result is verification passed, to obtain a first comparison result, including: parsing the project information to obtain the first full indicator; determining the database identifier based on the project identifier of the project to be tested; obtaining the corresponding preset shadow library based on the database identifier, and obtaining the second full indicator from the preset shadow library; comparing the first full indicator with the second full indicator; when the first full indicator is completely consistent with the second full indicator, determining that the first comparison result is verification passed; A second comparison module is used to, when the first comparison result is that the test passes, execute the online operation of the item to be tested, and compare the first test result within a preset time period before the online operation with the second test result within the same preset time period after the online operation to obtain a second comparison result; The determination module is used to determine that the automated test of the item to be tested has passed when the second comparison result is that the test has passed.

8. An electronic device, It is characterized in that The electronic device comprises a processor and a memory, and the processor is used to implement the automated data comparison test method as claimed in any one of claims 1 to 6 when executing a computer program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the automated data comparison test method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Project test result management method and device, computer equipment and storage medium

    CN110928773A

  • Test method and device, electronic equipment and computer readable storage medium

    CN113485931A

  • Isolated testing of distributed development projects

    US20150135158A1