技术领域Technical Field
本发明涉及软件测试技术领域,特别涉及一种对比测试方法、装置、计算机设备及存储介质。The present invention relates to the technical field of software testing, and in particular to a comparative testing method, device, computer equipment and storage medium.
背景技术Background Art
随着计算机技术的发展,软件服务的应用越来越广泛。在软件开发过程中,需要对开发的应用程序进行相关软件测试。软件测试是指在规定的条件下对应用程序进行操作,以发现程序错误,衡量应用质量,对其是否能满足设计要求进行评估的过程。目前使用的测试方法都非常繁琐、测试执行效率不高、测试脚本调试费时费力,而且需要测试人员具有一定的编程学习能力,同时测试用例和测试数据不易管理和维护。一方面,软件的更新速度很快,同一个应用程序,每次代码变更后,其对应的版本也会随之改变,而每一版本的应用程序在正式发布前都需要经过测试,只有测试通过的应用程序才可以进行发布。另一方面测试任务可能会对应不同的数据源,如MySQL、Redis、HTTP接口、VMS消息等。因而软件测试面临测试工作量巨大、测试结果数据检验任务艰巨等问题。With the development of computer technology, software services are being used more and more widely. In the process of software development, it is necessary to conduct relevant software testing on the developed applications. Software testing refers to the process of operating the application under specified conditions to find program errors, measure the quality of the application, and evaluate whether it can meet the design requirements. The testing methods currently used are very cumbersome, the test execution efficiency is not high, the debugging of test scripts is time-consuming and laborious, and the testers need to have a certain programming learning ability. At the same time, test cases and test data are not easy to manage and maintain. On the one hand, the software updates very quickly. For the same application, after each code change, its corresponding version will also change accordingly. Each version of the application needs to be tested before it is officially released, and only the application that passes the test can be released. On the other hand, the test tasks may correspond to different data sources, such as MySQL, Redis, HTTP interface, VMS messages, etc. Therefore, software testing faces problems such as huge testing workload and arduous test result data verification tasks.
因此,亟需提出一种新的测试方法,以解决上述问题。Therefore, it is urgent to propose a new testing method to solve the above problems.
发明内容Summary of the invention
为了解决现有技术的问题,本发明实施例提供了一种对比测试方法、装置、计算机设备以及存储介质,以克服现有技术中存在的测试工作量巨大、测试结果数据检验任务艰巨等等问题。In order to solve the problems of the prior art, the embodiments of the present invention provide a comparative test method, apparatus, computer equipment and storage medium to overcome the problems existing in the prior art such as huge test workload, arduous task of test result data verification and the like.
为解决上述一个或多个技术问题,本发明采用的技术方案是:In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is:
第一方面,提供了一种对比测试方法,该方法包括如下步骤:In a first aspect, a comparative test method is provided, the method comprising the following steps:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;Receive a test request for the current version of the application to be tested, and generate a corresponding test task according to the test request;
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;Execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;Compare the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain a comparison result;
根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。Determine whether the current version of the application to be tested has passed the test according to the comparison result.
进一步的,所述接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务包括:Further, the receiving a test request of the current version of the application to be tested and generating a corresponding test task according to the test request includes:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据。A test request of a current version of an application to be tested is received, and a corresponding test task is generated according to the test request and a preset data template, wherein the data template is used to configure configuration data of the test task.
进一步的,所述将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果包括:Furthermore, the comparing the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain the comparison result includes:
将所述当前测试结果数据中的每一测试操作对应的结果数据与所述历史测试数据中相应的结果数据进行比较,获取比对结果。The result data corresponding to each test operation in the current test result data is compared with the corresponding result data in the historical test data to obtain a comparison result.
进一步的,所述方法还包括:Furthermore, the method further comprises:
判断所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑是否有变更;Determine whether the code logic of the current version of the application to be tested is changed compared with the historical version of the application to be tested;
所述根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过包括:Determining whether the current version of the application to be tested has passed the test according to the comparison result includes:
若所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑有变更,则获取所述比对结果中变更后代码逻辑对应的结果数据,判断所述结果数据是否符合预设要求,若满足,则确定当前版本的所述待测试应用程序测试通过。If the code logic of the current version of the application to be tested has changed compared to the historical version of the application to be tested, the result data corresponding to the changed code logic in the comparison result is obtained to determine whether the result data meets the preset requirements. If so, it is determined that the current version of the application to be tested has passed the test.
进一步的,所述方法还包括:Furthermore, the method further comprises:
将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据The current test result data is stored as historical test result data in association with the current version of the application to be tested in a baseline database, where the baseline database is used to store historical test data.
进一步的,所述执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据包括:Further, executing the test task, performing corresponding test operations on the current version of the application to be tested, and obtaining current test result data includes:
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,根据预设的结果数据模块生成当前测试结果数据。Execute the test task, perform corresponding test operations on the current version of the application to be tested, and generate current test result data according to a preset result data module.
进一步的,所述测试任务包括Saturn任务或Shell任务中的至少一种。Furthermore, the test task includes at least one of a Saturn task and a Shell task.
第二方面,提供了一种对比测试装置,所述装置包括:In a second aspect, a comparative test device is provided, the device comprising:
任务生成模块,用于接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;A task generation module, used to receive a test request of the current version of the application to be tested, and generate a corresponding test task according to the test request;
测试执行模块,用于执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;A test execution module, used to execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
结果比对模块,用于将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;A result comparison module, used to compare the current test result data with the historical test result data of the historical version of the application to be tested according to preset rules to obtain a comparison result;
测试判断模块,用于根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。The test judgment module is used to determine whether the current version of the application to be tested has passed the test according to the comparison result.
第三方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;Receive a test request for the current version of the application to be tested, and generate a corresponding test task according to the test request;
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;Execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;Compare the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain a comparison result;
根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。Determine whether the current version of the application to be tested has passed the test according to the comparison result.
第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现如下步骤:In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;Receive a test request for the current version of the application to be tested, and generate a corresponding test task according to the test request;
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;Execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;Compare the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain a comparison result;
根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。Determine whether the current version of the application to be tested has passed the test according to the comparison result.
本发明实施例提供的技术方案带来的有益效果是:The technical solution provided by the embodiment of the present invention has the following beneficial effects:
本发明实施例提供的对比测试方法、装置、计算机设备及存储介质,通过接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务,执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据,将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果,根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过,应对时间紧、需求大的软件测试场景,提高了软件测试人员的效率、节省了测试时间,并且大幅提升了软件测试质量、缩短测试时长,实现自动化执行配置的测试用例和计划并反馈测试结果数据;The comparative test method, apparatus, computer equipment and storage medium provided by the embodiments of the present invention receive a test request of the current version of the application to be tested, generate a corresponding test task according to the test request, execute the test task, perform corresponding test operations on the current version of the application to be tested, obtain current test result data, compare the current test result data with the historical test result data of the historical version of the application to be tested according to preset rules, obtain the comparison result, and determine whether the current version of the application to be tested has passed the test according to the comparison result. This method can cope with software testing scenarios with tight time and high demand, improve the efficiency of software testers, save testing time, and greatly improve the quality of software testing, shorten the testing time, and realize automatic execution of configured test cases and plans and feedback of test result data.
进一步的,通过接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据,并且在获取到当前测试结果数据后,将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据,实现对后台任务处理不同数据源数据的对比验证。Furthermore, by receiving a test request for the current version of the application to be tested, a corresponding test task is generated according to the test request and a preset data template, the data template is used to configure the configuration data of the test task, and after obtaining the current test result data, the current test result data is associated with the current version of the application to be tested as historical test result data and stored in a baseline database, the baseline database is used to store historical test data, so as to realize comparative verification of background task processing of data from different data sources.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
图1是根据一示例性实施例示出的对比测试平台的系统架构图;FIG1 is a system architecture diagram of a comparison test platform according to an exemplary embodiment;
图2是根据一示例性实施例示出的用例执行的流程图;FIG2 is a flow chart showing the execution of a use case according to an exemplary embodiment;
图3是根据一示例性实施例示出的对比测试方法的流程图;FIG3 is a flow chart of a comparative test method according to an exemplary embodiment;
图4是根据一示例性实施例示出的对比测试装置的结构示意图;FIG4 is a schematic structural diagram of a comparative test device according to an exemplary embodiment;
图5是根据一示例性实施例示出的计算机设备的内部结构示意图。Fig. 5 is a schematic diagram showing the internal structure of a computer device according to an exemplary embodiment.
具体实施方式DETAILED DESCRIPTION
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
如背景技术所述,在各个业务的应用系统中,或多或少都会存在使用后台定时任务处理业务数据的情况,比如用JAVA任务拉取数据,用消息任务接收上游系统推送的消息,或者用SHELL任务进行批处理等等。目前针对这种后台作业任务的测试,通常要么通过手工进行测试,要么编写测试脚本进行自动化测试。一方面,这些测试方法存在操作繁琐、测试执行效率不高、测试脚本调试费时费力而且需要一定的编程学习能力、测试用例和数据不易管理和维护等问题。另一方面,软件的更新速度很快,同一个应用程序,其对应的版本可能会有很多,而每一版本的应用程序在正式发布前都要经过各种测试,测试过后需要对测试结果数据进行校验,导致测试工作量巨大,耗时耗力。As described in the background technology, in the application system of each business, there will be more or less situations where background timed tasks are used to process business data, such as pulling data with JAVA tasks, receiving messages pushed by upstream systems with message tasks, or batch processing with SHELL tasks, etc. At present, the test of such background operation tasks is usually either tested manually or written into test scripts for automated testing. On the one hand, these test methods have the problems of cumbersome operation, low test execution efficiency, time-consuming and laborious debugging of test scripts, and the need for certain programming learning ability, and the difficulty in managing and maintaining test cases and data. On the other hand, the software is updated very quickly, and there may be many corresponding versions of the same application program, and each version of the application program must undergo various tests before being officially released, and the test result data needs to be verified after the test, resulting in a huge test workload, which is time-consuming and labor-intensive.
为了解决这些痛点,本发明实施例中创造性地提供了一种针对定时任务测试的对比测试平台,该系统平台主要针对后台定时任务(包含Saturn任务和SHELL任务),提供一种可视化的、无编码的、可配置的和高效的自动化测试解决方案。该测试平台支持后台任务处理多种数据源(如MySQL,Redis、HTTP接口,VMS消息等)的对比测试,无需编码节省时间,自动执行并反馈测试结果,可以很好的提高测试效率。In order to solve these pain points, the embodiments of the present invention creatively provide a comparative test platform for scheduled task testing. The system platform mainly provides a visual, non-coding, configurable and efficient automated testing solution for background scheduled tasks (including Saturn tasks and SHELL tasks). The test platform supports comparative testing of background tasks processing multiple data sources (such as MySQL, Redis, HTTP interface, VMS messages, etc.), saves time without coding, automatically executes and feeds back test results, and can greatly improve test efficiency.
图1是根据一示例性实施例示出的对比测试平台的系统架构图,参照图1所示,该对比测试平台主要由前台管理系统、用例执行系统、数据库、Redis、组成,其中数据库包括基础数据库和基线数据库,基础数据库主要用来存储前台配置管理的基础数据,基线数据库主要用于存储测试用例的基线数据,如测试结果数据等,该数据用于和测试任务运行后的实际结果数据进行对比,以验证测试用例是否成功。Redis主要用于分布式锁,控制并发的测试用例。FIG1 is a system architecture diagram of a comparison test platform according to an exemplary embodiment. As shown in FIG1 , the comparison test platform is mainly composed of a front-end management system, a use case execution system, a database, and Redis, wherein the database includes a basic database and a baseline database. The basic database is mainly used to store basic data for front-end configuration management, and the baseline database is mainly used to store baseline data of test cases, such as test result data, etc. This data is used to compare with the actual result data after the test task is run to verify whether the test case is successful. Redis is mainly used for distributed locks to control concurrent test cases.
其中,本发明实施例中的对比测试平台的前台管理系统主要可以实现以下几个功能:Among them, the front-end management system of the comparative test platform in the embodiment of the present invention can mainly realize the following functions:
1、基础数据管理,包括业务线管理、产品管理、模块管理,主要用于区分测试用例归属的业务线、产品和模块;1. Basic data management, including business line management, product management, and module management, which is mainly used to distinguish the business line, product, and module to which the test cases belong;
2、测试环境管理,包括hosts配置和应用Job配置,hosts配置主要用于配置不同环境的DNS,主要用户http接口的配置,Job配置主要配置待测应用的任务,包括Saturn的域名和Job名,或者是SHELL任务IP,用户密码以及对应的脚本;2. Test environment management, including hosts configuration and application job configuration. Hosts configuration is mainly used to configure DNS in different environments, mainly the configuration of user http interface. Job configuration mainly configures the tasks of the application to be tested, including Saturn domain name and job name, or SHELL task IP, user password and corresponding script;
3、数据源管理,包括MySQL数据源配置、REDIS数据源配置和VMS消息配置等,主要是配置待测任务使用到的数据源配置,包括IP、端口、用户名和密码,如果是消息配置则是配置消息所属环境、频道和队列;3. Data source management, including MySQL data source configuration, REDIS data source configuration and VMS message configuration, etc., mainly to configure the data source configuration used by the task to be tested, including IP, port, user name and password. If it is message configuration, it is to configure the environment, channel and queue to which the message belongs;
4、模板管理,包括数据模板和消息模板管理,数据模板分为造数模板和结果模板两种类型,造数模板作用于测试用例的输入数据,结果模板作用于测试用例的输出数据,所以此处数据模板是用于配置不同数据源,如MySQL、Redis、HTTP等的造数模板和结果模板,消息模板主要配置发送者的消息,作用于消费者的输入数据;4. Template management, including data template and message template management. Data templates are divided into two types: number template and result template. Number template acts on the input data of the test case, and result template acts on the output data of the test case. Therefore, the data template here is used to configure number templates and result templates of different data sources, such as MySQL, Redis, HTTP, etc. The message template mainly configures the sender's message and acts on the consumer's input data;
5、用例管理,主要包括新建测试用例功能,执行用例功能和查询用例结果,其中测试用例会关联待测应用,造数模板和结果模板;5. Use case management, mainly including the functions of creating new test cases, executing test cases and querying test case results. Test cases will be associated with the application to be tested, number templates and result templates;
6、计划管理,主要包括计划新建、计划执行和查看计划执行结果,其中测试计划可以由多个测试用例组成。6. Plan management, mainly including plan creation, plan execution and viewing of plan execution results. The test plan can be composed of multiple test cases.
本发明实施例中,用例执行系统主要包括两部分功能:一是测试计划执行,二是测试用例执行。In the embodiment of the present invention, the use case execution system mainly includes two functions: one is test plan execution, and the other is test case execution.
其中,测试计划执行过程如下:The test plan execution process is as follows:
首先查询所有的待执行的测试计划,然后顺序执行测试计划和测试计划中的用例。在执行某个测试用例之前会检查Redis中是否存在使用相同数据源的用例,如果存在则等待,否则将该测试用例用到的数据源写入Redis,然后执行用例,等到用例执行完成则删除该用例的Redis数据源数据。First, query all the test plans to be executed, and then execute the test plans and the test cases in the test plans in sequence. Before executing a test case, check whether there is a test case using the same data source in Redis. If so, wait. Otherwise, write the data source used by the test case to Redis, and then execute the test case. When the test case is executed, delete the Redis data source data of the test case.
图2是根据一示例性实施例示出的用例执行的流程图,参照图2所示,测试用例执行过程如下:FIG. 2 is a flow chart showing the execution of a test case according to an exemplary embodiment. As shown in FIG. 2 , the test case execution process is as follows:
首先会查询所有待执行的用例(非计划中的用例),然后并发执行所有待执行的测试用例。在单个用例执行过程中,首先导入造数模板中配置的数据到测试任务的实际库中,然后导入结果模板中的数据到基线数据库中,然后启动待测的Saturn任务或SHELL任务,等到任务执行完成后,查询测试任务实际库中的结果数据与基线数据库中的基线数据进行对比,如果数据根据某种对比规则(排除某些对比字段如id、create_time、update_time等)对比成功,则判断用例测试通过,否则测试失败。First, all the test cases to be executed (not the planned ones) will be queried, and then all the test cases to be executed will be executed concurrently. During the execution of a single test case, the data configured in the number template is first imported into the actual library of the test task, and then the data in the result template is imported into the baseline database, and then the Saturn task or SHELL task to be tested is started. After the task is executed, the result data in the actual library of the test task is queried and compared with the baseline data in the baseline database. If the data is successfully compared according to a certain comparison rule (excluding certain comparison fields such as id, create_time, update_time, etc.), the test case test is judged to pass, otherwise the test fails.
图3是根据一示例性实施例示出的对比测试方法的流程图,参照图3所示,该方法包括如下步骤:FIG. 3 is a flow chart of a comparative test method according to an exemplary embodiment. Referring to FIG. 3 , the method includes the following steps:
S1:接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务。S1: receiving a test request of a current version of an application to be tested, and generating a corresponding test task according to the test request.
具体的,每个测试应用程序可能会对应多个版本,获取待测试应用程序的当前版本的测试请求,测试请求包括但不限于:待测试应用程序的版本号、测试需求、变更信息、数据源信息等数据,根据该请求生成对应的测试任务。本发明实施例中,对比测试平台的后台定时任务(即测试任务)可以是Saturn任务或Shell任务,用户可以根据实际需求进行设置。Specifically, each test application may correspond to multiple versions, and a test request of the current version of the application to be tested is obtained, the test request includes but is not limited to: the version number of the application to be tested, test requirements, change information, data source information and other data, and a corresponding test task is generated according to the request. In an embodiment of the present invention, the background scheduled task (i.e., test task) of the comparison test platform can be a Saturn task or a Shell task, and the user can set it according to actual needs.
S2:执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据。S2: Execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data.
具体的,本发明实施例中,会对不同后台测试任务的启动和停止操作以及执行状态进行监测。在启动测试任务执行测试过程中,需要判断任务执行状态,是执行中还是执行完成。对于执行中的任务进行监测是为了防止发生异常不能正常结束,对于这种不能正常结束的任务,需要进行强制停止,一是防止执行测试任务的进程一直卡住,二是防止同个任务执行多次从而启动多个进程,而各个进程又不能正常结束,直到耗尽服务器资源。Specifically, in an embodiment of the present invention, the start and stop operations and execution status of different background test tasks are monitored. When starting a test task to execute a test, it is necessary to determine the task execution status, whether it is in progress or completed. The purpose of monitoring the executing task is to prevent abnormalities from occurring and the task cannot be terminated normally. For such tasks that cannot be terminated normally, a forced stop is required. First, to prevent the process of executing the test task from being stuck all the time, and second, to prevent the same task from being executed multiple times, thereby starting multiple processes, and each process cannot be terminated normally until the server resources are exhausted.
具体的,每个测试任务会有对应的测试用例,为了方便对测试任务进行管理,本发明实示例中,会根据预设规则创建测试计划,每个测试计划可以包括多个测试用例(对应测试任务)。平台在执行测试操作时,首先查询所有的待执行的测试计划,然后顺序执行测试计划和测试计划中的用例。在执行某个测试用例之前会检查Redis中是否存在使用相同数据源的用例,如果存在则等待,否则将该测试用例用到的数据源写入Redis,然后执行用例,等到用例执行完成则删除该用例的Redis数据源数据。Specifically, each test task will have a corresponding test case. In order to facilitate the management of test tasks, in the embodiment of the present invention, a test plan will be created according to preset rules, and each test plan may include multiple test cases (corresponding test tasks). When the platform performs a test operation, it first queries all the test plans to be executed, and then executes the test plans and the test cases in the test plans in sequence. Before executing a test case, it will check whether there is a use case using the same data source in Redis. If it exists, wait, otherwise write the data source used by the test case to Redis, and then execute the use case. When the use case is executed, delete the Redis data source data of the use case.
S3:将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果。S3: Compare the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain a comparison result.
具体的,本发明实施例中,设置将待测试应用程序的历史测试结果数据存储在基线数据库中,在单个用例执行过程中,首先导入造数模板中配置的数据到测试任务的实际库中,然后导入结果模板中的数据到基线数据库中,然后启动测试任务,等到任务执行完成后,查询测试任务实际库中的结果数据与基线数据库中的基线数据进行对比,生成比对结果。Specifically, in an embodiment of the present invention, it is set to store the historical test result data of the application to be tested in a baseline database. During the execution of a single use case, the data configured in the number generation template is first imported into the actual library of the test task, and then the data in the result template is imported into the baseline database. Then the test task is started. After the task is executed, the result data in the actual library of the test task is queried and compared with the baseline data in the baseline database to generate a comparison result.
为了提高测试结果数据校验的效率,采用将当前测试结果数据与历史版本的待测试应用程序的历史测试结果数据按照预设规则进行比对,根据比对结果判断当前测试是否通过。In order to improve the efficiency of test result data verification, the current test result data is compared with the historical test result data of the historical version of the application to be tested according to preset rules, and whether the current test passes is determined based on the comparison result.
S4:根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。S4: Determine whether the current version of the application to be tested has passed the test according to the comparison result.
具体的,如果比对结果满足预设要求,则判定当前测试通过,若不满足,则判定当前测试失败。Specifically, if the comparison result meets the preset requirements, the current test is determined to have passed; if not, the current test is determined to have failed.
作为一种较优的实施方式,本发明实施例中,所述接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务包括:As a preferred implementation, in an embodiment of the present invention, the receiving of a test request of the current version of the application to be tested and generating a corresponding test task according to the test request includes:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据。A test request of a current version of an application to be tested is received, and a corresponding test task is generated according to the test request and a preset data template, wherein the data template is used to configure configuration data of the test task.
具体的,本发明实施例支持不同数据源的接入与对比。由于不同测试任务使用的数据源可以各不相同,甚至多种数据源同时使用,不同数据源存储的数据格式也不甚相同。本发明实施例中通过模板管理实现支持各种数据源的连接、操作以及数据存储,并能够对不同类型数据源的数据格式进行转换和对比。模板管理包括数据模板和消息模板管理,模板分为造数模板和结果模板两种类型,造数模板作用于测试用例的输入数据,结果模板作用于测试用例的输出数据。即此处数据模板用于配置不同数据源(如MySQL、Redis、HTTP等)的造数模板和结果模板。消息模板主要配置发送者的消息,作用于消费者的输入数据。Specifically, the embodiment of the present invention supports the access and comparison of different data sources. Since the data sources used by different test tasks can be different, and even multiple data sources are used at the same time, the data formats stored in different data sources are also quite different. In the embodiment of the present invention, template management is used to support the connection, operation and data storage of various data sources, and the data formats of different types of data sources can be converted and compared. Template management includes data template and message template management. The templates are divided into two types: number templates and result templates. The number template acts on the input data of the test case, and the result template acts on the output data of the test case. That is, the data template here is used to configure the number template and result template of different data sources (such as MySQL, Redis, HTTP, etc.). The message template mainly configures the sender's message and acts on the consumer's input data.
作为一种较优的实施方式,本发明实施例中,所述将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果包括:As a preferred implementation, in an embodiment of the present invention, comparing the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule, and obtaining the comparison result includes:
将所述当前测试结果数据中的每一测试操作对应的结果数据与所述历史测试数据中相应的结果数据进行比较,获取比对结果。The result data corresponding to each test operation in the current test result data is compared with the corresponding result data in the historical test data to obtain a comparison result.
具体的,本发明实施例中,不对预设规则做具体限制,用户可以根据实际需求进行设置。如排除某些对比字段,如id、create_time、update_time等字段。Specifically, in the embodiment of the present invention, there is no specific restriction on the preset rules, and the user can set them according to actual needs, such as excluding certain comparison fields, such as id, create_time, update_time and other fields.
作为一种较优的实施方式,本发明实施例中,所述方法还包括:As a preferred implementation, in an embodiment of the present invention, the method further includes:
判断所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑是否有变更;Determine whether the code logic of the current version of the application to be tested is changed compared with the historical version of the application to be tested;
所述根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过包括:Determining whether the current version of the application to be tested has passed the test according to the comparison result includes:
若所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑有变更,则获取所述比对结果中变更后代码逻辑对应的结果数据,判断所述结果数据是否符合预设要求,若满足,则确定当前版本的所述待测试应用程序测试通过。If the code logic of the current version of the application to be tested has changed compared to the historical version of the application to be tested, the result data corresponding to the changed code logic in the comparison result is obtained to determine whether the result data meets the preset requirements. If so, it is determined that the current version of the application to be tested has passed the test.
具体的,应用程序的代码变更后,会影响自动化用例的回归。如当当前版本的待测试应用程序相比于历史版本的待测试应用程序的代码逻辑是否有变更时,该代码逻辑对应的执行结果数据就会随之改变。因而在根据比对结果确定当前版本的所述待测试应用程序是否测试通过时,需要针对变更过的代码逻辑对应的比对结果进行查验,如果结果数据符合预设要求,则确定当前版本的待测试应用程序测试通过,否则,确定其不通过。Specifically, after the code of the application is changed, it will affect the regression of the automated use case. For example, when the code logic of the current version of the application to be tested is changed compared to the historical version of the application to be tested, the execution result data corresponding to the code logic will change accordingly. Therefore, when determining whether the current version of the application to be tested has passed the test based on the comparison results, it is necessary to check the comparison results corresponding to the changed code logic. If the result data meets the preset requirements, it is determined that the current version of the application to be tested has passed the test, otherwise, it is determined that it has failed.
作为一种较优的实施方式,本发明实施例中,所述方法还包括:As a preferred implementation, in an embodiment of the present invention, the method further includes:
将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据。The current test result data is stored as historical test result data in association with the current version of the application program to be tested in a baseline database, where the baseline database is used to store historical test data.
具体的,在获取到当前测试结果数据后,本发明实施例中,设置将当前测试结果数据也存储至基线数据库中,以便作为历史结果数据供后续测试操作进行比对。在存储前,可以按照一定规则对其进行检查,若满足要求,则进行存储,否则不进行存储。Specifically, after obtaining the current test result data, in an embodiment of the present invention, it is set to store the current test result data in the baseline database so as to be used as historical result data for comparison in subsequent test operations. Before storage, it can be checked according to certain rules. If it meets the requirements, it is stored, otherwise it is not stored.
由于不同数据源存储的数据格式不相同,因此在进行存储时,可以将其导入到预设的结果数据模块中在进行存储,也可以先直接存储,然后在进行具体比对时,先将其导入到结果数据模块,在进行比对,这里可以根据用户的实际需求进行选择。Since the data formats stored in different data sources are different, when storing, you can import them into the preset result data module for storage, or you can directly store them first, and then when performing specific comparisons, import them into the result data module first, and then perform the comparisons. Here you can choose according to the actual needs of the user.
作为一种较优的实施方式,本发明实施例中,所述执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据包括:As a preferred implementation, in an embodiment of the present invention, executing the test task, performing corresponding test operations on the current version of the application to be tested, and obtaining current test result data include:
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,根据预设的结果数据模块生成当前测试结果数据。Execute the test task, perform corresponding test operations on the current version of the application to be tested, and generate current test result data according to a preset result data module.
具体的,由于不同数据源存储的数据格式不相同,因此在生成当前测试结果数据时,可以将执行结果导入到预设的结果数据模块中以生成当前测试结果数据。Specifically, since different data sources store data in different formats, when generating the current test result data, the execution result may be imported into a preset result data module to generate the current test result data.
作为一种较优的实施方式,本发明实施例中,所述测试任务包括Saturn任务或Shell任务中的至少一种。As a preferred implementation, in the embodiment of the present invention, the test task includes at least one of a Saturn task or a Shell task.
图4是根据一示例性实施例示出的对比测试装置的结构示意图,该装置包括:FIG4 is a schematic structural diagram of a comparative test device according to an exemplary embodiment, the device comprising:
任务生成模块,用于接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;A task generation module, used to receive a test request of the current version of the application to be tested, and generate a corresponding test task according to the test request;
测试执行模块,用于执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;A test execution module, used to execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
结果比对模块,用于将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;A result comparison module, used to compare the current test result data with the historical test result data of the historical version of the application to be tested according to preset rules to obtain a comparison result;
测试判断模块,用于根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。The test judgment module is used to determine whether the current version of the application to be tested has passed the test according to the comparison result.
作为一种较优的实施方式,本发明实施例中,所述任务生成模块具体用于:As a preferred implementation, in the embodiment of the present invention, the task generation module is specifically used for:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据。A test request of a current version of an application to be tested is received, and a corresponding test task is generated according to the test request and a preset data template, wherein the data template is used to configure configuration data of the test task.
作为一种较优的实施方式,本发明实施例中,所述结果比对模块具体用于:As a preferred implementation, in the embodiment of the present invention, the result comparison module is specifically used for:
将所述当前测试结果数据中的每一测试操作对应的结果数据与所述历史测试数据中相应的结果数据进行比较,获取比对结果。The result data corresponding to each test operation in the current test result data is compared with the corresponding result data in the historical test data to obtain a comparison result.
作为一种较优的实施方式,本发明实施例中,所述装置还包括:As a preferred implementation, in the embodiment of the present invention, the device further includes:
变更判断模块,用于判断所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑是否有变更;A change determination module, used to determine whether the code logic of the current version of the application to be tested is changed compared with the historical version of the application to be tested;
所述测试判断模块具体用于若所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑有变更,则获取所述比对结果中变更后代码逻辑对应的结果数据,判断所述结果数据是否符合预设要求,若满足,则确定当前版本的所述待测试应用程序测试通过。The test judgment module is specifically used to obtain result data corresponding to the changed code logic in the comparison result if the code logic of the current version of the application to be tested has changed compared to the historical version of the application to be tested, and to determine whether the result data meets the preset requirements. If so, it is determined that the test of the current version of the application to be tested has passed.
作为一种较优的实施方式,本发明实施例中,所述装置还包括:As a preferred implementation, in the embodiment of the present invention, the device further includes:
数据存储模块,用于将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据。The data storage module is used to store the current test result data as historical test result data in association with the current version of the application program to be tested in a baseline database, where the baseline database is used to store historical test data.
作为一种较优的实施方式,本发明实施例中,所述测试执行模块具体用于:As a preferred implementation, in the embodiment of the present invention, the test execution module is specifically used for:
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,根据预设的结果数据模块生成当前测试结果数据。Execute the test task, perform corresponding test operations on the current version of the application to be tested, and generate current test result data according to a preset result data module.
作为一种较优的实施方式,本发明实施例中,所述测试任务包括Saturn任务或Shell任务中的至少一种。As a preferred implementation, in the embodiment of the present invention, the test task includes at least one of a Saturn task or a Shell task.
图5是根据一示例性实施例示出的计算机设备的内部结构示意图,参照图5所示,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种执行计划的优化方法。FIG5 is a schematic diagram of the internal structure of a computer device according to an exemplary embodiment. As shown in FIG5 , the computer device includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an optimization method for executing a plan is implemented.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本发明方案相关的部分结构的框图,并不构成对本发明方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
作为一种较优的实施方式,本发明实施例中,计算机设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:As a preferred implementation, in an embodiment of the present invention, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;Receive a test request for the current version of the application to be tested, and generate a corresponding test task according to the test request;
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;Execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;Compare the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain a comparison result;
根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。Determine whether the current version of the application to be tested has passed the test according to the comparison result.
作为一种较优的实施方式,本发明实施例中,处理器执行计算机程序时还实现以下步骤:As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据。A test request of a current version of an application to be tested is received, and a corresponding test task is generated according to the test request and a preset data template, wherein the data template is used to configure configuration data of the test task.
作为一种较优的实施方式,本发明实施例中,处理器执行计算机程序时还实现以下步骤:As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
将所述当前测试结果数据中的每一测试操作对应的结果数据与所述历史测试数据中相应的结果数据进行比较,获取比对结果。The result data corresponding to each test operation in the current test result data is compared with the corresponding result data in the historical test data to obtain a comparison result.
作为一种较优的实施方式,本发明实施例中,处理器执行计算机程序时还实现以下步骤:As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
判断所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑是否有变更;Determine whether the code logic of the current version of the application to be tested is changed compared with the historical version of the application to be tested;
若所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑有变更,则获取所述比对结果中变更后代码逻辑对应的结果数据,判断所述结果数据是否符合预设要求,若满足,则确定当前版本的所述待测试应用程序测试通过。If the code logic of the current version of the application to be tested has changed compared to the historical version of the application to be tested, the result data corresponding to the changed code logic in the comparison result is obtained to determine whether the result data meets the preset requirements. If so, it is determined that the current version of the application to be tested has passed the test.
作为一种较优的实施方式,本发明实施例中,处理器执行计算机程序时还实现以下步骤:As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据。The current test result data is stored as historical test result data in association with the current version of the application program to be tested in a baseline database, where the baseline database is used to store historical test data.
作为一种较优的实施方式,本发明实施例中,处理器执行计算机程序时还实现以下步骤:As a preferred implementation, in the embodiment of the present invention, the processor further implements the following steps when executing the computer program:
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,根据预设的结果数据模块生成当前测试结果数据。Execute the test task, perform corresponding test operations on the current version of the application to be tested, and generate current test result data according to a preset result data module.
本发明实施例中,还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现如下步骤:In an embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务;Receive a test request for the current version of the application to be tested, and generate a corresponding test task according to the test request;
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据;Execute the test task, perform corresponding test operations on the current version of the application to be tested, and obtain current test result data;
将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果;Compare the current test result data with the historical test result data of the historical version of the application to be tested according to a preset rule to obtain a comparison result;
根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过。Determine whether the current version of the application to be tested has passed the test according to the comparison result.
作为一种较优的实施方式,本发明实施例中,所述计算机程序被处理器执行时,还实现如下步骤:As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据。A test request of a current version of an application to be tested is received, and a corresponding test task is generated according to the test request and a preset data template, wherein the data template is used to configure configuration data of the test task.
作为一种较优的实施方式,本发明实施例中,所述计算机程序被处理器执行时,还实现如下步骤:As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
将所述当前测试结果数据中的每一测试操作对应的结果数据与所述历史测试数据中相应的结果数据进行比较,获取比对结果。The result data corresponding to each test operation in the current test result data is compared with the corresponding result data in the historical test data to obtain a comparison result.
作为一种较优的实施方式,本发明实施例中,所述计算机程序被处理器执行时,还实现如下步骤:As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
判断所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑是否有变更;Determine whether the code logic of the current version of the application to be tested is changed compared with the historical version of the application to be tested;
若所述当前版本的待测试应用程序相比于所述历史版本的待测试应用程序的代码逻辑有变更,则获取所述比对结果中变更后代码逻辑对应的结果数据,判断所述结果数据是否符合预设要求,若满足,则确定当前版本的所述待测试应用程序测试通过。If the code logic of the current version of the application to be tested has changed compared to the historical version of the application to be tested, the result data corresponding to the changed code logic in the comparison result is obtained to determine whether the result data meets the preset requirements. If so, it is determined that the current version of the application to be tested has passed the test.
作为一种较优的实施方式,本发明实施例中,所述计算机程序被处理器执行时,还实现如下步骤:As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据。The current test result data is stored as historical test result data in association with the current version of the application program to be tested in a baseline database, where the baseline database is used to store historical test data.
作为一种较优的实施方式,本发明实施例中,所述计算机程序被处理器执行时,还实现如下步骤:As a preferred implementation, in the embodiment of the present invention, when the computer program is executed by the processor, the following steps are also implemented:
执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,根据预设的结果数据模块生成当前测试结果数据。Execute the test task, perform corresponding test operations on the current version of the application to be tested, and generate current test result data according to a preset result data module.
综上所述,本发明实施例提供的技术方案带来的有益效果是:In summary, the technical solution provided by the embodiment of the present invention has the following beneficial effects:
本发明实施例提供的对比测试方法、装置、计算机设备及存储介质,通过接收当前版本的待测试应用程序的测试请求,根据所述测试请求生成对应的测试任务,执行所述测试任务,对当前版本的所述待测试应用程序执行相应的测试操作,获取当前测试结果数据,将所述当前测试结果数据与历史版本的所述待测试应用程序的历史测试结果数据按照预设规则进行比对,获取比对结果,根据所述比对结果确定当前版本的所述待测试应用程序是否测试通过,应对时间紧、需求大的软件测试场景,提高了软件测试人员的效率、节省了测试时间,并且大幅提升了软件测试质量、缩短测试时长,实现自动化执行配置的测试用例和计划并反馈测试结果数据;The comparative test method, apparatus, computer equipment and storage medium provided by the embodiments of the present invention receive a test request of the current version of the application to be tested, generate a corresponding test task according to the test request, execute the test task, perform corresponding test operations on the current version of the application to be tested, obtain current test result data, compare the current test result data with the historical test result data of the historical version of the application to be tested according to preset rules, obtain the comparison result, and determine whether the current version of the application to be tested has passed the test according to the comparison result. This method can cope with software testing scenarios with tight time and high demand, improve the efficiency of software testers, save testing time, and greatly improve the quality of software testing, shorten the testing time, and realize automatic execution of configured test cases and plans and feedback of test result data.
进一步的,通过接收当前版本的待测试应用程序的测试请求,根据所述测试请求以及预设数据模板生成对应的测试任务,所述数据模板用于配置所述测试任务的配置数据,并且在获取到当前测试结果数据后,将所述当前测试结果数据作为历史测试结果数据与所述当前版本的待测试应用程序关联存储至基线数据库中,所述基线数据库用于存储历史测试数据,实现对后台任务处理不同数据源数据的对比验证。Furthermore, by receiving a test request for the current version of the application to be tested, a corresponding test task is generated according to the test request and a preset data template, the data template is used to configure the configuration data of the test task, and after obtaining the current test result data, the current test result data is associated with the current version of the application to be tested as historical test result data and stored in a baseline database, the baseline database is used to store historical test data, so as to realize comparative verification of background task processing of data from different data sources.
需要说明的是:上述实施例提供的对比测试装置在触发对比业务时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的对比测试装置与对比测试方法实施例属于同一构思,即该装置是基于该对比测试方法的,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: the comparison test device provided in the above embodiment only uses the division of the above functional modules as an example when triggering the comparison service. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the comparison test device provided in the above embodiment belongs to the same concept as the comparison test method embodiment, that is, the device is based on the comparison test method. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011573621.0ACN112631919B (en) | 2020-12-25 | 2020-12-25 | Contrast test method, device, computer equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011573621.0ACN112631919B (en) | 2020-12-25 | 2020-12-25 | Contrast test method, device, computer equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN112631919A CN112631919A (en) | 2021-04-09 |
| CN112631919Btrue CN112631919B (en) | 2024-10-01 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011573621.0AActiveCN112631919B (en) | 2020-12-25 | 2020-12-25 | Contrast test method, device, computer equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN112631919B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113849418B (en)* | 2021-11-30 | 2022-07-08 | 阿里云计算有限公司 | Code quality debugging method, server, user equipment and storage medium |
| CN114168565B (en)* | 2021-12-10 | 2022-07-08 | 北京宇信科技集团股份有限公司 | Backtracking test method, device and system of business rule model and decision engine |
| CN114255155B (en)* | 2022-02-24 | 2022-07-26 | 荣耀终端有限公司 | A kind of graphics processor testing method and electronic equipment |
| CN115061859A (en)* | 2022-04-25 | 2022-09-16 | 深圳无域科技技术有限公司 | Applied test method, device, computer equipment and storage medium |
| CN114860605A (en)* | 2022-05-25 | 2022-08-05 | 广东三维家信息科技有限公司 | A software testing method, device, electronic device and storage medium |
| CN115509947A (en)* | 2022-10-27 | 2022-12-23 | 平安银行股份有限公司 | A test result verification method, device, electronic equipment and storage medium |
| CN116187625B (en)* | 2023-04-24 | 2023-07-14 | 中国西安卫星测控中心 | Space survey operation control resource scheduling plan comparison method and device based on bit operation |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107741903A (en)* | 2017-09-11 | 2018-02-27 | 平安科技(深圳)有限公司 | Application compatibility method of testing, device, computer equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10296438B2 (en)* | 2017-04-16 | 2019-05-21 | International Business Machines Corporation | Integrating synthetic performance measurements with continuous delivery pipelines |
| CN107992409B (en)* | 2017-11-21 | 2020-08-21 | 平安养老保险股份有限公司 | Test case generation method and device, computer equipment and storage medium |
| CN109960653A (en)* | 2019-02-18 | 2019-07-02 | 天津五八到家科技有限公司 | Regression testing method, device, equipment and storage medium |
| CN110096429A (en)* | 2019-03-18 | 2019-08-06 | 深圳壹账通智能科技有限公司 | Test report generation method, device, equipment and storage medium |
| CN111858382A (en)* | 2020-08-03 | 2020-10-30 | 北京达佳互联信息技术有限公司 | Application testing method, device, server, system and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107741903A (en)* | 2017-09-11 | 2018-02-27 | 平安科技(深圳)有限公司 | Application compatibility method of testing, device, computer equipment and storage medium |
| Publication number | Publication date |
|---|---|
| CN112631919A (en) | 2021-04-09 |
| Publication | Publication Date | Title |
|---|---|---|
| CN112631919B (en) | Contrast test method, device, computer equipment and storage medium | |
| CN110147317B (en) | Code testing method and device, electronic device and storage medium | |
| CN102841841B (en) | A kind of test asserts processing method and system | |
| CN112463144A (en) | Distributed storage command line service method, system, terminal and storage medium | |
| CN112631686A (en) | Data processing method, data processing device, computer equipment and storage medium | |
| CN111752844A (en) | An interface testing method, device, computing device and storage medium | |
| CN111026670B (en) | Test case generation method, test case generation device and storage medium | |
| CN111538659B (en) | Interface testing method, system, electronic equipment and storage medium of business scene | |
| CN108923997B (en) | A python-based cloud service node automatic testing method and device | |
| CN109815141B (en) | A test method and device | |
| CN108459961A (en) | The method, client and server of examination are resurveyed after a kind of failure of testing case | |
| CN113127358B (en) | A testing method, device, electronic equipment and medium | |
| CN107807869A (en) | A kind of test system and method for testing | |
| CN117493188A (en) | Interface testing methods and devices, electronic equipment and storage media | |
| US10430232B2 (en) | Controllable workflow in software configuration automation | |
| US10649808B2 (en) | Outcome-based job rescheduling in software configuration automation | |
| CN113254350A (en) | Flink operation testing method, device, equipment and storage medium | |
| CN118093435A (en) | Interface testing method and device, electronic equipment and storage medium | |
| CN117850914A (en) | Basic input and output system configuration option testing method, device, equipment and medium | |
| US10592227B2 (en) | Versioned intelligent offline execution of software configuration automation | |
| US11748246B2 (en) | Crowd-sourced QA with trusted compute model | |
| CN115185577A (en) | Data service configuration system, method, electronic device and storage medium | |
| CN114518885A (en) | Information collection method and device, electronic equipment and storage medium | |
| CN116324726A (en) | Accelerated non-volatile memory device inspection and forensics | |
| CN101197729A (en) | A general message testing method and device based on equipment status judgment |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |