WO2018202172A1 - Mass comparison test method and system - Google Patents

Mass comparison test method and system Download PDF

Info

Publication number
WO2018202172A1
WO2018202172A1 PCT/CN2018/085723 CN2018085723W WO2018202172A1 WO 2018202172 A1 WO2018202172 A1 WO 2018202172A1 CN 2018085723 W CN2018085723 W CN 2018085723W WO 2018202172 A1 WO2018202172 A1 WO 2018202172A1
Authority
WO
WIPO (PCT)
Prior art keywords
comparison test
data
rollback
large batch
result data
Prior art date
Application number
PCT/CN2018/085723
Other languages
French (fr)
Chinese (zh)
Inventor
邓亦超
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018202172A1 publication Critical patent/WO2018202172A1/en

Links

Images

Classifications

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

Definitions

  • the present application relates to the field of database technology, and in particular, to a large-scale comparative test method and system.
  • the life insurance system calculates the premiums receivable in the next period
  • the system business scenario is complex, and the amount of information carried by the data interface that needs to be called is very large.
  • the system business function is upgraded, generally only the regular function verification is performed.
  • the data covered by the system test may not be comprehensive enough, and an effective automated test means is not available to cover all the test data.
  • the purpose of the present application is to provide a high-volume comparison test method and system to solve the problem of how to perform the comparison test of the before and after versions of the premium receivable system in full coverage.
  • the present application provides a high-volume comparison test method, the method comprising the steps of:
  • the difference is analyzed to determine whether it is caused by a program defect of the new version code.
  • the present application also provides a high-volume comparison test system, the system comprising:
  • a calculation module configured to calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data
  • a rollback module configured to perform rollback of the large batch comparison test database according to the set rollback point
  • the calculation module is further configured to: after the new version code is deployed, calculate the premium receivable again to obtain the second result data;
  • a comparison module configured to compare the first result data with the second result data to determine whether there is a difference
  • An analysis module is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
  • the present application provides a computer readable storage medium having a large batch comparison test system stored therein, the high volume comparison test system comprising:
  • a calculation module configured to calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data
  • a rollback module configured to perform rollback of the large batch comparison test database according to the set rollback point
  • the calculation module is further configured to: after the new version code is deployed, calculate the premium receivable again to obtain the second result data;
  • a comparison module configured to compare the first result data with the second result data to determine whether there is a difference
  • An analysis module is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
  • the high-volume comparison test method, system and computer readable storage medium proposed by the present application use a database rollback method to perform large-volume data comparison test, first calculate the premium receivable for the old version, save the result table and import it into other databases. Backup, then perform database rollback, then perform the receivable premium calculation again for the data of the new version interface, save the result table, and compare and analyze the data of the two saved result tables, which can reduce the test manpower and increase the test coverage.
  • the basis of the database rollback ensures that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test.
  • FIG. 1 is a flowchart of a high-volume comparison test method according to a first embodiment of the present application
  • FIG. 2 is a flow chart of a method for testing a large batch of comparisons according to a second embodiment of the present application
  • FIG. 3 is a flow chart of a method for testing a large batch of comparisons according to a third embodiment of the present application.
  • FIG. 4 is a schematic diagram of a module of a large batch comparison test system according to a fourth embodiment of the present application.
  • the first embodiment of the present application provides a high-volume comparison test method, which includes the following steps:
  • the data state in the large batch comparison test database will be restored to the state of the rollback point.
  • the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
  • the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test.
  • the way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
  • step S100 may also be performed after the step S102 described below.
  • the receivable data is mainly generated in the prem_due table and the stat_prem_due table.
  • the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field.
  • the same policy, the same due date information and the main check field are obtained.
  • control_id is PREM_DUE_DATA_OLD
  • the obtained first result data is written in the table tst_prem_due_case_old.
  • the premium receivable is recalculated based on the new version code.
  • the switch at this time is tst_rbs_control_table
  • control_id is the state of PREM_DUE_DATA_OLD
  • v_control_char 'Y'.
  • the second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
  • the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
  • a comparison analysis is performed on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and the analyzed differences are written in the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
  • the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
  • the content added or changed in the new version code and the contents of the added or changed content may be recorded in accordance with which items of the premium data are affected.
  • it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
  • the large-scale comparison test method proposed in this embodiment adopts a database rollback method to perform large-volume data comparison test, first performs the premium collection calculation on the old version, and then performs database rollback, and then data for the new version interface again. Carry out the calculation of the premiums receivable, and compare and analyze the data obtained from the two calculations to reduce the test manpower and increase the test coverage. Moreover, the basis of the database rollback ensures that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test.
  • the second embodiment of the present application proposes a large-scale comparison test method.
  • the steps of the mass comparison test method are similar to those of the first embodiment, the main difference being that steps S204 and S210 are added on the basis of the first embodiment.
  • the method specifically includes the following steps:
  • the data state in the large batch comparison test database will be restored to the state of the rollback point.
  • the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
  • the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test.
  • the way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
  • step S200 may also be performed after the step S202 described below.
  • the receivable data is mainly generated in the prem_due table and the stat_prem_due table.
  • the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field.
  • the same policy, the same due date information and the main check field are obtained.
  • control_id is PREM_DUE_DATA_OLD
  • the obtained first result data is written in the table tst_prem_due_case_old.
  • the first result data of the table tst_prem_due_case_old is imported into another database, and can be imported by means of a database link (Database Link, dblink). Because when the database is rolled back, the result set will also be rolled back together, so the result set needs to be backed up, and then returned to the large batch comparison test library.
  • database Link Database Link, dblink
  • the premium receivable is recalculated based on the new version code.
  • the switch at this time is tst_rbs_control_table
  • the control_id is PREM_DUE_DATA_OLD
  • the state of v_control_char 'Y'.
  • the second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
  • the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
  • the first result data is returned to the large batch comparison test database.
  • the first result data of the table tst_prem_due_case_old is returned to the large batch comparison test library by means of dblink from the another database.
  • a comparison analysis is performed on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and the analyzed differences are written in the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
  • the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
  • the content added or changed in the new version code and the contents of the added or changed may be recorded in accordance with which items of the premium data are affected.
  • it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
  • the large-scale comparison test method proposed in this embodiment adopts a database rollback method to perform large-volume data comparison test, first performs the premium collection of the old version, saves the result table and imports it into other databases for backup, and then performs the database back. Roll, then perform the receivable premium calculation again for the data of the new version interface, save the result table, and compare and analyze the data of the two saved result tables, which can reduce the test manpower and increase the test coverage.
  • the basis of the database rollback ensures that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test.
  • backing up the results table of the first calculation ensures that the result table is not affected by the database rollback.
  • the third embodiment of the present application proposes a mass comparison test method.
  • the steps of the mass comparison test method are similar to those of the second embodiment, the main difference being that step S300 and step S302 are added on the basis of the second embodiment.
  • the method specifically includes the following steps:
  • the data of the specified delivery date range (generally the next month) is set, and the time of the capture can be set by controlling the corresponding program switch to periodically capture a batch of basic data.
  • S302 Acquire basic data into the large-scale comparison test database according to the set range and time.
  • the data of the specified due date range is fetched according to the set time, and the basic data satisfying the condition is obtained, and is written in the table tst_rbs_prem_due_tmp.
  • the data state in the large batch comparison test database will be restored to the state of the rollback point.
  • the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
  • the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test.
  • the way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
  • step S304 can also be performed after the step S306 described below.
  • the receivable data is mainly generated in the prem_due table and the stat_prem_due table.
  • the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field.
  • the same policy, the same due date information and the main check field are obtained.
  • control_id is PREM_DUE_DATA_OLD
  • the obtained first result data is written in the table tst_prem_due_case_old.
  • the first result data of the table tst_prem_due_case_old is imported into another database, and can be imported by means of dblink. Because when the database is rolled back, the result set will also be rolled back together, so the result set needs to be backed up, and then returned to the large batch comparison test library.
  • the premium receivable is recalculated based on the new version code.
  • the switch at this time is tst_rbs_control_table
  • control_id is the state of PREM_DUE_DATA_OLD
  • v_control_char 'Y'.
  • the second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
  • the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
  • the first result data is returned to the large batch comparison test database.
  • the first result data of the table tst_prem_due_case_old is returned to the large batch comparison test library by means of dblink from the another database.
  • a comparison analysis is performed on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and the analyzed differences are written in the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
  • the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
  • the content added or changed in the new version code and the contents of the added or changed content may be recorded in accordance with which items of the premium data are affected.
  • it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
  • the large-scale comparison test method proposed in this embodiment adopts a database rollback method to perform large-volume data comparison test, first performs the premium collection of the old version, saves the result table and imports it into other databases for backup, and then performs the database back. Roll, then perform the receivable premium calculation again for the data of the new version interface, save the result table, and compare and analyze the data of the two saved result tables, which can reduce the test manpower and increase the test coverage. Moreover, the database is rolled back to ensure that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test. In addition, backing up the results table of the first calculation ensures that the result table is not affected by the database rollback.
  • the fourth embodiment of the present application proposes a mass comparison test system 40.
  • the high-volume comparison test system 40 includes a setup module 400, a calculation module 402, a rollback module 404, a comparison module 406, and an analysis module 408.
  • the setting module 400 is configured to set a rollback point of the large batch comparison test database.
  • the data state in the large batch comparison test database will be restored to the state of the rollback point.
  • the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
  • the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test.
  • the way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
  • the calculating module 402 is configured to calculate the premium receivable according to the basic data in the large batch comparison test database to obtain the first result data.
  • the receivable data is mainly generated in the prem_due table and the stat_prem_due table.
  • the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field.
  • the same policy, the same due date information and the main check field are obtained.
  • control_id is PREM_DUE_DATA_OLD
  • the resulting first result data is written in the table tst_prem_due_case_old.
  • the rollback module 404 is configured to perform rollback of the large batch comparison test database according to the set rollback point.
  • the calculating module 402 is further configured to calculate the premium receivable again after the new version code is deployed, to obtain the second result data.
  • the calculation module 402 recalculates the premium receivable based on the new version code.
  • the switch at this time is tst_rbs_control_table
  • the control_id is PREM_DUE_DATA_OLD
  • the state of v_control_char 'Y'.
  • the second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
  • the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
  • the comparison module 406 is configured to compare the first result data with the second result data to determine whether there is a difference.
  • the comparison module 406 performs a comparative analysis on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and writes the analyzed difference into the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
  • the analysis module 408 is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
  • the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
  • the content added or changed in the new version code and the contents of the added or changed content may be recorded in accordance with which items of the premium data are affected.
  • it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
  • the high volume comparison test system 40 may further include:
  • the backup module 410 is configured to import the first result data into another database for backup before the rollback module 404 performs rollback of the large batch comparison test database.
  • the backup module 410 imports the first result data of the table tst_prem_due_case_old into another database, and can be imported by means of dblink. Because when the database is rolled back, the result set will also be rolled back together, so the result set needs to be backed up, and then returned to the large batch comparison test library.
  • the backup module 410 is further configured to, after the calculating module 402 obtains the second result data, import the first result data back into the large batch comparison test database.
  • the backup module 410 imports the first result data of the table tst_prem_due_case_old from the another database to the large batch comparison test library by way of dblink.
  • the setting module 400 is further configured to set a range and time for acquiring basic data.
  • the setting module 400 sets the data for grasping the specified delivery date range (generally the next month), and the time of the capture can be set by controlling the corresponding program switch to periodically capture a batch of basic data.
  • the high volume comparison test system 40 may further include:
  • the obtaining module 412 is configured to obtain basic data into the large batch comparison test database according to the range and time set by the setting module 400.
  • the obtaining module 412 fetches the data of the specified delivery date according to the set time, and obtains basic data that satisfies the condition, and writes the data into the table tst_rbs_prem_due_tmp.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

A mass comparison test method and system. The method comprises: configuring a rollback point for a mass comparison test database (S100); calculating, according to basic data in the mass comparison test database, a receivable insurance premium, to obtain first result data (S102); performing, according to the configured rollback point, a rollback of the mass comparison test database (S104); upon the deployment of a new version of code, re-calculating the receivable insurance premium, to obtain second result data (S106); comparing the first result data with the second result data and determining whether there is a difference (S108); analyzing the difference, and determining whether the difference is caused by program defects of the new version of code (S110). Thus, a comparison test between the new version and the old version of a receivable insurance premium system can be performed in a full-coverage manner.

Description

大批量对比测试方法及系统Mass comparison test method and system
本申请要求于2017年5月5日提交中国专利局,申请号为2017103123280、发明名称为“大批量对比测试方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 2009103123280, the entire disclosure of which is incorporated herein by reference. .
技术领域Technical field
本申请涉及数据库技术领域,尤其涉及大批量对比测试方法及系统。The present application relates to the field of database technology, and in particular, to a large-scale comparative test method and system.
背景技术Background technique
目前寿险系统在计算下期应收保费时,系统业务场景复杂,需要调用的数据接口携带的信息量非常大。而系统业务功能升级后,一般仅进行常规的功能验证,系统测试覆盖的数据可能不够全面,缺乏一种有效的自动化测试手段来覆盖所有测试数据。At present, when the life insurance system calculates the premiums receivable in the next period, the system business scenario is complex, and the amount of information carried by the data interface that needs to be called is very large. After the system business function is upgraded, generally only the regular function verification is performed. The data covered by the system test may not be comprehensive enough, and an effective automated test means is not available to cover all the test data.
而如果依赖传统的人工方式进行核对数据,可能会出现以下问题:耗费大量的人力,且效率低下;新增的业务可能会影响老功能的正常运行,而传统验证方式无法全面覆盖到所有功能;能够处理的数据量小,无法做到业务场景全覆盖;无法估量新增业务功能对性能、资源造成的影响;无法覆盖异常类测试数据等;容易导致漏测。以上各种问题,均可能带来重大损失。If you rely on the traditional manual method to check the data, the following problems may occur: a lot of manpower is required, and the efficiency is low; the newly added services may affect the normal operation of the old functions, and the traditional verification method cannot fully cover all functions; The amount of data that can be processed is small, and it is impossible to fully cover the business scenario; the impact of new business functions on performance and resources cannot be estimated; the abnormal class test data cannot be covered; it is easy to cause missed measurement. All of the above problems can cause significant losses.
因此,需要一种能够进行批量数据测试、覆盖所有业务场景并能够评估业务升级带来的功能差异和影响的软件测试方法,能够适应不断的系统更新以及完成相应的测试任务。Therefore, there is a need for a software test method that can perform batch data testing, cover all business scenarios, and be able to assess the functional differences and impacts of service upgrades, and can adapt to continuous system updates and complete corresponding test tasks.
发明内容Summary of the invention
有鉴于此,本申请的目的在于提供一种大批量对比测试方法及系统,以解决如何全覆盖地进行应收保费系统的前后版本对比测试的问题。In view of this, the purpose of the present application is to provide a high-volume comparison test method and system to solve the problem of how to perform the comparison test of the before and after versions of the premium receivable system in full coverage.
为实现上述目的,本申请提供一种大批量对比测试方法,该方法包括步骤:To achieve the above object, the present application provides a high-volume comparison test method, the method comprising the steps of:
设置大批量对比测试数据库的回滚点;Set the rollback point of the large batch comparison test database;
根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据;Calculating the premium receivable according to the basic data in the large batch comparison test database, and obtaining the first result data;
根据所设置的回滚点进行所述大批量对比测试数据库的回滚;Performing rollback of the large batch comparison test database according to the set rollback point;
部署新版本代码后,再次计算应收保费,得到第二结果数据;After deploying the new version code, calculate the premium receivable again and get the second result data;
对比所述第一结果数据与所述第二结果数据,判断是否存在差异;及Comparing the first result data with the second result data to determine whether there is a difference; and
对所述差异进行分析,判断是否为新版本代码的程序缺陷所导致。The difference is analyzed to determine whether it is caused by a program defect of the new version code.
为实现上述目的,本申请还提出一种大批量对比测试系统,该系统包括:To achieve the above object, the present application also provides a high-volume comparison test system, the system comprising:
设置模块,用于设置大批量对比测试数据库的回滚点;Setting module for setting the rollback point of the large batch comparison test database;
计算模块,用于根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据;a calculation module, configured to calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data;
回滚模块,用于根据所设置的回滚点进行所述大批量对比测试数据库的回滚;a rollback module, configured to perform rollback of the large batch comparison test database according to the set rollback point;
所述计算模块还用于部署新版本代码后,再次计算应收保费,得到第二结果数据;The calculation module is further configured to: after the new version code is deployed, calculate the premium receivable again to obtain the second result data;
对比模块,用于对比所述第一结果数据与所述第二结果数据,判断是否存在差异;a comparison module, configured to compare the first result data with the second result data to determine whether there is a difference;
分析模块,用于对所述差异进行分析,判断是否为新版本代码的程序缺陷所导致。An analysis module is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
为实现上述目的,本申请提供一种计算机可读存储介质,所述计算机可读存储介质内存储有大批量对比测试系统,该大批量对比测试系统包括:To achieve the above objective, the present application provides a computer readable storage medium having a large batch comparison test system stored therein, the high volume comparison test system comprising:
设置模块,用于设置大批量对比测试数据库的回滚点;Setting module for setting the rollback point of the large batch comparison test database;
计算模块,用于根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据;a calculation module, configured to calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data;
回滚模块,用于根据所设置的回滚点进行所述大批量对比测试数据库的回滚;a rollback module, configured to perform rollback of the large batch comparison test database according to the set rollback point;
所述计算模块还用于部署新版本代码后,再次计算应收保费,得到第二结果数据;The calculation module is further configured to: after the new version code is deployed, calculate the premium receivable again to obtain the second result data;
对比模块,用于对比所述第一结果数据与所述第二结果数据,判断是否存在差异;a comparison module, configured to compare the first result data with the second result data to determine whether there is a difference;
分析模块,用于对所述差异进行分析,判断是否为新版本代码的程序缺陷所导致。An analysis module is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
本申请提出的大批量对比测试方法、系统及计算机可读存储介质,采用数据库回滚的方式,执行大批量数据对比测试,先对旧版本进行应收保费计算,保存结果表并导入其他数据库中备份,之后进行数据库回滚,然后针对新版本接口的数据再次进行应收保费计算,保存结果表,对两次保存的结果表进行数据对比分析,可以减少测试人力以及增加测试覆盖面。并且,以数据库回滚的方式确保两次测试结果的基础条件一致,可以保障该对比测试的有效性。The high-volume comparison test method, system and computer readable storage medium proposed by the present application use a database rollback method to perform large-volume data comparison test, first calculate the premium receivable for the old version, save the result table and import it into other databases. Backup, then perform database rollback, then perform the receivable premium calculation again for the data of the new version interface, save the result table, and compare and analyze the data of the two saved result tables, which can reduce the test manpower and increase the test coverage. Moreover, the basis of the database rollback ensures that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test.
附图说明DRAWINGS
图1为本申请第一实施例提出的一种大批量对比测试方法的流程图;1 is a flowchart of a high-volume comparison test method according to a first embodiment of the present application;
图2为本申请第二实施例提出的一种大批量对比测试方法的流程图;2 is a flow chart of a method for testing a large batch of comparisons according to a second embodiment of the present application;
图3为本申请第三实施例提出的一种大批量对比测试方法的流程图;3 is a flow chart of a method for testing a large batch of comparisons according to a third embodiment of the present application;
图4为本申请第四实施例提出的一种大批量对比测试系统的模块示意图;4 is a schematic diagram of a module of a large batch comparison test system according to a fourth embodiment of the present application;
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The object of the present application, the features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式detailed description
为了使本申请所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application clearer and clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
第一实施例First embodiment
如图1所示,本申请第一实施例提出一种大批量对比测试方法,该方法包括以下步骤:As shown in FIG. 1 , the first embodiment of the present application provides a high-volume comparison test method, which includes the following steps:
S100,设置大批量对比测试数据库的回滚点。S100, set the rollback point of the large batch comparison test database.
具体地,根据所设置的回滚点,当后续进行所述大批量对比测试数据库的 回滚之后,所述大批量对比测试数据库中的数据状态将恢复到所述回滚点的状态。设置回滚点要注意时间,因为回滚是表示数据库状态的回滚,一旦回滚,数据及代码都会回滚。Specifically, according to the set rollback point, after the rollback of the large batch comparison test database is performed, the data state in the large batch comparison test database will be restored to the state of the rollback point. Pay attention to the time to set the rollback point, because the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
值得注意的是,由于运行完代码之后数据的状态会发生变化,若采用删除数据的方式进行前后版本的对比测试,可能存在数据删除不干净,影响对比测试的结果。而数据库回滚的方式能够保证对新版本代码进行测试时数据的状态和对旧版本代码进行测试时的数据状态相同,目的是确保对比结果的基础条件是一致的,确保对比测试的有效性。It is worth noting that the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test. The way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
在其他实施例中,所述步骤S100也可以在下述步骤S102之后执行。In other embodiments, the step S100 may also be performed after the step S102 described below.
S102,根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据。S102. Calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data.
具体地,在表tst_rbs_prem_due_tmp中抓取proc_flag=‘N’的数据,调用应收保费抽档的核心接口lifeman.rbs_prem_due_package.policy_due_draw_core生成应收数据,然后更新proc_flag的标志位为Y,避免重复抓取数据。Specifically, in the table tst_rbs_prem_due_tmp, the data of proc_flag='N' is captured, and the core interface lifeman.rbs_prem_due_package.policy_due_draw_core of the receivable premium is generated to generate the receivable data, and then the flag of the proc_flag is updated to Y, to avoid repeatedly fetching data. .
调用应收抽档核心接口之后,应收数据主要生成在prem_due表以及stat_prem_due表中。针对tst_rbs_prem_due_tmp中proc_flag=‘Y’的数据,在prem_due表中获取同一保单、同一应交日的信息及主要核对的字段,将要核对的字段组合成一个新的字段。同样在stat_prem_due表中也获取同一保单、同一应交日的信息及主要核对的字段。After calling the core interface of the receivable file, the receivable data is mainly generated in the prem_due table and the stat_prem_due table. For the data of proc_flag=‘Y’ in tst_rbs_prem_due_tmp, the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field. Also in the stat_prem_due table, the same policy, the same due date information and the main check field are obtained.
此处通过开关tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘N’控制为计算旧版本代码下的应收保费数据。所得到的第一结果数据写入表tst_prem_due_case_old中。Here, by the switch tst_rbs_control_table, control_id is PREM_DUE_DATA_OLD, and v_control_char = 'N' is controlled to calculate the premium data under the old version code. The obtained first result data is written in the table tst_prem_due_case_old.
S104,根据所设置的回滚点进行所述大批量对比测试数据库的回滚。S104. Perform rollback of the large batch comparison test database according to the set rollback point.
具体地,经过回滚之后,所述大批量对比测试数据库中的数据状态恢复到回滚点的状态。因此后续再次进行计算时的基础条件与计算所述第一结果数据时一致。Specifically, after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point. Therefore, the basic conditions when the calculation is performed again later are consistent with the calculation of the first result data.
S106,部署新版本代码后,再次计算应收保费,得到第二结果数据。S106. After deploying the new version code, calculate the premium receivable again and obtain the second result data.
具体地,当部署新版本代码到所述大批量对比测试数据库后,根据新版本代码再次计算应收保费。为了保证此处计算的是新版本代码下的应收保费数据, 此时的开关是tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘Y’的状态。再次计算应收保费所得到的第二结果数据写入表tst_prem_due_case_new中。Specifically, when the new version code is deployed to the high-volume comparison test database, the premium receivable is recalculated based on the new version code. In order to ensure that the premium data under the new version code is calculated here, the switch at this time is tst_rbs_control_table, control_id is the state of PREM_DUE_DATA_OLD, and v_control_char = 'Y'. The second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
与所述第一结果数据相对应地,所述第二结果数据中也包括在prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段,以及在stat_prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段。Corresponding to the first result data, the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
S108,对比所述第一结果数据与第二结果数据,判断是否存在差异。S108. Compare the first result data with the second result data to determine whether there is a difference.
具体地,针对所述第一结果数据(tst_prem_due_case_old)与第二结果数据(tst_prem_due_case_new)进行对比分析,将分析出的差异写入表tst_rbs_exception中。核对完数据,需要更新相应保单和应交日的proc_flag为Y,表示已经核对过数据,以避免重复核对。Specifically, a comparison analysis is performed on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and the analyzed differences are written in the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
S110,对差异进行分析,判断是否为新版本代码的程序缺陷所导致。S110, analyzing the difference to determine whether it is caused by a program defect of the new version code.
具体地,通过对表tst_rbs_exception中的差异数据进行分析,判断异常原因,看是否是新版本代码的程序缺陷所导致的问题。如果是新版本代码的程序缺陷所导致的问题,则需要对所述新版本代码进行修复。Specifically, by analyzing the difference data in the table tst_rbs_exception, the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
在本实施例中,可以预先对新版本代码新增或变更的内容以及该新增或变更的内容会对应收保费数据的哪些项目产生影响进行记录。当所述第一结果数据与第二结果数据存在差异时,通过分析所述差异是否属于该新增或变更的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增或变更的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增或变更的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。In this embodiment, the content added or changed in the new version code and the contents of the added or changed content may be recorded in accordance with which items of the premium data are affected. When there is a difference between the first result data and the second result data, it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
本实施例所提出的大批量对比测试方法,采用数据库回滚的方式,执行大批量数据对比测试,先对旧版本进行应收保费计算,之后进行数据库回滚,然后针对新版本接口的数据再次进行应收保费计算,对两次计算得到的结果表进行数据对比分析,可以减少测试人力以及增加测试覆盖面。并且,以数据库回滚的方式确保两次测试结果的基础条件一致,可以保障该对比测试的有效性。The large-scale comparison test method proposed in this embodiment adopts a database rollback method to perform large-volume data comparison test, first performs the premium collection calculation on the old version, and then performs database rollback, and then data for the new version interface again. Carry out the calculation of the premiums receivable, and compare and analyze the data obtained from the two calculations to reduce the test manpower and increase the test coverage. Moreover, the basis of the database rollback ensures that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test.
第二实施例Second embodiment
如图2所示,本申请第二实施例提出一种大批量对比测试方法。在第二实 施例中,所述大批量对比测试方法的步骤与第一实施例的步骤相类似,主要区别在于在第一实施例的基础上增加了步骤S204和S210。该方法具体包括以下步骤:As shown in FIG. 2, the second embodiment of the present application proposes a large-scale comparison test method. In the second embodiment, the steps of the mass comparison test method are similar to those of the first embodiment, the main difference being that steps S204 and S210 are added on the basis of the first embodiment. The method specifically includes the following steps:
S200,设置大批量对比测试数据库的回滚点。S200, set the rollback point of the large batch comparison test database.
具体地,根据所设置的回滚点,当后续进行所述大批量对比测试数据库的回滚之后,所述大批量对比测试数据库中的数据状态将恢复到所述回滚点的状态。设置回滚点要注意时间,因为回滚是表示数据库状态的回滚,一旦回滚,数据及代码都会回滚。Specifically, according to the set rollback point, after the rollback of the large batch comparison test database is performed, the data state in the large batch comparison test database will be restored to the state of the rollback point. Pay attention to the time to set the rollback point, because the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
值得注意的是,由于运行完代码之后数据的状态会发生变化,若采用删除数据的方式进行前后版本的对比测试,可能存在数据删除不干净,影响对比测试的结果。而数据库回滚的方式能够保证对新版本代码进行测试时数据的状态和对旧版本代码进行测试时的数据状态相同,目的是确保对比结果的基础条件是一致的,确保对比测试的有效性。It is worth noting that the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test. The way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
在其他实施例中,所述步骤S200也可以在下述步骤S202之后执行。In other embodiments, the step S200 may also be performed after the step S202 described below.
S202,根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据。S202. Calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data.
具体地,在表tst_rbs_prem_due_tmp中抓取proc_flag=‘N’的数据,调用应收保费抽档的核心接口lifeman.rbs_prem_due_package.policy_due_draw_core生成应收数据,然后更新proc_flag的标志位为Y,避免重复抓取数据。Specifically, in the table tst_rbs_prem_due_tmp, the data of proc_flag='N' is captured, and the core interface lifeman.rbs_prem_due_package.policy_due_draw_core of the receivable premium is generated to generate the receivable data, and then the flag of the proc_flag is updated to Y, to avoid repeatedly fetching data. .
调用应收抽档核心接口之后,应收数据主要生成在prem_due表以及stat_prem_due表中。针对tst_rbs_prem_due_tmp中proc_flag=‘Y’的数据,在prem_due表中获取同一保单、同一应交日的信息及主要核对的字段,将要核对的字段组合成一个新的字段。同样在stat_prem_due表中也获取同一保单、同一应交日的信息及主要核对的字段。After calling the core interface of the receivable file, the receivable data is mainly generated in the prem_due table and the stat_prem_due table. For the data of proc_flag=‘Y’ in tst_rbs_prem_due_tmp, the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field. Also in the stat_prem_due table, the same policy, the same due date information and the main check field are obtained.
此处通过开关tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘N’控制为计算旧版本代码下的应收保费数据。所得到的第一结果数据写入表tst_prem_due_case_old中。Here, by the switch tst_rbs_control_table, control_id is PREM_DUE_DATA_OLD, and v_control_char = 'N' is controlled to calculate the premium data under the old version code. The obtained first result data is written in the table tst_prem_due_case_old.
S204,将所述第一结果数据导入到另一数据库中进行备份。S204. Import the first result data into another database for backup.
具体地,将表tst_prem_due_case_old的第一结果数据导入到另一个数据库 中,可以通过数据库链接(Database Link,dblink)的方式进行导入。因为当数据库回滚时,会将结果集也一起回滚,所以需要将结果集进行备份,之后再导回所述大批量对比测试库。Specifically, the first result data of the table tst_prem_due_case_old is imported into another database, and can be imported by means of a database link (Database Link, dblink). Because when the database is rolled back, the result set will also be rolled back together, so the result set needs to be backed up, and then returned to the large batch comparison test library.
S206,根据所设置的回滚点进行所述大批量对比测试数据库的回滚。S206. Perform rollback of the large batch comparison test database according to the set rollback point.
具体地,经过回滚之后,所述大批量对比测试数据库中的数据状态恢复到回滚点的状态。因此后续再次进行计算时的基础条件与计算所述第一结果数据时一致。Specifically, after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point. Therefore, the basic conditions when the calculation is performed again later are consistent with the calculation of the first result data.
S208,部署新版本代码后,再次计算应收保费,得到第二结果数据。S208: After deploying the new version code, calculate the premium receivable again to obtain the second result data.
具体地,当部署新版本代码到所述大批量对比测试数据库后,根据新版本代码再次计算应收保费。为了保证此处计算的是新版本代码下的应收保费数据,此时的开关是tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘Y’的状态。再次计算应收保费所得到的第二结果数据写入表tst_prem_due_case_new中。Specifically, when the new version code is deployed to the high-volume comparison test database, the premium receivable is recalculated based on the new version code. In order to ensure that the premium data under the new version code is calculated here, the switch at this time is tst_rbs_control_table, the control_id is PREM_DUE_DATA_OLD, and the state of v_control_char = 'Y'. The second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
与所述第一结果数据相对应地,所述第二结果数据中也包括在prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段,以及在stat_prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段。Corresponding to the first result data, the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
S210,将第一结果数据导回所述大批量对比测试数据库中。S210. The first result data is returned to the large batch comparison test database.
具体地,从所述另一数据库中将表tst_prem_due_case_old的第一结果数据通过dblink的方式导回到所述大批量对比测试库。Specifically, the first result data of the table tst_prem_due_case_old is returned to the large batch comparison test library by means of dblink from the another database.
S212,对比所述第一结果数据与第二结果数据,判断是否存在差异。S212. Compare the first result data with the second result data to determine whether there is a difference.
具体地,针对所述第一结果数据(tst_prem_due_case_old)与第二结果数据(tst_prem_due_case_new)进行对比分析,将分析出的差异写入表tst_rbs_exception中。核对完数据,需要更新相应保单和应交日的proc_flag为Y,表示已经核对过数据,以避免重复核对。Specifically, a comparison analysis is performed on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and the analyzed differences are written in the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
S214,对差异进行分析,判断是否为新版本代码的程序缺陷所导致。S214, analyzing the difference and determining whether it is caused by a program defect of the new version code.
具体地,通过对表tst_rbs_exception中的差异数据进行分析,判断异常原因,看是否是新版本代码的程序缺陷所导致的问题。如果是新版本代码的程序缺陷所导致的问题,则需要对所述新版本代码进行修复。Specifically, by analyzing the difference data in the table tst_rbs_exception, the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
在本实施例中,可以预先对新版本代码新增或变更的内容以及该新增或变 更的内容会对应收保费数据的哪些项目产生影响进行记录。当所述第一结果数据与第二结果数据存在差异时,通过分析所述差异是否属于该新增或变更的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增或变更的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增或变更的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。In this embodiment, the content added or changed in the new version code and the contents of the added or changed may be recorded in accordance with which items of the premium data are affected. When there is a difference between the first result data and the second result data, it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
本实施例所提出的大批量对比测试方法,采用数据库回滚的方式,执行大批量数据对比测试,先对旧版本进行应收保费计算,保存结果表并导入其他数据库中备份,之后进行数据库回滚,然后针对新版本接口的数据再次进行应收保费计算,保存结果表,对两次保存的结果表进行数据对比分析,可以减少测试人力以及增加测试覆盖面。并且,以数据库回滚的方式确保两次测试结果的基础条件一致,可以保障该对比测试的有效性。另外,对第一次计算的结果表进行备份可以保证该结果表不受数据库回滚的影响。The large-scale comparison test method proposed in this embodiment adopts a database rollback method to perform large-volume data comparison test, first performs the premium collection of the old version, saves the result table and imports it into other databases for backup, and then performs the database back. Roll, then perform the receivable premium calculation again for the data of the new version interface, save the result table, and compare and analyze the data of the two saved result tables, which can reduce the test manpower and increase the test coverage. Moreover, the basis of the database rollback ensures that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test. In addition, backing up the results table of the first calculation ensures that the result table is not affected by the database rollback.
第三实施例Third embodiment
如图3所示,本申请第三实施例提出一种大批量对比测试方法。在第三实施例中,所述大批量对比测试方法的步骤与第二实施例的步骤相类似,主要区别在于在第二实施例的基础上增加了步骤S300和步骤S302。该方法具体包括以下步骤:As shown in FIG. 3, the third embodiment of the present application proposes a mass comparison test method. In the third embodiment, the steps of the mass comparison test method are similar to those of the second embodiment, the main difference being that step S300 and step S302 are added on the basis of the second embodiment. The method specifically includes the following steps:
S300,设置获取基础数据的范围和时间。S300, set the range and time for obtaining the basic data.
具体地,设置抓取指定应交日范围的数据(一般是下个月),而抓取的时间可以设置相应程序开关进行控制,定期抓取一批基础数据。Specifically, the data of the specified delivery date range (generally the next month) is set, and the time of the capture can be set by controlling the corresponding program switch to periodically capture a batch of basic data.
S302,根据所设置的范围和时间获取基础数据到大批量对比测试数据库中。S302: Acquire basic data into the large-scale comparison test database according to the set range and time.
具体地,按照所设置的时间抓取指定应交日范围的数据,得到满足条件的基础数据,写入表tst_rbs_prem_due_tmp中。Specifically, the data of the specified due date range is fetched according to the set time, and the basic data satisfying the condition is obtained, and is written in the table tst_rbs_prem_due_tmp.
S304,设置所述大批量对比测试数据库的回滚点。S304. Set a rollback point of the large batch comparison test database.
具体地,根据所设置的回滚点,当后续进行所述大批量对比测试数据库的回滚之后,所述大批量对比测试数据库中的数据状态将恢复到所述回滚点的状态。设置回滚点要注意时间,因为回滚是表示数据库状态的回滚,一旦回滚,数据及代码都会回滚。Specifically, according to the set rollback point, after the rollback of the large batch comparison test database is performed, the data state in the large batch comparison test database will be restored to the state of the rollback point. Pay attention to the time to set the rollback point, because the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
值得注意的是,由于运行完代码之后数据的状态会发生变化,若采用删除数据的方式进行前后版本的对比测试,可能存在数据删除不干净,影响对比测试的结果。而数据库回滚的方式能够保证对新版本代码进行测试时数据的状态和对旧版本代码进行测试时的数据状态相同,目的是确保对比结果的基础条件是一致的,确保对比测试的有效性。It is worth noting that the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test. The way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
在其他实施例中,所述步骤S304也可以在下述步骤S306之后执行。In other embodiments, the step S304 can also be performed after the step S306 described below.
S306,根据所获取的基础数据计算应收保费,得到第一结果数据。S306. Calculate the premium receivable according to the obtained basic data, and obtain the first result data.
具体地,在表tst_rbs_prem_due_tmp中抓取proc_flag=‘N’的数据,调用应收保费抽档的核心接口lifeman.rbs_prem_due_package.policy_due_draw_core生成应收数据,然后更新proc_flag的标志位为Y,避免重复抓取数据。Specifically, in the table tst_rbs_prem_due_tmp, the data of proc_flag='N' is captured, and the core interface lifeman.rbs_prem_due_package.policy_due_draw_core of the receivable premium is generated to generate the receivable data, and then the flag of the proc_flag is updated to Y, to avoid repeatedly fetching data. .
调用应收抽档核心接口之后,应收数据主要生成在prem_due表以及stat_prem_due表中。针对tst_rbs_prem_due_tmp中proc_flag=‘Y’的数据,在prem_due表中获取同一保单、同一应交日的信息及主要核对的字段,将要核对的字段组合成一个新的字段。同样在stat_prem_due表中也获取同一保单、同一应交日的信息及主要核对的字段。After calling the core interface of the receivable file, the receivable data is mainly generated in the prem_due table and the stat_prem_due table. For the data of proc_flag=‘Y’ in tst_rbs_prem_due_tmp, the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field. Also in the stat_prem_due table, the same policy, the same due date information and the main check field are obtained.
此处通过开关tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘N’控制为计算旧版本代码下的应收保费数据。所得到的第一结果数据写入表tst_prem_due_case_old中。Here, by the switch tst_rbs_control_table, control_id is PREM_DUE_DATA_OLD, and v_control_char = 'N' is controlled to calculate the premium data under the old version code. The obtained first result data is written in the table tst_prem_due_case_old.
S308,将所述第一结果数据导入到另一数据库中进行备份。S308. Import the first result data into another database for backup.
具体地,将表tst_prem_due_case_old的第一结果数据导入到另一个数据库中,可以通过dblink的方式进行导入。因为当数据库回滚时,会将结果集也一起回滚,所以需要将结果集进行备份,之后再导回所述大批量对比测试库。Specifically, the first result data of the table tst_prem_due_case_old is imported into another database, and can be imported by means of dblink. Because when the database is rolled back, the result set will also be rolled back together, so the result set needs to be backed up, and then returned to the large batch comparison test library.
S310,根据所设置的回滚点进行所述大批量对比测试数据库的回滚。S310. Perform rollback of the large batch comparison test database according to the set rollback point.
具体地,经过回滚之后,所述大批量对比测试数据库中的数据状态恢复到回滚点的状态。因此后续再次进行计算时的基础条件与计算所述第一结果数据时一致。Specifically, after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point. Therefore, the basic conditions when the calculation is performed again later are consistent with the calculation of the first result data.
S312,部署新版本代码后,再次计算应收保费,得到第二结果数据。S312. After deploying the new version code, calculate the premium receivable again and obtain the second result data.
具体地,当部署新版本代码到所述大批量对比测试数据库后,根据新版本代码再次计算应收保费。为了保证此处计算的是新版本代码下的应收保费数据, 此时的开关是tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘Y’的状态。再次计算应收保费所得到的第二结果数据写入表tst_prem_due_case_new中。Specifically, when the new version code is deployed to the high-volume comparison test database, the premium receivable is recalculated based on the new version code. In order to ensure that the premium data under the new version code is calculated here, the switch at this time is tst_rbs_control_table, control_id is the state of PREM_DUE_DATA_OLD, and v_control_char = 'Y'. The second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
与所述第一结果数据相对应地,所述第二结果数据中也包括在prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段,以及在stat_prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段。Corresponding to the first result data, the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
S314,将第一结果数据导回所述大批量对比测试数据库中。S314, the first result data is returned to the large batch comparison test database.
具体地,从所述另一数据库中将表tst_prem_due_case_old的第一结果数据通过dblink的方式导回到所述大批量对比测试库。Specifically, the first result data of the table tst_prem_due_case_old is returned to the large batch comparison test library by means of dblink from the another database.
S316,对比所述第一结果数据与第二结果数据,判断是否存在差异。S316. Compare the first result data with the second result data to determine whether there is a difference.
具体地,针对所述第一结果数据(tst_prem_due_case_old)与第二结果数据(tst_prem_due_case_new)进行对比分析,将分析出的差异写入表tst_rbs_exception中。核对完数据,需要更新相应保单和应交日的proc_flag为Y,表示已经核对过数据,以避免重复核对。Specifically, a comparison analysis is performed on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and the analyzed differences are written in the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
S318,对差异进行分析,判断是否为新版本代码的程序缺陷所导致。S318, analyzing the difference to determine whether it is caused by a program defect of the new version code.
具体地,通过对表tst_rbs_exception中的差异数据进行分析,判断异常原因,看是否是新版本代码的程序缺陷所导致的问题。如果是新版本代码的程序缺陷所导致的问题,则需要对所述新版本代码进行修复。Specifically, by analyzing the difference data in the table tst_rbs_exception, the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
在本实施例中,可以预先对新版本代码新增或变更的内容以及该新增或变更的内容会对应收保费数据的哪些项目产生影响进行记录。当所述第一结果数据与第二结果数据存在差异时,通过分析所述差异是否属于该新增或变更的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增或变更的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增或变更的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。In this embodiment, the content added or changed in the new version code and the contents of the added or changed content may be recorded in accordance with which items of the premium data are affected. When there is a difference between the first result data and the second result data, it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
本实施例所提出的大批量对比测试方法,采用数据库回滚的方式,执行大批量数据对比测试,先对旧版本进行应收保费计算,保存结果表并导入其他数据库中备份,之后进行数据库回滚,然后针对新版本接口的数据再次进行应收保费计算,保存结果表,对两次保存的结果表进行数据对比分析,可以减少测试人力以及增加测试覆盖面。并且,以数据库回滚的方式确保两次测试结果的 基础条件一致,可以保障该对比测试的有效性。另外,对第一次计算的结果表进行备份可以保证该结果表不受数据库回滚的影响。The large-scale comparison test method proposed in this embodiment adopts a database rollback method to perform large-volume data comparison test, first performs the premium collection of the old version, saves the result table and imports it into other databases for backup, and then performs the database back. Roll, then perform the receivable premium calculation again for the data of the new version interface, save the result table, and compare and analyze the data of the two saved result tables, which can reduce the test manpower and increase the test coverage. Moreover, the database is rolled back to ensure that the basic conditions of the two test results are consistent, which can guarantee the effectiveness of the comparison test. In addition, backing up the results table of the first calculation ensures that the result table is not affected by the database rollback.
第四实施例Fourth embodiment
如图4所示,本申请第四实施例提出一种大批量对比测试系统40。As shown in FIG. 4, the fourth embodiment of the present application proposes a mass comparison test system 40.
在本实施例中,大批量对比测试系统40包括设置模块400、计算模块402、回滚模块404、对比模块406及分析模块408。In the present embodiment, the high-volume comparison test system 40 includes a setup module 400, a calculation module 402, a rollback module 404, a comparison module 406, and an analysis module 408.
所述设置模块400,用于设置大批量对比测试数据库的回滚点。The setting module 400 is configured to set a rollback point of the large batch comparison test database.
具体地,根据所设置的回滚点,当后续进行所述大批量对比测试数据库的回滚之后,所述大批量对比测试数据库中的数据状态将恢复到所述回滚点的状态。设置回滚点要注意时间,因为回滚是表示数据库状态的回滚,一旦回滚,数据及代码都会回滚。Specifically, according to the set rollback point, after the rollback of the large batch comparison test database is performed, the data state in the large batch comparison test database will be restored to the state of the rollback point. Pay attention to the time to set the rollback point, because the rollback is a rollback that indicates the state of the database. Once rolled back, the data and code will be rolled back.
值得注意的是,由于运行完代码之后数据的状态会发生变化,若采用删除数据的方式进行前后版本的对比测试,可能存在数据删除不干净,影响对比测试的结果。而数据库回滚的方式能够保证对新版本代码进行测试时数据的状态和对旧版本代码进行测试时的数据状态相同,目的是确保对比结果的基础条件是一致的,确保对比测试的有效性。It is worth noting that the status of the data will change after the code is run. If the data is deleted before and after the comparison test, the data deletion may be unclean and affect the results of the comparison test. The way the database is rolled back ensures that the state of the data when testing the new version of the code is the same as the state of the data when testing the old version of the code. The purpose is to ensure that the underlying conditions of the comparison result are consistent and to ensure the validity of the comparison test.
所述计算模块402,用于根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据。The calculating module 402 is configured to calculate the premium receivable according to the basic data in the large batch comparison test database to obtain the first result data.
具体地,在表tst_rbs_prem_due_tmp中抓取proc_flag=‘N’的数据,调用应收保费抽档的核心接口lifeman.rbs_prem_due_package.policy_due_draw_core生成应收数据,然后更新proc_flag的标志位为Y,避免重复抓取数据。Specifically, in the table tst_rbs_prem_due_tmp, the data of proc_flag='N' is captured, and the core interface lifeman.rbs_prem_due_package.policy_due_draw_core of the receivable premium is generated to generate the receivable data, and then the flag of the proc_flag is updated to Y, to avoid repeatedly fetching data. .
调用应收抽档核心接口之后,应收数据主要生成在prem_due表以及stat_prem_due表中。针对tst_rbs_prem_due_tmp中proc_flag=‘Y’的数据,在prem_due表中获取同一保单、同一应交日的信息及主要核对的字段,将要核对的字段组合成一个新的字段。同样在stat_prem_due表中也获取同一保单、同一应交日的信息及主要核对的字段。After calling the core interface of the receivable file, the receivable data is mainly generated in the prem_due table and the stat_prem_due table. For the data of proc_flag=‘Y’ in tst_rbs_prem_due_tmp, the same policy, the same due date information, and the main check field are obtained in the prem_due table, and the fields to be checked are combined into a new field. Also in the stat_prem_due table, the same policy, the same due date information and the main check field are obtained.
此处通过开关tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘N’控制为计算旧版本代码下的应收保费数据。所得到的第一 结果数据写入表tst_prem_due_case_old中。Here, by the switch tst_rbs_control_table, control_id is PREM_DUE_DATA_OLD, and v_control_char = 'N' is controlled to calculate the premium data under the old version code. The resulting first result data is written in the table tst_prem_due_case_old.
所述回滚模块404,用于根据所设置的回滚点进行所述大批量对比测试数据库的回滚。The rollback module 404 is configured to perform rollback of the large batch comparison test database according to the set rollback point.
具体地,经过回滚之后,所述大批量对比测试数据库中的数据状态恢复到回滚点的状态。因此后续再次进行计算时的基础条件与计算所述第一结果数据时一致。Specifically, after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point. Therefore, the basic conditions when the calculation is performed again later are consistent with the calculation of the first result data.
所述计算模块402,还用于当部署新版本代码后,再次计算应收保费,得到第二结果数据。The calculating module 402 is further configured to calculate the premium receivable again after the new version code is deployed, to obtain the second result data.
具体地,当部署新版本代码到所述大批量对比测试数据库后,计算模块402根据新版本代码再次计算应收保费。为了保证此处计算的是新版本代码下的应收保费数据,此时的开关是tst_rbs_control_table,control_id为PREM_DUE_DATA_OLD,v_control_char=‘Y’的状态。再次计算应收保费所得到的第二结果数据写入表tst_prem_due_case_new中。Specifically, after deploying the new version code to the high volume comparison test database, the calculation module 402 recalculates the premium receivable based on the new version code. In order to ensure that the premium data under the new version code is calculated here, the switch at this time is tst_rbs_control_table, the control_id is PREM_DUE_DATA_OLD, and the state of v_control_char = 'Y'. The second result data obtained by recalculating the premium receivable is written in the table tst_prem_due_case_new.
与所述第一结果数据相对应地,所述第二结果数据中也包括在prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段,以及在stat_prem_due表中获取的同一保单、同一应交日的信息及主要核对的字段。Corresponding to the first result data, the second result data also includes the same policy acquired in the prem_due table, the information of the same due date, the main check field, and the same policy obtained in the stat_prem_due table. , the same due date information and the main check field.
所述对比模块406,用于对比所述第一结果数据与第二结果数据,判断是否存在差异。The comparison module 406 is configured to compare the first result data with the second result data to determine whether there is a difference.
具体地,对比模块406针对所述第一结果数据(tst_prem_due_case_old)与第二结果数据(tst_prem_due_case_new)进行对比分析,将分析出的差异写入表tst_rbs_exception中。核对完数据,需要更新相应保单和应交日的proc_flag为Y,表示已经核对过数据,以避免重复核对。Specifically, the comparison module 406 performs a comparative analysis on the first result data (tst_prem_due_case_old) and the second result data (tst_prem_due_case_new), and writes the analyzed difference into the table tst_rbs_exception. After checking the data, you need to update the corresponding policy and the proc_flag of the due date to Y, indicating that the data has been checked to avoid repeated verification.
所述分析模块408,用于对差异进行分析,判断是否为新版本代码的程序缺陷所导致。The analysis module 408 is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
具体地,通过对表tst_rbs_exception中的差异数据进行分析,判断异常原因,看是否是新版本代码的程序缺陷所导致的问题。如果是新版本代码的程序缺陷所导致的问题,则需要对所述新版本代码进行修复。Specifically, by analyzing the difference data in the table tst_rbs_exception, the cause of the abnormality is determined to see if it is a problem caused by a program defect of the new version code. If it is a problem caused by a bug in the new version of the code, you need to fix the new version of the code.
在本实施例中,可以预先对新版本代码新增或变更的内容以及该新增或变更的内容会对应收保费数据的哪些项目产生影响进行记录。当所述第一结果数 据与第二结果数据存在差异时,通过分析所述差异是否属于该新增或变更的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增或变更的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增或变更的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。In this embodiment, the content added or changed in the new version code and the contents of the added or changed content may be recorded in accordance with which items of the premium data are affected. When there is a difference between the first result data and the second result data, it is determined whether it is a program defect by analyzing whether the difference belongs to an item affected by the added or changed content. If the difference belongs to an item affected by the added or changed content, it means that it is not a program defect, and the difference is ignored. If the difference does not belong to the item affected by the added or changed content, it means that the difference is a program defect and needs to be repaired.
进一步地,所述大批量对比测试系统40还可以包括:Further, the high volume comparison test system 40 may further include:
备份模块410,用于在回滚模块404进行所述大批量对比测试数据库的回滚之前,将所述第一结果数据导入到另一数据库中进行备份。The backup module 410 is configured to import the first result data into another database for backup before the rollback module 404 performs rollback of the large batch comparison test database.
具体地,备份模块410将表tst_prem_due_case_old的第一结果数据导入到另一个数据库中,可以通过dblink的方式进行导入。因为当数据库回滚时,会将结果集也一起回滚,所以需要将结果集进行备份,之后再导回所述大批量对比测试库。Specifically, the backup module 410 imports the first result data of the table tst_prem_due_case_old into another database, and can be imported by means of dblink. Because when the database is rolled back, the result set will also be rolled back together, so the result set needs to be backed up, and then returned to the large batch comparison test library.
所述备份模块410还用于当计算模块402得到第二结果数据之后,将第一结果数据导回所述大批量对比测试数据库中。The backup module 410 is further configured to, after the calculating module 402 obtains the second result data, import the first result data back into the large batch comparison test database.
具体地,备份模块410从所述另一数据库中将表tst_prem_due_case_old的第一结果数据通过dblink的方式导回到所述大批量对比测试库。Specifically, the backup module 410 imports the first result data of the table tst_prem_due_case_old from the another database to the large batch comparison test library by way of dblink.
更进一步地,所述设置模块400还用于设置获取基础数据的范围和时间。Further, the setting module 400 is further configured to set a range and time for acquiring basic data.
具体地,设置模块400设置抓取指定应交日范围的数据(一般是下个月),而抓取的时间可以设置相应程序开关进行控制,定期抓取一批基础数据。Specifically, the setting module 400 sets the data for grasping the specified delivery date range (generally the next month), and the time of the capture can be set by controlling the corresponding program switch to periodically capture a batch of basic data.
并且,所述大批量对比测试系统40还可以包括:Moreover, the high volume comparison test system 40 may further include:
获取模块412,用于根据设置模块400所设置的范围和时间获取基础数据到所述大批量对比测试数据库中。The obtaining module 412 is configured to obtain basic data into the large batch comparison test database according to the range and time set by the setting module 400.
具体地,获取模块412按照所设置的时间抓取指定应交日范围的数据,得到满足条件的基础数据,写入表tst_rbs_prem_due_tmp中。Specifically, the obtaining module 412 fetches the data of the specified delivery date according to the set time, and obtains basic data that satisfies the condition, and writes the data into the table tst_rbs_prem_due_tmp.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体 意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上参照附图说明了本申请的优选实施例,并非因此局限本申请的权利范围。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The preferred embodiments of the present application have been described above with reference to the drawings, and are not intended to limit the scope of the application. The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Additionally, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
本领域技术人员不脱离本申请的范围和实质,可以有多种变型方案实现本申请,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本申请的技术构思之内所作的任何修改、等同替换和改进,均应在本申请的权利范围之内。A person skilled in the art can implement the present application in various variants without departing from the scope and spirit of the present application. For example, the features as one embodiment can be used in another embodiment to obtain another embodiment. Any modifications, equivalent substitutions and improvements made within the technical concept of the application should be within the scope of the application.

Claims (20)

  1. 一种大批量对比测试方法,其特征在于,该方法包括步骤:A high-volume comparison test method, characterized in that the method comprises the steps of:
    设置大批量对比测试数据库的回滚点;Set the rollback point of the large batch comparison test database;
    根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据;Calculating the premium receivable according to the basic data in the large batch comparison test database, and obtaining the first result data;
    根据所设置的回滚点进行所述大批量对比测试数据库的回滚;Performing rollback of the large batch comparison test database according to the set rollback point;
    部署新版本代码后,再次计算应收保费,得到第二结果数据;After deploying the new version code, calculate the premium receivable again and get the second result data;
    对比所述第一结果数据与所述第二结果数据,判断是否存在差异;及Comparing the first result data with the second result data to determine whether there is a difference; and
    对所述差异进行分析,判断是否为新版本代码的程序缺陷所导致。The difference is analyzed to determine whether it is caused by a program defect of the new version code.
  2. 根据权利要求1所述的大批量对比测试方法,其特征在于,该方法还包括步骤:The high-volume comparison test method according to claim 1, further comprising the steps of:
    在进行所述大批量对比测试数据库的回滚之前,将所述第一结果数据导入到另一数据库中进行备份;及Importing the first result data into another database for backup before performing the rollback of the large batch comparison test database; and
    当得到所述第二结果数据之后,将所述第一结果数据导回所述大批量对比测试数据库中。After the second result data is obtained, the first result data is returned to the high volume comparison test database.
  3. 根据权利要求2所述的大批量对比测试方法,其特征在于,该方法还包括步骤:The high-volume comparison test method according to claim 2, wherein the method further comprises the steps of:
    设置获取所述基础数据的范围和时间;及Setting the scope and time for obtaining the basic data; and
    根据所设置的范围和时间获取所述基础数据到所述大批量对比测试数据库中。The basic data is obtained into the large batch comparison test database according to the set range and time.
  4. 根据权利要求3所述的大批量对比测试方法,其特征在于,所述获取基础数据的范围为指定应交日范围。The high-volume comparison test method according to claim 3, wherein the range of the acquisition basic data is a specified delivery date range.
  5. 根据权利要求1所述的大批量对比测试方法,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The large-scale comparison test method according to claim 1, wherein after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  6. 根据权利要求2所述的大批量对比测试方法,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The large-scale comparison test method according to claim 2, wherein after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  7. 根据权利要求3或4所述的大批量对比测试方法,其特征在于,经过所 述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The high-volume comparison test method according to claim 3 or 4, characterized in that after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  8. 一种大批量对比测试系统,其特征在于,该系统包括:A high volume comparison test system, characterized in that the system comprises:
    设置模块,用于设置大批量对比测试数据库的回滚点;Setting module for setting the rollback point of the large batch comparison test database;
    计算模块,用于根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据;a calculation module, configured to calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data;
    回滚模块,用于根据所设置的回滚点进行所述大批量对比测试数据库的回滚;a rollback module, configured to perform rollback of the large batch comparison test database according to the set rollback point;
    所述计算模块还用于部署新版本代码后,再次计算应收保费,得到第二结果数据;The calculation module is further configured to: after the new version code is deployed, calculate the premium receivable again to obtain the second result data;
    对比模块,用于对比所述第一结果数据与所述第二结果数据,判断是否存在差异;a comparison module, configured to compare the first result data with the second result data to determine whether there is a difference;
    分析模块,用于对所述差异进行分析,判断是否为新版本代码的程序缺陷所导致。An analysis module is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
  9. 根据权利要求8所述的大批量对比测试系统,其特征在于,该系统还包括:The high-volume comparison test system according to claim 8, wherein the system further comprises:
    备份模块,用于在进行所述大批量对比测试数据库的回滚之前,将所述第一结果数据导入到另一数据库中进行备份;及当得到所述第二结果数据之后,将所述第一结果数据导回所述大批量对比测试数据库中。a backup module, configured to import the first result data into another database for backup before performing the rollback of the large batch comparison test database; and, after obtaining the second result data, the first A result data is returned to the bulk comparison test database.
  10. 根据权利要求9所述的大批量对比测试系统,其特征在于,所述系统还包括获取模块,其中:The high volume comparison test system of claim 9 wherein said system further comprises an acquisition module, wherein:
    所述设置模块还用于设置获取所述基础数据的范围和时间;The setting module is further configured to set a range and time for acquiring the basic data;
    所述获取模块,用于根据所设置的范围和时间获取所述基础数据到所述大批量对比测试数据库中。The obtaining module is configured to acquire the basic data into the large batch comparison test database according to the set range and time.
  11. 根据权利要求10所述的大批量对比测试系统,其特征在于,所述获取基础数据的范围为指定应交日范围。The high-volume comparison test system according to claim 10, wherein the range of the acquisition basic data is a specified delivery date range.
  12. 根据权利要求8所述的大批量对比测试系统,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The large batch comparison test system according to claim 8, wherein after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  13. 根据权利要求9所述的大批量对比测试系统,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The high-volume comparison test system according to claim 9, wherein after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  14. 根据权利要求10或11所述的大批量对比测试系统,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The large batch comparison test system according to claim 10 or 11, wherein after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  15. 一种计算机可读存储介质,所述计算机可读存储介质内存储有大批量对比测试系统,其特征在于,该大批量对比测试系统包括:A computer readable storage medium, wherein the computer readable storage medium stores a large batch comparison test system, wherein the large batch comparison test system comprises:
    设置模块,用于设置大批量对比测试数据库的回滚点;Setting module for setting the rollback point of the large batch comparison test database;
    计算模块,用于根据所述大批量对比测试数据库中的基础数据计算应收保费,得到第一结果数据;a calculation module, configured to calculate the premium receivable according to the basic data in the large batch comparison test database, and obtain the first result data;
    回滚模块,用于根据所设置的回滚点进行所述大批量对比测试数据库的回滚;a rollback module, configured to perform rollback of the large batch comparison test database according to the set rollback point;
    所述计算模块还用于部署新版本代码后,再次计算应收保费,得到第二结果数据;The calculation module is further configured to: after the new version code is deployed, calculate the premium receivable again to obtain the second result data;
    对比模块,用于对比所述第一结果数据与所述第二结果数据,判断是否存在差异;a comparison module, configured to compare the first result data with the second result data to determine whether there is a difference;
    分析模块,用于对所述差异进行分析,判断是否为新版本代码的程序缺陷所导致。An analysis module is configured to analyze the difference and determine whether it is caused by a program defect of the new version code.
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,该大批量对比测试系统还包括:The computer readable storage medium according to claim 15, wherein the large batch comparison test system further comprises:
    备份模块,用于在进行所述大批量对比测试数据库的回滚之前,将所述第一结果数据导入到另一数据库中进行备份;及当得到所述第二结果数据之后,将所述第一结果数据导回所述大批量对比测试数据库中。a backup module, configured to import the first result data into another database for backup before performing the rollback of the large batch comparison test database; and, after obtaining the second result data, the first A result data is returned to the bulk comparison test database.
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述大批量对比测试系统还包括获取模块,其中:The computer readable storage medium of claim 16 wherein said high volume comparison test system further comprises an acquisition module, wherein:
    所述设置模块还用于设置获取所述基础数据的范围和时间;The setting module is further configured to set a range and time for acquiring the basic data;
    所述获取模块,用于根据所设置的范围和时间获取所述基础数据到所述大批量对比测试数据库中。The obtaining module is configured to acquire the basic data into the large batch comparison test database according to the set range and time.
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述获取基础数据的范围为指定应交日范围。The computer readable storage medium according to claim 17, wherein the range of the acquisition base data is a specified due date range.
  19. 根据权利要求15所述的计算机可读存储介质,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The computer readable storage medium according to claim 15, wherein after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
  20. 根据权利要求16-18任一项所述的计算机可读存储介质,其特征在于,经过所述回滚之后,所述大批量对比测试数据库中的数据状态恢复到所述回滚点的状态。The computer readable storage medium according to any one of claims 16 to 18, characterized in that, after the rollback, the data state in the large batch comparison test database is restored to the state of the rollback point.
PCT/CN2018/085723 2017-05-05 2018-05-04 Mass comparison test method and system WO2018202172A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710312328.0A CN107870859B (en) 2017-05-05 2017-05-05 Large-batch comparison test method and system
CN201710312328.0 2017-05-05

Publications (1)

Publication Number Publication Date
WO2018202172A1 true WO2018202172A1 (en) 2018-11-08

Family

ID=61761487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/085723 WO2018202172A1 (en) 2017-05-05 2018-05-04 Mass comparison test method and system

Country Status (2)

Country Link
CN (1) CN107870859B (en)
WO (1) WO2018202172A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381661A (en) * 2020-11-27 2021-02-19 深圳市慧择时代科技有限公司 Method and device for determining similarity of insurance products

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870859B (en) * 2017-05-05 2021-04-27 平安科技(深圳)有限公司 Large-batch comparison test method and system
CN109032930A (en) * 2018-07-03 2018-12-18 泰康保险集团股份有限公司 System detection method and device
US11093379B2 (en) 2019-07-22 2021-08-17 Health Care Service Corporation Testing of complex data processing systems
CN110471859A (en) * 2019-09-12 2019-11-19 泰康保险集团股份有限公司 Service test method, device, medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556550A (en) * 2009-05-22 2009-10-14 北京星网锐捷网络技术有限公司 Analysis method for automatic test log and device
CN104765692A (en) * 2015-04-29 2015-07-08 北京嘀嘀无限科技发展有限公司 Method and equipment for automatically testing software
CN106201886A (en) * 2016-07-18 2016-12-07 合网络技术(北京)有限公司 The Proxy Method of the checking of a kind of real time data task and device
CN107870859A (en) * 2017-05-05 2018-04-03 平安科技(深圳)有限公司 High-volume contrast test method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8037360B2 (en) * 2006-10-03 2011-10-11 Symantec Corporation Software testing framework for multiple operating system, hardware, and software configurations
CN103631705B (en) * 2012-08-24 2018-01-05 百度在线网络技术(北京)有限公司 A kind of regression testing method and device for search engine
CN104182344B (en) * 2014-08-25 2017-02-15 腾讯科技(深圳)有限公司 Overwrite installation testing method and overwrite installation testing device
CN105068893A (en) * 2015-08-26 2015-11-18 国家电网公司 Database state restoration method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556550A (en) * 2009-05-22 2009-10-14 北京星网锐捷网络技术有限公司 Analysis method for automatic test log and device
CN104765692A (en) * 2015-04-29 2015-07-08 北京嘀嘀无限科技发展有限公司 Method and equipment for automatically testing software
CN106201886A (en) * 2016-07-18 2016-12-07 合网络技术(北京)有限公司 The Proxy Method of the checking of a kind of real time data task and device
CN107870859A (en) * 2017-05-05 2018-04-03 平安科技(深圳)有限公司 High-volume contrast test method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381661A (en) * 2020-11-27 2021-02-19 深圳市慧择时代科技有限公司 Method and device for determining similarity of insurance products
CN112381661B (en) * 2020-11-27 2024-01-30 深圳市慧择时代科技有限公司 Insurance product similarity determination method and apparatus

