WO2018202174A1 - 版本对比测试方法及系统 - Google Patents
版本对比测试方法及系统 Download PDFInfo
- Publication number
- WO2018202174A1 WO2018202174A1 PCT/CN2018/085727 CN2018085727W WO2018202174A1 WO 2018202174 A1 WO2018202174 A1 WO 2018202174A1 CN 2018085727 W CN2018085727 W CN 2018085727W WO 2018202174 A1 WO2018202174 A1 WO 2018202174A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- commission
- version
- difference
- test
- target table
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/368—Test management for test version control, e.g. updating test cases to a new software version
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/105—Human resources
Definitions
- the present application relates to the field of database technologies, and in particular, to a version comparison test method and system.
- the functional test case will cover the function points of this modification, but will not design a test case that covers all function points in full, so that other function points cannot be verified. , can not guarantee the correct or not. If the assessment of requirements during development or testing is not thorough or negligent, it will lead to very serious financial problems, which will affect business satisfaction and company image.
- the purpose of the present application is to provide a version comparison test method and system to solve the problem of how to implement large-scale comparison test of commission data.
- the present application provides a version comparison test method, the method comprising the steps of:
- the difference is analyzed to determine whether the difference is due to a program defect of the new version code.
- the present application also provides a version comparison test system, the system comprising:
- a calculation module configured to perform a commission calculation of the current version in the commission algorithm test library to obtain a reference table; and deploy the new version code to the commission algorithm test library, perform commission calculation again, and obtain a target table;
- a comparison module configured to compare whether the reference table and the target table are different
- An analysis module is configured to analyze the difference and determine whether the difference is caused by a program defect of the new version code.
- the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a version comparison test system, and the version comparison test system includes:
- a calculation module configured to perform a commission calculation of the current version in the commission algorithm test library to obtain a reference table; and deploy the new version code to the commission algorithm test library, perform commission calculation again, and obtain a target table;
- a comparison module configured to compare whether the reference table and the target table are different
- An analysis module is configured to analyze the difference and determine whether the difference is caused by a program defect of the new version code.
- the version comparison test method, system and computer readable storage medium proposed by the present application can perform commission calculation for two versions before and after, obtain a reference table and a target table, and analyze whether the program is a new version code by comparing the difference between the two tables. defect.
- the system uses the production-proven data in the production environment as a benchmark to verify the correctness of the data in the test environment, which can prevent the functional test cases from covering some special functions and hidden problems that cannot be found by functional tests.
- the benchmark table is updated after each test, and the data to be verified in the later test environment is compared with the new benchmark table.
- FIG. 1 is a flowchart of a version comparison test method according to a first embodiment of the present application
- FIG. 2 is a flowchart of a version comparison test method according to a second embodiment of the present application.
- FIG. 3 is a flowchart of a version comparison test method according to a third embodiment of the present application.
- FIG. 4 is a schematic block diagram of a version comparison test system according to a fourth embodiment of the present application.
- the first embodiment of the present application provides a version comparison test method, which includes the following steps:
- the commission calculation process is executed in the commission algorithm test library, and the calculated intermediate table, the schedule, and the final result table are backed up as a reference table after the calculation is completed.
- the commission calculation process of the commission algorithm test library is executed again 2-3 days before the function test is completed or the version is to be delivered to the production environment, and then the same will be performed.
- the calculated intermediate table, schedule, and final result table are backed up as the target table.
- the reference table is compared with the target table by the same query condition to determine whether there is a difference. For example, in the reference table and the target table, the total commission of the same employee in the same month is queried, and the result of the inquiry is compared to determine whether there is a difference.
- the difference is analyzed to find out where the problem lies and whether it is a program defect. If the difference is due to new content in the new version, the difference is ignored and the target table is updated to the baseline table for comparison testing of the next version. If the difference is due to a bug in the program of the new version of the code, it means that the new version of the code needs to be fixed.
- the new version adds a subsidy type A, which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- a subsidy type A which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- the version comparison test method proposed in this embodiment can perform two commission calculations for the two versions before and after, and obtain the reference table and the target table. By comparing the difference analysis between the two tables, it is a program defect, and the case of preventing the functional test is not covered. Some special features, and hidden problems that cannot be discovered by functional tests.
- the second embodiment of the present application provides a version comparison test method.
- the steps of the version comparison test method are similar to those of the first embodiment, the main difference being that step S208 is added to the first embodiment.
- the method specifically includes the following steps:
- the commission calculation process is executed in the commission algorithm test library, and the calculated intermediate table, the schedule, and the final result table are backed up as a reference table after the calculation.
- the commission calculation process of the commission algorithm test library is executed again 2-3 days before the function test is completed or the version is to be delivered to the production environment, and then the same will be performed.
- the calculated intermediate table, schedule, and final result table are backed up as the target table.
- the reference table is compared with the target table by the same query condition to determine whether there is a difference. For example, in the benchmark table and the target table, the total commission of the same employee in the same month is queried, and the query result is compared to determine whether there is a difference.
- the difference is analyzed to find out where the problem lies and whether it is a program defect. If the difference is due to new content in the new version, the difference is ignored and the target table is updated to the baseline table for comparison testing of the next version.
- the new version adds a subsidy type A, which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- a subsidy type A which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- the repaired code is again deployed to the commission algorithm test library, and then the commission calculation process is executed again to obtain a new target table. Then, whether there is a difference between the reference table and the new target table, the difference is analyzed to determine whether it is a program defect. After the defect repair verification passes and there are no other exceptions, the new target table is updated to the reference table for comparison test of the next version.
- the version comparison test method proposed in this embodiment can perform two commission calculations for the two versions before and after, and obtain the reference table and the target table, and compare whether the difference between the two tables is a program defect. Moreover, using the production-proven data in the production environment as a benchmark to verify the correctness of the test environment data can prevent the functional test case from covering some special functions and hidden problems that cannot be found by functional tests.
- the third embodiment of the present application provides a version comparison test method.
- the steps of the version 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:
- an organization library is redirected from the production environment to the test environment as a commission algorithm test library.
- the commission algorithm test library is not included in the functional test or system test, nor is it included in the functional test or system test. It will allow modification of the business data inside to ensure the consistency and integrity of the data.
- the preset commission calculation rules for example, the policy commissions and allowances sold by the salesperson in the previous month are generally calculated in the current month, and the payment time of the allowance may be once a quarter, some once every six months, some are one Once a year), select all the data of a certain month and an organization as the test range.
- S304 Perform a commission calculation of the current version according to the selected test range to obtain a reference table.
- the commission calculation process is executed in the commission algorithm test library, and the calculated intermediate table, the schedule, and the final result table are backed up as a reference table after the calculation is completed.
- the commission calculation process of the commission algorithm test library is executed again 2-3 days before the function test is completed or the version is to be delivered to the production environment, and then the same will be performed.
- the calculated intermediate table, schedule, and final result table are backed up as the target table.
- the reference table is compared with the target table by the same query condition to determine whether there is a difference. For example, in the benchmark table and the target table, the total commission of the same employee in the same month is queried, and the query result is compared to determine whether there is a difference.
- the difference is analyzed to find out where the problem lies and whether it is a program defect. If the difference is due to new content in the new version, the difference is ignored and the target table is updated to the baseline table for comparison testing of the next version.
- the new version adds a subsidy type A, which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- a subsidy type A which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- the repaired code is again deployed to the commission algorithm test library, and then the commission calculation process is executed again to obtain a new target table. Then, whether there is a difference between the reference table and the new target table, the difference is analyzed to determine whether it is a program defect. After the defect is fixed and verified and there are no other exceptions, the new target table is updated to the baseline table for comparison testing of the next version.
- the version comparison test method proposed in this embodiment can perform two commission calculations for the two versions before and after, and obtain the reference table and the target table, and compare whether the difference between the two tables is a program defect. Moreover, using the production-proven data in the production environment as a benchmark to verify the correctness of the test environment data can prevent the functional test case from covering some special functions and hidden problems that cannot be found by functional tests. In addition, the benchmark table is updated after each test, and the data to be verified in the later test environment is compared with the new benchmark table.
- a fourth embodiment of the present application proposes a version comparison test system 40.
- the version comparison test system 40 includes a calculation module 404, a comparison module 406, and an analysis module 408.
- the calculating module 404 is configured to perform a commission calculation of the current version in the commission algorithm test library to obtain a reference table.
- the commission calculation process is executed in the commission algorithm test library, and the calculated intermediate table, the schedule, and the final result table are backed up as a reference table after the calculation is completed.
- the calculation module 404 is further configured to deploy the new version code to the commission algorithm test library, perform the commission calculation again, and obtain the target table.
- the commission calculation process of the commission algorithm test library is executed again 2-3 days before the function test is completed or the version is to be delivered to the production environment, and then the same will be performed.
- the calculated intermediate table, schedule, and final result table are backed up as the target table.
- the comparison module 406 is configured to compare whether the reference table and the target table are different.
- the reference table is compared with the target table by the same query condition to determine whether there is a difference. For example, in the benchmark table and the target table, the total commission of the same employee in the same month is queried, and the query result is compared to determine whether there is a difference.
- the analyzing module 408 is configured to analyze the difference and determine whether it is a program defect.
- the difference is analyzed to find out where the problem lies and whether it is a program defect. If the difference is due to new content in the new version, the difference is ignored and the target table is updated to the baseline table for comparison testing of the next version. If the difference is due to a bug in the program of the new version of the code, it means that the new version of the code needs to be fixed.
- the new version adds a subsidy type A, which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- a subsidy type A which affects the calculation of the amount of commission for each employee under subsidy type A, the commission amount under the total subsidy, and the commission amount under the total commission.
- version comparison test system 40 may further include:
- the repair module 410 is configured to perform defect repair and re-verification when the analysis module 408 determines that the difference is a program defect.
- the repair module 410 reports the defect and repairs it, and then deploys the repaired code to the commission algorithm test library again.
- the calculation module 404 then performs the commission calculation process again to obtain a new target table.
- the comparison module 406 compares whether the reference table and the new target table differ.
- the analysis module 408 analyzes the difference to determine whether it is a program defect. When the defect repair verification passes and there is no other abnormality, the new target table is updated to the reference table for comparison test of the next version.
- version comparison test system 40 may further include:
- the deployment module 400 is configured to deploy a commission algorithm test library.
- an organization library is redirected from the production environment to the test environment as a commission algorithm test library.
- the commission algorithm test library is not included in the functional test or system test, nor is it included in the functional test or system test. It will allow modification of the business data inside to ensure the consistency and integrity of the data. In order to prevent business information from being exposed, it is also necessary to block sensitive information in some tables.
- the selection module 402 is configured to select a test range according to a preset rule.
- the policy commissions and allowances sold by the salesperson in the previous month are generally calculated in the current month, and the payment time of the allowance may be once a quarter, some once every six months, some are one Once a year), select all the data of a certain month and an organization as the test range.
- the calculation module 404 then performs a commission calculation of the current version based on the test range selected by the selection module 402.
- 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.
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Entrepreneurship & Innovation (AREA)
- Strategic Management (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Economics (AREA)
- Marketing (AREA)
- Operations Research (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
本申请公开了一种版本对比测试方法及系统,该方法包括:在佣金算法测试库进行当前版本的佣金计算,得到基准表;将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;对比所述基准表和所述目标表是否有差异;对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。由此可以实现对佣金数据的大批量对比测试。
Description
本申请要求于2017年5月5日提交中国专利局,申请号为2017103119853、发明名称为“版本对比测试方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及数据库技术领域,尤其涉及版本对比测试方法及系统。
目前在测试业务员佣金系统时,由于业务制定的规则非常复杂,功能开关数量很多,而且涉及到很多功能点和验证点。业务的需求中对某个小的功能点优化,开发阶段修改这个功能点后,往往会影响到其他很多的功能点。
现有的针对佣金数据的版本测试技术中,在系统测试阶段,功能测试案例会覆盖本次修改的功能点,但是不会设计出全量覆盖所有功能点的测试案例,这样其他功能点就无法验证,无法保证正确与否。如果开发或者测试过程中对需求的评估不彻底或者疏忽,就会导致非常严重的资金问题,对业务满意度、公司形象造成影响。
发明内容
有鉴于此,本申请的目的在于提供一种版本对比测试方法及系统,以解决如何实现对佣金数据的大批量对比测试的问题。
为实现上述目的,本申请提供一种版本对比测试方法,该方法包括步骤:
在佣金算法测试库进行当前版本的佣金计算,得到基准表;
将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;
对比所述基准表和所述目标表是否有差异;及
对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。
为实现上述目的,本申请还提出一种版本对比测试系统,该系统包括:
计算模块,用于在佣金算法测试库进行当前版本的佣金计算,得到基准表;以及将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;
对比模块,用于对比所述基准表和所述目标表是否有差异;
分析模块,用于对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。
为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质内存储有版本对比测试系统,所述版本对比测试系统包括:
计算模块,用于在佣金算法测试库进行当前版本的佣金计算,得到基准表;以及将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;
对比模块,用于对比所述基准表和所述目标表是否有差异;
分析模块,用于对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。
本申请提出的版本对比测试方法、系统及计算机可读存储介质,可以针对前后两个版本进行两次佣金计算,得到基准表和目标表,通过对比两表的差异分析是否为新版本代码的程序缺陷。并且,该系统利用生产环境中经过生产验证的数据作为基准来验证测试环境的数据正确与否,可以防止功能测试的案例未覆盖到一些特殊的功能,及功能测试无法发现的隐蔽问题。另外,每次测试后都会更新基准表,后面测试环境需要验证的数据都以新的基准表为参考来进行对比。
图1为本申请第一实施例提出的一种版本对比测试方法的流程图;
图2为本申请第二实施例提出的一种版本对比测试方法的流程图;
图3为本申请第三实施例提出的一种版本对比测试方法的流程图;
图4为本申请第四实施例提出的一种版本对比测试系统的模块示意图;
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
为了使本申请所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
第一实施例
如图1所示,本申请第一实施例提出一种版本对比测试方法,该方法包括以下步骤:
S100,在佣金算法测试库进行当前版本的佣金计算,得到基准表。
具体地,在新版本代码部署到佣金算法测试库之前,在佣金算法测试库执行佣金计算过程,计算完毕后将计算的中间表、明细表和最终结果表备份,作为基准表。
S102,将新版本代码部署到佣金算法测试库后,再次进行佣金计算,得到目标表。
具体地,当要下发的新版本代码全部部署到佣金算法测试库后,在功能测试完毕或者版本要下发生产环境前2-3天再次执行佣金算法测试库的佣金计算过程,然后同样将计算的中间表、明细表和最终结果表备份,作为目标表。
S104,对比基准表和目标表是否有差异。
具体地,通过同样的查询条件对基准表与目标表做对比,判断是否有差异。例如,在所述基准表和所述目标表中查询同一员工同一月份的总佣金,对比查 询结果,判断是否有差异。
S106,对差异进行分析,判断是否为程序缺陷。
具体地,当所述基准表和目标表存在差异时,通过对差异进行分析,找出问题的所在,看是否为程序缺陷。如果该差异是由于新版本新增的内容导致的,则忽略该差异,并将所述目标表更新为基准表,以备进行下次版本的对比测试。如果该差异是由于新版本代码的程序缺陷导致的,则表示所述新版本代码需要进行修复。
在本实施例中,可以预先对新版本新增的内容以及该新增的内容会对中间表、明细表和最终结果表的哪些项目产生影响进行记录。例如,新版本新增了补贴种类A,会影响对每一员工在补贴种类A下的佣金金额、总补贴下的佣金金额、总佣金下的佣金金额等项目的计算。当所述基准表和目标表存在差异时,通过分析所述差异是否属于该新增的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。
本实施例所提出的版本对比测试方法,可以针对前后两个版本进行两次佣金计算,得到基准表和目标表,通过对比两表的差异分析是否为程序缺陷,防止功能测试的案例未覆盖到一些特殊的功能,及功能测试无法发现的隐蔽问题。
第二实施例
如图2所示,本申请第二实施例提出一种版本对比测试方法。在第二实施例中,所述版本对比测试方法的步骤与第一实施例的步骤相类似,主要区别在于在第一实施例的基础上增加了步骤S208。该方法具体包括以下步骤:
S200,针对佣金算法测试库进行当前版本的佣金计算,得到基准表。
具体地,在新版本代码部署到佣金算法测试库之前,在佣金算法测试库执行佣金计算过程,计算完毕后将计算的中间表、明细表和最终结果表备份,作 为基准表。
S202,将新版本代码部署到佣金算法测试库后,再次进行佣金计算,得到目标表。
具体地,当要下发的新版本代码全部部署到佣金算法测试库后,在功能测试完毕或者版本要下发生产环境前2-3天再次执行佣金算法测试库的佣金计算过程,然后同样将计算的中间表、明细表和最终结果表备份,作为目标表。
S204,对比基准表和目标表是否有差异。
具体地,通过同样的查询条件对基准表与目标表做对比,判断是否有差异。例如,在所述基准表和所述目标表中查询同一员工同一月份的总佣金,对比查询结果,判断是否有差异。
S206,对差异进行分析,判断是否为程序缺陷。
具体地,当所述基准表和目标表存在差异时,通过对差异进行分析,找出问题的所在,看是否为程序缺陷。如果该差异是由于新版本新增的内容导致的,则忽略该差异,并将所述目标表更新为基准表,以备进行下次版本的对比测试。
在本实施例中,可以预先对新版本新增的内容以及该新增的内容会对中间表、明细表和最终结果表的哪些项目产生影响进行记录。例如,新版本新增了补贴种类A,会影响对每一员工在补贴种类A下的佣金金额、总补贴下的佣金金额、总佣金下的佣金金额等项目的计算。当所述基准表和目标表存在差异时,通过分析所述差异是否属于该新增的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。
S208,当为程序缺陷时,进行缺陷修复和重新验证。
具体地,如果是程序缺陷,则上报缺陷并修复后,再次把修复的代码部署到佣金算法测试库,然后再次执行佣金计算过程,得到新的目标表。然后对比所述基准表和新的目标表是否有差异,对差异进行分析,判断是否为程序缺陷。 缺陷修复验证通过且无其他异常后,将该新的目标表更新为基准表,以备进行下次版本的对比测试。
本实施例所提出的版本对比测试方法,可以针对前后两个版本进行两次佣金计算,得到基准表和目标表,通过对比两表的差异分析是否为程序缺陷。并且,利用生产环境中经过生产验证的数据作为基准来验证测试环境的数据正确与否,可以防止功能测试的案例未覆盖到一些特殊的功能,及功能测试无法发现的隐蔽问题。
第三实施例
如图3所示,本申请第三实施例提出一种版本对比测试方法。在第三实施例中,所述版本对比测试方法的步骤与第二实施例的步骤相类似,主要区别在于在第二实施例的基础上增加了步骤S300和步骤S302。该方法具体包括以下步骤:
S300,部署佣金算法测试库。
具体地,从生产环境重导一个机构库到测试环境,作为佣金算法测试库。为了防止在做功能测试或者系统测试时修改佣金算法测试库中业务表的数据,导致对比出现差异,所述佣金算法测试库作为特殊库存在,不会纳入到功能测试或者系统测试中,也不会允许修改里面的业务数据,保证数据的一致性和完整性。
进一步地,为了防止业务信息外露,还需要屏蔽一些表中的敏感信息。
S302,根据预设规则选择测试范围。
具体地,根据预设的佣金计算规则(例如一般在当前月计算上个月业务员所销售的保单佣金和津贴,且津贴的发放时间可能有些是一个季度一次、有些是半年一次、有些是一年一次),选取固定某个月、某个机构的所有数据作为测试范围。
S304,根据选择的测试范围进行当前版本的佣金计算,得到基准表。
具体地,在新版本代码部署到佣金算法测试库之前,在佣金算法测试库执行佣金计算过程,计算完毕后将计算的中间表、明细表和最终结果表备份,作为基准表。
S306,将新版本代码部署到佣金算法测试库后,再次进行佣金计算,得到目标表。
具体地,当要下发的新版本代码全部部署到佣金算法测试库后,在功能测试完毕或者版本要下发生产环境前2-3天再次执行佣金算法测试库的佣金计算过程,然后同样将计算的中间表、明细表和最终结果表备份,作为目标表。
S308,对比基准表和目标表是否有差异。
具体地,通过同样的查询条件对基准表与目标表做对比,判断是否有差异。例如,在所述基准表和所述目标表中查询同一员工同一月份的总佣金,对比查询结果,判断是否有差异。
S310,对差异进行分析,判断是否为程序缺陷。
具体地,当所述基准表和目标表存在差异时,通过对差异进行分析,找出问题的所在,看是否为程序缺陷。如果该差异是由于新版本新增的内容导致的,则忽略该差异,并将所述目标表更新为基准表,以备进行下次版本的对比测试。
在本实施例中,可以预先对新版本新增的内容以及该新增的内容会对中间表、明细表和最终结果表的哪些项目产生影响进行记录。例如,新版本新增了补贴种类A,会影响对每一员工在补贴种类A下的佣金金额、总补贴下的佣金金额、总佣金下的佣金金额等项目的计算。当所述基准表和目标表存在差异时,通过分析所述差异是否属于该新增的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。
S312,当为程序缺陷时,进行缺陷修复和重新验证。
具体地,如果是程序缺陷,则上报缺陷并修复后,再次把修复的代码部署 到佣金算法测试库,然后再次执行佣金计算过程,得到新的目标表。然后对比所述基准表和新的目标表是否有差异,对差异进行分析,判断是否为程序缺陷。缺陷修复并验证通过且无其他异常后,将该新的目标表更新为基准表,以备进行下次版本的对比测试。
本实施例所提出的版本对比测试方法,可以针对前后两个版本进行两次佣金计算,得到基准表和目标表,通过对比两表的差异分析是否为程序缺陷。并且,利用生产环境中经过生产验证的数据作为基准来验证测试环境的数据正确与否,可以防止功能测试的案例未覆盖到一些特殊的功能,及功能测试无法发现的隐蔽问题。另外,每次测试后都会更新基准表,后面测试环境需要验证的数据都以新的基准表为参考来进行对比。
第四实施例
如图4所示,本申请第四实施例提出一种版本对比测试系统40。
在本实施例中,版本对比测试系统40包括计算模块404、对比模块406及分析模块408。
所述计算模块404,用于在佣金算法测试库进行当前版本的佣金计算,得到基准表。
具体地,在新版本代码部署到佣金算法测试库之前,在佣金算法测试库执行佣金计算过程,计算完毕后将计算的中间表、明细表和最终结果表备份,作为基准表。
所述计算模块404还用于将新版本代码部署到佣金算法测试库后,再次进行佣金计算,得到目标表。
具体地,当要下发的新版本代码全部部署到佣金算法测试库后,在功能测试完毕或者版本要下发生产环境前2-3天再次执行佣金算法测试库的佣金计算过程,然后同样将计算的中间表、明细表和最终结果表备份,作为目标表。
所述对比模块406,用于对比基准表和目标表是否有差异。
具体地,通过同样的查询条件对基准表与目标表做对比,判断是否有差异。例如,在所述基准表和所述目标表中查询同一员工同一月份的总佣金,对比查询结果,判断是否有差异。
所述分析模块408,用于对差异进行分析,判断是否为程序缺陷。
具体地,当所述基准表和目标表存在差异时,通过对差异进行分析,找出问题的所在,看是否为程序缺陷。如果该差异是由于新版本新增的内容导致的,则忽略该差异,并将所述目标表更新为基准表,以备进行下次版本的对比测试。如果该差异是由于新版本代码的程序缺陷导致的,则表示所述新版本代码需要进行修复。
在本实施例中,可以预先对新版本新增的内容以及该新增的内容会对中间表、明细表和最终结果表的哪些项目产生影响进行记录。例如,新版本新增了补贴种类A,会影响对每一员工在补贴种类A下的佣金金额、总补贴下的佣金金额、总佣金下的佣金金额等项目的计算。当所述基准表和目标表存在差异时,通过分析所述差异是否属于该新增的内容所影响的项目,来判断是否为程序缺陷。若所述差异属于该新增的内容所影响的项目,则表示不是程序缺陷,忽略该差异。若所述差异不属于该新增的内容所影响的项目,则表示该差异是程序缺陷,需要进行修复。
进一步地,所述版本对比测试系统40还可以包括:
修复模块410,用于当所述分析模块408判断所述差异为程序缺陷时,进行缺陷修复和重新验证。
具体地,如果是程序缺陷,则修复模块410上报缺陷并修复后,再次把修复的代码部署到佣金算法测试库。然后计算模块404再次执行佣金计算过程,得到新的目标表。对比模块406对比所述基准表和新的目标表是否有差异。分析模块408对差异进行分析,判断是否为程序缺陷,当缺陷修复验证通过且无其他异常后,将该新的目标表更新为基准表,以备进行下次版本的对比测试。
更进一步地,所述版本对比测试系统40还可以包括:
部署模块400,用于部署佣金算法测试库。
具体地,从生产环境重导一个机构库到测试环境,作为佣金算法测试库。为了防止在做功能测试或者系统测试时修改佣金算法测试库中业务表的数据,导致对比出现差异,所述佣金算法测试库作为特殊库存在,不会纳入到功能测试或者系统测试中,也不会允许修改里面的业务数据,保证数据的一致性和完整性。为了防止业务信息外露,还需要屏蔽一些表中的敏感信息。
选择模块402,用于根据预设规则选择测试范围。
具体地,根据预设的佣金计算规则(例如一般在当前月计算上个月业务员所销售的保单佣金和津贴,且津贴的发放时间可能有些是一个季度一次、有些是半年一次、有些是一年一次),选取固定某个月、某个机构的所有数据作为测试范围。然后,计算模块404根据选择模块402所选择的测试范围进行当前版本的佣金计算。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现 出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上参照附图说明了本申请的优选实施例,并非因此局限本申请的权利范围。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本领域技术人员不脱离本申请的范围和实质,可以有多种变型方案实现本申请,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本申请的技术构思之内所作的任何修改、等同替换和改进,均应在本申请的权利范围之内。
Claims (20)
- 一种版本对比测试方法,其特征在于,该方法包括步骤:在佣金算法测试库进行当前版本的佣金计算,得到基准表;将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;对比所述基准表和所述目标表是否有差异;及对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。
- 根据权利要求1所述的版本对比测试方法,其特征在于,该方法还包括步骤:当所述差异是由于新版本代码的程序缺陷所导致时,进行缺陷修复和重新验证。
- 根据权利要求1所述的版本对比测试方法,其特征在于,该方法在所述在佣金算法测试库进行当前版本的佣金计算的步骤之前还包括步骤:部署所述佣金算法测试库;及根据预设规则选择测试范围。
- 根据权利要求2所述的版本对比测试方法,其特征在于,该方法在所述在佣金算法测试库进行当前版本的佣金计算的步骤之前还包括步骤:部署所述佣金算法测试库;及根据预设规则选择测试范围。
- 根据权利要求1所述的版本对比测试方法,其特征在于,所述基准表和所述目标表分别包括对应佣金计算的中间表、明细表和最终结果表。
- 根据权利要求1所述的版本对比测试方法,其特征在于,所述对比所述基准表和所述目标表是否有差异的步骤是通过同样的查询条件对所述基准表与所述目标表进行对比。
- 根据权利要求2所述的版本对比测试方法,其特征在于,该方法还包括 步骤:当所述差异不是由于新版本代码的程序缺陷所导致或者当所述差异是由于新版本代码的程序缺陷所导致且已修复后,将所述目标表更新为新的基准表,以备进行下次版本的对比测试。
- 一种版本对比测试系统,其特征在于,该系统包括:计算模块,用于在佣金算法测试库进行当前版本的佣金计算,得到基准表;以及将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;对比模块,用于对比所述基准表和所述目标表是否有差异;分析模块,用于对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。
- 根据权利要求8所述的版本对比测试系统,其特征在于,该系统还包括:修复模块,用于当所述差异是由于新版本代码的程序缺陷所导致时,进行缺陷修复和重新验证。
- 根据权利要求8所述的版本对比测试系统,其特征在于,该系统还包括:部署模块,用于部署所述佣金算法测试库;选择模块,用于根据预设规则选择测试范围。
- 根据权利要求9所述的版本对比测试系统,其特征在于,该系统还包括:部署模块,用于部署所述佣金算法测试库;选择模块,用于根据预设规则选择测试范围。
- 根据权利要求8所述的版本对比测试系统,其特征在于,所述基准表和所述目标表分别包括对应佣金计算的中间表、明细表和最终结果表。
- 根据权利要求8所述的版本对比测试系统,其特征在于,所述对比模块对比所述基准表和所述目标表是否有差异是通过同样的查询条件对所述基准 表与所述目标表进行对比。
- 根据权利要求9所述的版本对比测试系统,其特征在于,所述分析模块在所述差异不是由于新版本代码的程序缺陷所导致或者当所述差异是由于新版本代码的程序缺陷所导致且已修复后,将所述目标表更新为新的基准表,以备进行下次版本的对比测试。
- 一种计算机可读存储介质,所述计算机可读存储介质内存储有版本对比测试系统,其特征在于,所述版本对比测试系统包括:计算模块,用于在佣金算法测试库进行当前版本的佣金计算,得到基准表;以及将新版本代码部署到所述佣金算法测试库后,再次进行佣金计算,得到目标表;对比模块,用于对比所述基准表和所述目标表是否有差异;分析模块,用于对所述差异进行分析,判断所述差异是否是由于新版本代码的程序缺陷所导致的。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述版本对比测试系统还包括:修复模块,用于当所述差异是由于新版本代码的程序缺陷所导致时,进行缺陷修复和重新验证。
- 根据权利要求15或16所述的计算机可读存储介质,其特征在于,所述版本对比测试系统还包括:部署模块,用于部署所述佣金算法测试库;选择模块,用于根据预设规则选择测试范围。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述基准表和所述目标表分别包括对应佣金计算的中间表、明细表和最终结果表。
- 根据权利要求15所述的计算机可读存储介质,其特征在于,所述对比模块对比所述基准表和所述目标表是否有差异是通过同样的查询条件对所述基准表与所述目标表进行对比。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述分析模块在所述差异不是由于新版本代码的程序缺陷所导致或者当所述差异是由于新版本代码的程序缺陷所导致且已修复后,将所述目标表更新为新的基准表,以备进行下次版本的对比测试。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710311985.3A CN107870858A (zh) | 2017-05-05 | 2017-05-05 | 版本对比测试方法及系统 |
CN201710311985.3 | 2017-05-05 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018202174A1 true WO2018202174A1 (zh) | 2018-11-08 |
Family
ID=61761482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/085727 WO2018202174A1 (zh) | 2017-05-05 | 2018-05-04 | 版本对比测试方法及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107870858A (zh) |
WO (1) | WO2018202174A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107870858A (zh) * | 2017-05-05 | 2018-04-03 | 平安科技(深圳)有限公司 | 版本对比测试方法及系统 |
CN108647936B (zh) * | 2018-05-08 | 2022-07-08 | 中国平安人寿保险股份有限公司 | 佣金发放方法、装置、计算机设备及存储介质 |
CN110471859A (zh) * | 2019-09-12 | 2019-11-19 | 泰康保险集团股份有限公司 | 业务测试方法、装置、介质及电子设备 |
CN114137873A (zh) * | 2021-11-23 | 2022-03-04 | 中船动力研究院有限公司 | 发动机的程序开发方法及装置、发动机的控制系统 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070233629A1 (en) * | 2006-04-04 | 2007-10-04 | Gil Balog | Methods and systems for semiconductor testing using a testing scenario language |
CN101866317A (zh) * | 2010-06-29 | 2010-10-20 | 南京大学 | 一种基于聚类分析的回归测试用例选择方法 |
CN103577487A (zh) * | 2012-08-07 | 2014-02-12 | 亿赞普(北京)科技有限公司 | 一种搜索引擎索引功能的测试方法和装置 |
CN107870858A (zh) * | 2017-05-05 | 2018-04-03 | 平安科技(深圳)有限公司 | 版本对比测试方法及系统 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101178687B (zh) * | 2007-11-26 | 2010-06-09 | 中兴通讯股份有限公司 | 软件回归测试的方法 |
CN101526916B (zh) * | 2008-03-03 | 2012-05-30 | 阿里巴巴集团控股有限公司 | 基于页面对象流验证在回归测试中的应用方法及系统 |
CN102902619B (zh) * | 2011-07-29 | 2015-09-09 | 阿里巴巴集团控股有限公司 | Web应用程序的回归测试方法和装置 |
CN104317713A (zh) * | 2014-10-27 | 2015-01-28 | 北京锐安科技有限公司 | 一种基于模板的自动化测试工具及方法 |
-
2017
- 2017-05-05 CN CN201710311985.3A patent/CN107870858A/zh active Pending
-
2018
- 2018-05-04 WO PCT/CN2018/085727 patent/WO2018202174A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070233629A1 (en) * | 2006-04-04 | 2007-10-04 | Gil Balog | Methods and systems for semiconductor testing using a testing scenario language |
CN101866317A (zh) * | 2010-06-29 | 2010-10-20 | 南京大学 | 一种基于聚类分析的回归测试用例选择方法 |
CN103577487A (zh) * | 2012-08-07 | 2014-02-12 | 亿赞普(北京)科技有限公司 | 一种搜索引擎索引功能的测试方法和装置 |
CN107870858A (zh) * | 2017-05-05 | 2018-04-03 | 平安科技(深圳)有限公司 | 版本对比测试方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN107870858A (zh) | 2018-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018202174A1 (zh) | 版本对比测试方法及系统 | |
US9753838B2 (en) | System and method to classify automated code inspection services defect output for defect analysis | |
US9052981B2 (en) | System and method to map defect reduction data to organizational maturity profiles for defect projection modeling | |
US8151247B2 (en) | Test data management | |
US9525698B2 (en) | Risk prioritization and management | |
US7757125B2 (en) | Defect resolution methodology and data defects quality/risk metric model extension | |
US7451051B2 (en) | Method and system to develop a process improvement methodology | |
WO2018202172A1 (zh) | 大批量对比测试方法及系统 | |
US20140046709A1 (en) | Methods and systems for evaluating technology assets | |
US9734042B1 (en) | System, method, and computer program for automated parameterized software testing | |
JP6419667B2 (ja) | テストdbデータ生成方法及び装置 | |
CN113051180A (zh) | 测试任务的监测方法、装置、设备及存储介质 | |
CN107480050A (zh) | 一种自动测试更新包的测试方法 | |
CN114490413A (zh) | 测试数据的准备方法及装置、存储介质和电子设备 | |
JP5294675B2 (ja) | ソフトウェアマイグレーションシステム及び方法 | |
KR101843092B1 (ko) | 복수의 보험상품 시스템에 대하여 그 시스템들의 정확성을 순차적으로 검증하는 방법 | |
JP2005276040A (ja) | デグレード確認検査方法、デグレード確認検査システム、およびそのためのプログラム | |
CN115600972A (zh) | 一种不良资产的核销方法、装置、设备及存储介质 | |
Pathania et al. | Role of test case prioritization based on regression testing using clustering | |
CN114327588A (zh) | 一种代码提交日志的处理方法及装置 | |
JP2006525586A (ja) | 製品をテストするための方法および装置 | |
JP7353072B2 (ja) | リスト管理システム、リスト管理方法、およびリスト管理プログラム | |
KR20230146197A (ko) | 정보시스템감리시 db 품질점검가이드 변경에 민첩하게 적용가능한 db 품질점검 시스템 및 방법론 | |
CN118069517A (zh) | 一种业务测试方法和装置 | |
Kim et al. | The new approach to IT testing: real transaction-based automated validation solution |
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: 18794669 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: 18794669 Country of ref document: EP Kind code of ref document: A1 |