Also Published As

Publication number Publication date
CN107870859B (en) 2021-04-27
CN107870859A (en) 2018-04-03

Similar Documents

Publication Publication Date Title
WO2018202172A1 (en) Mass comparison test method and system
CN107908494B (en) Abnormal event processing method and device, electronic equipment and storage medium
KR102033971B1 (en) Data quality analysis
WO2019153471A1 (en) Data table query method and apparatus, terminal device and storage medium
CN109117172B (en) Method and device for identifying terminal version number of target terminal
CN110737594B (en) Database standard conformance testing method and device for automatically generating test cases
CN109388671B (en) Data processing method, device, equipment and storage medium
CN111131290B (en) Flow data processing method and device
CN110704873A (en) Method and system for preventing sensitive data from being leaked
WO2018202174A1 (en) Version comparison testing method and system
JP2013134521A (en) Analysis result evaluation system, analysis result evaluation method and analysis result evaluation program
CN111291051A (en) Freight rate data processing method and device, storage medium and electronic equipment
US9787534B1 (en) System, method, and computer program for generating event tests associated with a testing project
US9870418B2 (en) Application cache profiler
CN116823464B (en) Data asset management platform, electronic device, and computer-readable storage medium
CN110502529B (en) Data processing method, device, server and storage medium
US9743301B1 (en) Systems and methods for maintaining a telecommunications network using real-time SQL analysis
CN112084262A (en) Data information screening method and device, computer equipment and storage medium
CN110968569A (en) Database management method, database management device, and storage medium
WO2019062087A1 (en) Attendance check data testing method, terminal and device, and computer readable storage medium
CN113448855A (en) Database version package detection method and device
CN114186874A (en) Flow playback-based wind control strategy configuration method, device, equipment and medium
CN110633165B (en) Fault processing method, device, system server and computer readable storage medium
CN113010208A (en) Version information generation method, version information generation device, version information generation equipment and storage medium
JP5772246B2 (en) Filter processing management device, filter processing management method, filter processing management program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18794667

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/02/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18794667

Country of ref document: EP

Kind code of ref document: A1