WO2019056475A1 - Automated test task management method and apparatus, device, and storage medium - Google Patents

Automated test task management method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2019056475A1
WO2019056475A1 PCT/CN2017/107945 CN2017107945W WO2019056475A1 WO 2019056475 A1 WO2019056475 A1 WO 2019056475A1 CN 2017107945 W CN2017107945 W CN 2017107945W WO 2019056475 A1 WO2019056475 A1 WO 2019056475A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
task
package
test task
executed
Prior art date
Application number
PCT/CN2017/107945
Other languages
French (fr)
Chinese (zh)
Inventor
伍朗
伍振亮
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to CN201710857314.7 priority Critical
Priority to CN201710857314.7A priority patent/CN107766236B/en
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019056475A1 publication Critical patent/WO2019056475A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The present application relates to the technical field of automated testing and provides an automated test task management method and apparatus, a device, and a storage medium. The automated test task management method comprises: obtaining a test task to be executed, and obtaining, according to the test task, a test package corresponding thereto; updating a code in the test package according to a newly-added code in a system to obtain the latest version of the test package; and verifying a test environment where the test task is executed, and when the test environment is determined to meet a test condition, executing the test task according to the latest version of the test package. In the present application, when the test environment meets the test condition, the test task is executed according to the latest test package, therefore, the problem of inaccurate testing caused by a wrong version of the test package and a changed test environment is avoided, test efficiency is improved, usage of a test machine is arranged reasonably and effectively, and manpower resources are saved.

Description

测试任务自动化管理方法、装置、设备及存储介质Test task automation management method, device, device and storage medium
本专利申请以2017年9月21日提交的申请号为201710857314.7,名称为“测试任务自动化管理方法、装置、设备及存储介质”的中国发明专利申请为基础,并要求其优先权。This patent application is based on the Chinese invention patent application filed on September 21, 2017, with the application number of 201710857314.7, entitled "Test task automation management method, device, equipment and storage medium", and requires its priority.
技术领域Technical field
本申请涉及软件自动化测试技术领域,特别涉及一种自动化测试任务管理方法、装置、设备及存储介质。The present application relates to the field of software automated testing technologies, and in particular, to an automated test task management method, apparatus, device, and storage medium.
背景技术Background technique
通常测试任务的执行都是人工触发的,测试时需要执行哪一些测试包也是人工临时定义的,该种方式容易导致疏漏,而且在人工触发的时候不会对测试环境和测试机器做验证,测试结果很容易受到测试环境的影响。并且测试包在执行之前也很难有全面的检查,容易在测试执行后发现测试包版本不对,导致测试重跑。由于自动化测试包的执行一般都需要很长的时间,因此上述缺陷会造成很多的人力浪费。Usually the execution of the test task is manually triggered. Which test package needs to be executed during the test is also manually defined. This method is easy to cause omission, and the test environment and the test machine will not be verified during the manual trigger. The results are very susceptible to the test environment. And the test package is difficult to have a comprehensive check before execution. It is easy to find that the test package version is incorrect after the test is executed, causing the test to run again. Since the execution of automated test packages generally takes a long time, the above defects can cause a lot of manpower waste.
发明内容Summary of the invention
本申请的目的在于提供一种测试任务自动化管理方法、装置、设备及存储介质,能够实现在执行测试任务之前对测试包进行更新以及对测试环境进行验证,节约人力资源。The purpose of the application is to provide a test task automation management method, device, device and storage medium, which can update the test package and verify the test environment before performing the test task, thereby saving human resources.
本申请是这样实现的,本申请第一方面提供一种自动化测试任务管理方法,所述自动化测试任务管理方法包括:The application is implemented in this way. The first aspect of the present application provides an automated test task management method, where the automated test task management method includes:
获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包; Obtaining a test task to be executed, and obtaining a corresponding test package according to the test task;
根据系统中新增的代码对测试包中的代码进行更新以获取最新版本的测试包;Update the code in the test package to get the latest version of the test package based on the new code in the system;
验证执行测试任务的测试环境,当确定测试环境满足测试条件时,根据所述最新版本的测试包执行测试任务。Verify the test environment in which the test task is executed. When it is determined that the test environment meets the test conditions, perform the test task according to the latest version of the test package.
本申请第二方面提供一种自动化测试任务管理装置,所述自动化测试任务管理装置包括:The second aspect of the present application provides an automated test task management apparatus, where the automated test task management apparatus includes:
测试包获取模块,获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;The test package acquisition module acquires a test task to be executed, and obtains a corresponding test package according to the test task;
测试包更新模块,根据系统中新增的代码对测试包中的代码进行更新以获取最新版本的测试包;The test package update module updates the code in the test package according to the new code in the system to obtain the latest version of the test package;
测试环境验证模块,验证执行测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行测试任务。The test environment verification module verifies the test environment in which the test task is executed. When it is determined that the test environment meets the test condition, the test task is executed according to the latest version of the test package.
本申请第三方面提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A third aspect of the present application provides a terminal device including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer readable instructions Implement the following steps:
获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;Obtaining a test task to be executed, and obtaining a corresponding test package according to the test task;
根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包;Update the code in the test package according to the new code in the system to get the latest version of the test package;
验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务。Verifying the test environment in which the test task is executed. When it is determined that the test environment meets the test condition, the test task is executed according to the latest version of the test package.
本申请第四方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:A fourth aspect of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;Obtaining a test task to be executed, and obtaining a corresponding test package according to the test task;
根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包;Update the code in the test package according to the new code in the system to get the latest version of the test package;
验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时, 根据所述最新版本的测试包执行所述测试任务。Verifying the test environment in which the test task is performed, when it is determined that the test environment meets the test condition, The test task is performed according to the latest version of the test package.
本申请实施例提供一种自动化测试任务管理方法、装置、设备及存储介质,根据获取的测试任务获取相应的测试包,根据系统中新增的代码对测试包中的代码进行更新以获取最新测试包,验证执行测试任务的测试环境,当测试环境满足测试条件时,根据最新测试包执行测试任务,避免测试包版本不对以及测试环境被改变带来的测试不准确的问题,提高了测试效率,合理有效的安排了测试机的使用,节约了人力资源。An embodiment of the present application provides an automated test task management method, apparatus, device, and storage medium. The test package is obtained according to the obtained test task, and the code in the test package is updated according to the newly added code in the system to obtain the latest test. The package verifies the test environment for executing the test task. When the test environment meets the test conditions, the test task is executed according to the latest test package, the test package version is not correct, and the test environment is inaccurately tested, which improves the test efficiency. Reasonable and effective arrangement of the test machine, saving human resources.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only the present application. For some embodiments, other drawings may be obtained from those of ordinary skill in the art without departing from the drawings.
图1是本申请一种实施例提供的一种测试任务自动化管理方法的流程图;1 is a flowchart of a method for automatically managing a test task according to an embodiment of the present application;
图2是本申请一种实施例提供的一种测试任务自动化管理方法中的步骤S20的一种实施方式提供的具体流程图;2 is a specific flowchart provided by an implementation manner of step S20 in a method for automatically managing a test task according to an embodiment of the present application;
图3是本申请一种实施例提供的一种测试任务自动化管理方法中的步骤S30的一种实施方式提供的具体流程图;FIG. 3 is a specific flowchart provided by an implementation manner of step S30 in a method for automatically managing a test task according to an embodiment of the present application;
图4是本申请一种实施例提供的一种测试任务自动化管理方法中的步骤S30的另一种实施方式提供的具体流程图;4 is a specific flowchart provided by another implementation manner of step S30 in a method for automatically managing a test task according to an embodiment of the present application;
图5是本申请另一种实施例提供的一种测试任务自动化管理装置的结构示意图;FIG. 5 is a schematic structural diagram of a test task automation management apparatus according to another embodiment of the present application; FIG.
图6是本申请另一种实施例提供的一种测试任务自动化管理装置中的测试包更新模块的一种实施方式提供的具体结构示意图;6 is a schematic diagram of a specific structure provided by an implementation manner of a test packet update module in a test task automation management apparatus according to another embodiment of the present application;
图7是本申请另一种实施例提供的终端设备的结构示意图。 FIG. 7 is a schematic structural diagram of a terminal device according to another embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
为了说明本申请的技术方案,下面通过具体实施例来进行说明。In order to explain the technical solutions of the present application, the following description will be made by way of specific embodiments.
本申请实施例提供一种自动化测试任务管理方法,如图1所示,该自动化测试任务管理方法包括步骤S10、步骤S20以及步骤S30,每个步骤的具体内容如下:The embodiment of the present application provides an automated test task management method. As shown in FIG. 1 , the automated test task management method includes step S10, step S20, and step S30. The specific content of each step is as follows:
步骤S10.获取即将执行的测试任务,并根据测试任务获取其对应的测试包。Step S10: Acquire a test task to be executed, and obtain a corresponding test package according to the test task.
在步骤S10中,测试机在执行测试任务时可以根据用户的指令进行测试,也可以根据时间顺序执行测试,例如,测试机目前处于使用状态,待测试机执行完当前测试后即执行下一个测试,在执行每个测试任务前,通过测试任务获取测试任务的环境信息和测试包,可以通过读取测试任务的配置文件进行获取。In step S10, the test machine can perform the test according to the user's instruction when executing the test task, or can perform the test according to the time sequence. For example, the test machine is currently in use, and the next test is performed after the test machine executes the current test. Before performing each test task, obtain the environment information and test package of the test task through the test task, which can be obtained by reading the configuration file of the test task.
步骤S20.根据系统中新增的代码对测试包中的代码进行更新以获取最新版本的测试包。Step S20. Update the code in the test package according to the code added in the system to obtain the latest version of the test package.
在步骤S20中,对于测试包的更新,可以通过检测系统中是否新增代码进行检测,检测是否新增代码通常通过检测软件包的更新状态以及是否增加可人工写入的代码获得。例如,利用带有补丁包版本号的补丁包对相应的软件包进行更新,就可以根据补丁包版本号筛选出已更新的软件包,还可以是人工修改软件包后记录下来的代码,对测试包进行更新。In step S20, for the update of the test package, it may be detected by detecting whether a new code is added in the system, and detecting whether the new code is added is usually obtained by detecting the update status of the software package and whether to increase the manually writeable code. For example, by using the patch package with the patch package version number to update the corresponding software package, the updated software package can be filtered according to the version number of the service package, or the code recorded after manually modifying the software package can be tested. The package is updated.
作为一种实施方式,如图2所示,步骤S20具体包括步骤S201、步骤S202以及步骤S203,每个步骤的具体内容如下:As an embodiment, as shown in FIG. 2, step S20 specifically includes step S201, step S202, and step S203, and the specific content of each step is as follows:
步骤S201.当检查到代码服务器写入代码或者下载新的补丁包时,获取所写入或者新的补丁包中的代码。Step S201. When it is checked that the code server writes the code or downloads a new patch package, the code in the written or new patch package is obtained.
步骤S202.根据所获取的代码重新编译测试包。 Step S202. Recompile the test package according to the acquired code.
在步骤S202中,当检测到用户对测试包进行更新时,例如具有新的补丁包时,根据补丁包对测试包重新编译,以对测试包进行更新。In step S202, when it is detected that the user updates the test package, for example, when there is a new patch package, the test package is recompiled according to the patch package to update the test package.
步骤S203.确定重新编译的测试包为最新版本的测试包。Step S203. Determine that the recompiled test package is the latest version of the test package.
在步骤S203中,通过对测试包进行重新编译后,获取最新版本的测试包,采用该最新版本的测试包进行测试。In step S203, after the test package is recompiled, the latest version of the test package is obtained, and the test package of the latest version is used for testing.
本步骤中是对测试包进行更新,更新途径包括下载补丁包和合入代码服务器上的代码,避免了因测试包版本不对导致的测试失败。In this step, the test package is updated. The update path includes downloading the patch package and the code on the code server, which avoids the test failure caused by the wrong version of the test package.
步骤S30.验证执行测试任务的测试环境,当测试环境满足测试条件时,根据最新版本的测试包执行测试任务。Step S30. Verify the test environment in which the test task is executed. When the test environment meets the test condition, perform the test task according to the latest version of the test package.
在步骤S30中,当测试环境和测试包验证通过后,根据最新测试包执行测试任务。在执行测试过程中有发送功能。例如,当测试出错时,给用户发送警报信息。当测试完成时,发送测试结果给用户。In step S30, after the test environment and the test package are verified, the test task is executed according to the latest test package. There is a send function during the execution of the test. For example, when a test error occurs, an alert message is sent to the user. When the test is completed, the test results are sent to the user.
本申请实施例提供一种自动化测试任务管理方法,根据获取的测试任务获取相应的测试包,根据系统中新增的代码对测试包中的代码进行更新以获取最新测试包,验证执行测试任务的测试环境,当测试环境满足测试条件时,根据最新测试包执行测试任务。避免测试代码版本不对的问题,尽早发现环境问题提高效率,合理地安排测试机的使用。The embodiment of the present application provides an automated test task management method, which obtains a corresponding test package according to the obtained test task, updates the code in the test package according to the newly added code in the system to obtain the latest test package, and verifies the execution of the test task. Test environment, when the test environment meets the test conditions, perform test tasks according to the latest test package. Avoid problems with incorrect test code versions, find environmental problems early and improve efficiency, and arrange the use of test machines reasonably.
对于上述实施例中的步骤S30,作为一种实施方式,如图3所示,当测试环境和测试包验证通过后,根据最新测试包执行测试任务,包括:For the step S30 in the foregoing embodiment, as an implementation manner, as shown in FIG. 3, after the test environment and the test package are verified, the test task is executed according to the latest test package, including:
步骤S301.验证执行测试任务的硬件设备、网络状态以及软件版本是否满足测试条件,是,则执行步骤S303,否,则执行步骤S302,Step S301. Verify that the hardware device, the network status, and the software version of the test task meet the test conditions. If yes, go to step S303. If no, go to step S302.
在步骤S301中,测试环境验证可以是基本的验证,例如,测试机是否空闲,CPU使用状态、内存使用状态、磁盘空间状态、网络状况,软件版本也可以作为基本验证点。除了基本验证,还可以调用,测试包中的验证脚本,对测试包需要的前置条件进行验证。例如,要执行一个包含登录的测试包,可以验证一下用来登录的用户是否存在。 In step S301, the test environment verification may be basic verification, for example, whether the test machine is idle, the CPU usage status, the memory usage status, the disk space status, the network status, and the software version may also serve as a basic verification point. In addition to the basic verification, you can also call the verification script in the test package to verify the preconditions required by the test package. For example, to execute a test package that includes a login, you can verify that the user used to log in exists.
步骤S302.发出报警信息时获取所述报警信息所对应的级别代码,根据级别代码获取处理优先级,并根据所述处理优先级转入相应级别代码下的自动响应处理流程,并返回执行步骤S301。Step S302: Acquire the level code corresponding to the alarm information when the alarm information is sent, obtain the processing priority according to the level code, and transfer the processing to the automatic response processing flow under the corresponding level code according to the processing priority, and return to step S301. .
在步骤S302中,报警信息是指根据出现的异常对应的报警信号信息,即根据该报警信号信息可以明确得知出现的异常为何种异常,具体可以通过级别代码了解该报警信息的内容,根据级别代码获取处理优先级是指根据级别代码获取优先级标志代码,根据该标志代码优先处理级别较高的优先级,自动响应处理流程是指根据级别代码可以获取发生异常的具体问题,针对该具体问题执行的处理方案,执行处理方案后再返回步骤S301重新进行检测。In step S302, the alarm information refers to the alarm signal information corresponding to the abnormality that occurs, that is, according to the alarm signal information, it can be clearly known what kind of abnormality is abnormal, and the content of the alarm information can be known through the level code, according to the level. The code acquisition processing priority refers to obtaining the priority flag code according to the level code, and prioritizing the higher priority level according to the flag code, and the automatic response processing process refers to the specific problem that the exception can be obtained according to the level code, and the specific problem is solved for the specific problem. After the processing scheme is executed, the processing scheme is executed, and then the processing returns to step S301 to perform the detection again.
步骤S303.验证测试包,判定即将执行的测试任务对应的测试包与正在执行的测试任务对应的测试包是否存在冲突,是则执行步骤S304,否则执行步骤S305。Step S303. Verify the test package, determine whether there is a conflict between the test package corresponding to the test task to be executed and the test package corresponding to the test task being executed. If yes, go to step S304, otherwise go to step S305.
在步骤S303中,测试包冲突是指将要执行的测试包有一些步骤可能和现在正在执行的测试包的步骤有影响,会导致正在执行的测试包出错或执行失败或对其验证结果产生干扰。In step S303, the test package conflict means that some steps of the test package to be executed may have an impact on the steps of the test package that are currently being executed, which may result in an error or execution failure of the test package being executed or interference with the verification result.
步骤S304,管理冲突的测试包,并返回执行步骤S301。In step S304, the conflicting test packet is managed, and the process returns to step S301.
在步骤S304中,对冲突的管理是由测试脚本管理系统来管理的。例如,测试包可以通过脚本管理系统来增加、修改或删除排斥的测试包。In step S304, the management of the conflict is managed by the test script management system. For example, a test package can add, modify, or delete an excluded test package through a script management system.
步骤S305.验证通过后,根据最新版本的测试包执行任务。Step S305. After the verification is passed, the task is performed according to the latest version of the test package.
本实施方式对测试环境、测试包进行验证,能够避免因为外部因素和测试包本身因素导致的测试失败。In this embodiment, the test environment and the test package are verified, and the test failure caused by external factors and the test package itself can be avoided.
对于上述实施例中的步骤S30,作为另一种实施方式,如图4所示,根据所述最新测试包执行测试任务,之后还包括:For the step S30 in the above embodiment, as another implementation manner, as shown in FIG. 4, the test task is executed according to the latest test package, and then includes:
步骤S3021.在测试机上执行测试任务时,根据测试任务的执行状态为所述测试机设置操作完成标志,其中,当执行完成测试任务时,将操作完成标志置1,当未完成测试任务时,将操作完成标志置0。 Step S3021. When the test task is executed on the test machine, the operation completion flag is set for the test machine according to the execution state of the test task, wherein when the test task is completed, the operation completion flag is set to 1, when the test task is not completed, Set the operation completion flag to 0.
步骤S3022.当优先级别高于当前测试任务的高优先级别测试任务访问测试机时,查询所述测试机操作完成标志是否被置1,如果是,则执行步骤S3023,如果否,则执行步骤S3024。Step S3022. When the high priority test task with the priority level higher than the current test task accesses the test machine, query whether the test machine operation completion flag is set to 1, if yes, execute step S3023, if no, execute step S3024. .
在步骤S3022中,在执行测试任务时,每个测试任务均对应优先级别,可以通过查表的方式查询测试任务的优先级别,当高优先级别的测试任务访问时,通过查询操作完成标志判断测试机是否正在执行任务,如果正在执行任务,则中断当前任务,执行高级别测试任务。In step S3022, when the test task is executed, each test task corresponds to a priority level, and the priority level of the test task can be queried by means of a table lookup. When the high priority test task is accessed, the flag judgment test is completed by the query operation. Whether the machine is performing a task, if the task is being executed, the current task is interrupted and a high-level test task is executed.
步骤S3023.访问测试机,执行高级别测试任务并将操作完成标志清0。Step S3023. Access the test machine, execute a high-level test task, and clear the operation completion flag.
在步骤S3023中,当操作完成标志被置1时,说明测试机正处于空闲状态,测试可以直接执行新的测试任务,并且在执行测试任务时,将操作完成标志清0,说明此时正处于执行测试任务状态。In step S3023, when the operation completion flag is set to 1, the test machine is in an idle state, the test can directly execute a new test task, and when the test task is executed, the operation completion flag is cleared to 0, indicating that the operation is being Execute the test task status.
步骤S3024.打断当前测试任务并访问测试机,并将访问冲突标志置1。Step S3024. Interrupt the current test task and access the test machine, and set the access violation flag to 1.
在步骤S3024中,对当前测试任务进行中断后,执行新的高优先级测试任务时,将访问冲突标志置1,访问冲突标志置1是指正在执行测试任务,不再接收中断指令,由于已经中断一次测试任务,为避免等待任务过多,将访问冲突标志置1,执行完成当前测试任务再执行其他测试任务。In step S3024, after the current test task is interrupted, when the new high priority test task is executed, the access conflict flag is set to 1, and the access conflict flag is set to 1 that the test task is being executed, and the interrupt instruction is no longer received, since To interrupt a test task, to avoid waiting for too many tasks, set the access violation flag to 1, perform the current test task and then perform other test tasks.
步骤S3025.当所述高优先级别测试任务完成时,继续执行中断的测试任务,并将所述访问冲突标志置0。Step S3025. When the high priority test task is completed, the interrupted test task is continued to be executed, and the access conflict flag is set to zero.
在步骤S3025中,将所述访问冲突标志置0是指可以进行中断,即在执行该测试任务时仍然可以继续被中断。In step S3025, setting the access violation flag to 0 means that an interrupt can be performed, that is, it can continue to be interrupted when the test task is executed.
本实施方式是对测试包存在冲突时的一种具体的冲突管理,在测试机上执行测试时,为测试机设置访问冲突标志,当低优先级任务访问测试机,并循环查询测试机操作完成标志是否被置1时,中断服务例程或高优先级任务打断低优先级任务并访问测试机,在查询到测试机操作完成标志被置1后,将其清0,并将访问冲突标志置1,随着中断返回或任务重新调度,低优先级任务继续执行,会检测到测试机操作完成标志为0,但访问冲突标志为1,则退出循环查询, 重试访问测试机。通过这种管理,可有效避免测试包冲突导致的测试失败。This embodiment is a specific conflict management when there is a conflict in the test package. When the test is performed on the test machine, an access conflict flag is set for the test machine, when the low priority task accesses the test machine, and the test machine operation completion flag is cyclically queried. Whether it is set to 1, the interrupt service routine or high priority task interrupts the low priority task and accesses the test machine. After the query to test machine operation completion flag is set to 1, it is cleared to 0, and the access violation flag is set. 1, as the interrupt returns or the task is rescheduled, the low priority task continues to execute, it will detect that the test machine operation completion flag is 0, but the access violation flag is 1, then the loop query is exited. Retry access to the test machine. Through this management, test failures caused by test packet conflicts can be effectively avoided.
对于上述实施例中的步骤S30,作为另一种实施方式,当测试环境和测试包的最新版本验证通过后,根据最新测试包执行测试任务,在执行测试过程中发生测试出错时向用户进行报警,可以对测试包中的代码进行测试获取有问题的代码,并在对用户报警中将有问题的代码进行标识,使用户可以快速修改有问题的代码,具体测试过程如下:For the step S30 in the above embodiment, as another embodiment, after the test environment and the latest version of the test package are verified, the test task is executed according to the latest test package, and the user is alerted when a test error occurs during the execution of the test. You can test the code in the test package to get the problematic code, and identify the problematic code in the user alarm, so that the user can quickly modify the problematic code. The specific test process is as follows:
将当前版本与最近一次运行成功版本的代码进行对比;具体的,针对某个运行失败的测试脚本,测试脚本中的代码主要是一些类方法的代码,方法之间存在树型的层次调用关系,所有方法可形成一棵方法调用关系树,在测试脚本的运行过程中,每次运行到要进入一个方法前,输出标志将这个方法与其他方法的调用关系进行记录,通过该方式,就记录下了测试脚本中所有方法之间的调用关系,最终形成方法调用层次,根据方法调用的层次关系对文件中的方法进行对比,例如,有三个记录了当前版本类方法代码的文件,分别是文件A1、文件B1、文件C1,此时还需要得到这三个文件在最近一次运行成功的版本代码,如文件A2、文件B2、文件C2,然后根据每个文件中的层次关系将A1与A2、B1与B2、C1与C2进行两两对比,找出两个版本中的代码是否有变更。将对比发现的变化代码进行标记,并将标记的代码定位为运行失败的原因。Compare the current version with the code of the last successful running version; specifically, for a test script that fails to run, the code in the test script is mainly the code of some class methods, and there is a tree-level hierarchical calling relationship between the methods. All methods can form a method call relationship tree. During the running of the test script, each time before running to enter a method, the output flag records the calling relationship between this method and other methods. By this method, the record is recorded. Test the call relationship between all the methods in the script, and finally form the method call hierarchy, compare the methods in the file according to the hierarchical relationship of the method call, for example, there are three files that record the current version of the class method code, respectively file A1 , file B1, file C1, at this time you also need to get the version code of the last three successful files, such as file A2, file B2, file C2, and then A1 and A2, B1 according to the hierarchical relationship in each file. Compare B2, C1, and C2 to find out if the code in the two versions has changed. Mark the change code found and compare the tagged code to the reason why the run failed.
进一步的,将上述经过标记后的代码形成代码集,由于上述方法对变化的代码进行标记的地方可能有多处,通过依次减少代码集中的标记的代码对代码集进行重复测试,设置从代码集中移除一处标记的代码,对剩下的代码进行测试,如果通过测试则对移除的代码进行标识,如果没有通过,则再移除下一处标记的代码,直至代码集中剩余的代码通过测试,例如,测试1)移除代码集中的第一处标记的代码,通过测试则标识该第一处标记的代码,未通过则进入测试2)移除代码集中的第二处标记的代码,通过测试则标识该第二处标记的代码,依次类推直至代码集中剩余的代码通过测试。 Further, the tagged code is formed into a code set, and there may be multiple places where the changed code is marked by the above method, and the code set is repeatedly tested by sequentially reducing the code of the tag in the code set, and the code set is set from the code set. Remove the code of a tag, test the remaining code, and if it passes the test, identify the removed code. If not, remove the code of the next tag until the remaining code in the code set passes. Testing, for example, testing 1) removing the code of the first tag in the code set, identifying the code of the first tag by testing, entering the test by failing 2) removing the code of the second tag in the code set, The test identifies the code of the second tag, and so on until the remaining code in the code set passes the test.
通过对代码集中标记的变化的代码分别进行移除,可以准确标记代码集中有问题的代码。By removing the code that changes the markup in the code set separately, you can accurately mark the problematic code in the code set.
本申请另一种实施例提供一种测试任务自动化管理装置40,如图5所示,测试任务自动化管理装置40包括:Another embodiment of the present application provides a test task automation management apparatus 40. As shown in FIG. 5, the test task automation management apparatus 40 includes:
测试包获取模块401,获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;The test package obtaining module 401 obtains a test task to be executed, and obtains a corresponding test package according to the test task;
测试包更新模块402,根据系统中新增的代码对测试包中的代码进行更新以获取最新版本的测试包;The test package update module 402 updates the code in the test package according to the newly added code in the system to obtain the latest version of the test package;
测试环境验证模块403,验证执行测试任务的测试环境,当测试环境满足测试条件时,根据最新版本的测试包执行测试任务。The test environment verification module 403 verifies the test environment in which the test task is executed. When the test environment satisfies the test condition, the test task is executed according to the latest version of the test package.
进一步的,如图6所示,作为一种实施方式,测试包更新模块402包括:Further, as shown in FIG. 6, as an implementation manner, the test package update module 402 includes:
代码获取模块410,当检查到代码服务器写入代码或者下载新的补丁包时,获取所写入或者新的补丁包中的代码;The code obtaining module 410 acquires the code in the written or new patch package when it is checked that the code server writes the code or downloads a new patch package;
代码编译模块420,根据所获取的代码重新编译测试包;The code compiling module 420 recompiles the test package according to the acquired code;
测试包确认模块430,确定重新编译的测试包为最新测试包。The test package validation module 430 determines that the recompiled test package is the latest test package.
所测试环境验证模块401验证执行所述测试任务的测试环境,确定所述测试环境满足测试条件,包括:The test environment verification module 401 verifies the test environment in which the test task is executed, and determines that the test environment meets the test conditions, including:
验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件时,确定所述测试环境满足测试条件;Determining that the test environment meets the test condition when verifying that the hardware device, the network state, and the software version that perform the test task meet the test condition;
或者,验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件时,并判定即将执行的测试任务对应的测试包与正在执行的测试任务对应的测试包不存在冲突时,确定所述测试环境满足测试条件。Alternatively, when it is verified that the hardware device, the network state, and the software version of the test task satisfy the test condition, and it is determined that there is no conflict between the test package corresponding to the test task to be executed and the test package corresponding to the test task being executed, The test environment satisfies the test conditions.
上述终端设备中模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。 For the specific working process of the module in the foregoing terminal device, reference may be made to the corresponding process in the foregoing method embodiment, and details are not described herein again.
本申请另一种实施例提供一计算机可读存储介质,该计算机可读存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述实施例中的自动化测试任务管理方法,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现上述实施例中测试任务自动化管理装置中各模块/单元的功能,为避免重复,这里不再赘述。Another embodiment of the present application provides a computer readable storage medium having computer readable instructions stored thereon, the computer readable instructions being executed by a processor to implement an automated test task management method in the above embodiments To avoid repetition, we will not repeat them here. Alternatively, when the computer readable instructions are executed by the processor, the functions of the modules/units in the test task automation management apparatus in the above embodiments are implemented. To avoid repetition, details are not described herein again.
图7是本实施例中终端设备的示意图。如图7所示,终端设备6包括处理器60、存储器61以及存储在存储器61中并可在处理器60上运行的计算机可读指令62。处理器60执行计算机可读指令62时实现上述实施例中测试任务自动化管理方法的各个步骤,例如图1所示的步骤S10、S20和S30。或者,处理器60执行计算机可读指令62时实现上述实施例中自动化测试任务管理装置各模块/单元的功能,如图6所示测试包获取模块401、测试包更新模块402、测试环境验证模块403的功能。Fig. 7 is a schematic diagram of a terminal device in this embodiment. As shown in FIG. 7, the terminal device 6 includes a processor 60, a memory 61, and computer readable instructions 62 stored in the memory 61 and operable on the processor 60. The processor 60 executes the computer readable instructions 62 to implement the various steps of the test task automation management method of the above-described embodiments, such as steps S10, S20, and S30 shown in FIG. Alternatively, when the processor 60 executes the computer readable instructions 62, the functions of the modules/units of the automated test task management apparatus in the above embodiments are implemented, as shown in FIG. 6, the test package acquisition module 401, the test package update module 402, and the test environment verification module. 403 features.
示例性的,计算机可读指令62可以被分割成一个或多个模块/单元(比如形成指令段),一个或者多个模块/单元被存储在存储器61中,并由处理器60执行,以完成本申请的数据处理过程。Illustratively, computer readable instructions 62 may be partitioned into one or more modules/units (such as forming an instruction segment), one or more modules/units being stored in memory 61 and executed by processor 60 to complete The data processing process of the present application.
该终端设备6可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。终端设备可包括,但不仅限于,处理器60、存储器61。本领域技术人员可以理解,图7仅仅是终端设备6的示例,并不构成对终端设备6的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如终端设备还可以包括输入输出设备、网络接入设备、总线等。The terminal device 6 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The terminal device may include, but is not limited to, the processor 60, the memory 61. It will be understood by those skilled in the art that FIG. 7 is only an example of the terminal device 6, and does not constitute a limitation of the terminal device 6, and may include more or less components than those illustrated, or combine some components, or different components. For example, the terminal device may further include an input/output device, a network access device, a bus, and the like.
所称处理器60可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理 器或者该处理器也可以是任何常规的处理器等。The processor 60 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. General purpose processor can be micro The processor or the processor can also be any conventional processor or the like.
存储器61可以是终端设备6的内部存储单元,例如终端设备6的硬盘或内存。存储器61也可以是终端设备6的外部存储设备,例如终端设备6上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器61还可以既包括终端设备6的内部存储单元也包括外部存储设备。存储器61用于存储计算机可读指令以及终端设备所需的其他程序和数据。存储器61还可以用于暂时地存储已经输出或者将要输出的数据。The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk provided on the terminal device 6, a smart memory card (SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on. Further, the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device. The memory 61 is used to store computer readable instructions and other programs and data required by the terminal device. The memory 61 can also be used to temporarily store data that has been output or is about to be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It will be clearly understood by those skilled in the art that, for convenience and brevity of description, only the division of each functional unit and module described above is exemplified. In practical applications, the above functions may be assigned to different functional units according to needs. The module is completed by dividing the internal structure of the device into different functional units or modules to perform all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the integrated unit may be implemented by hardware. Formal implementation can also be implemented in the form of software functional units. In addition, the specific names of the respective functional units and modules are only for the purpose of facilitating mutual differentiation, and are not intended to limit the scope of protection of the present application. For the specific working process of the unit and the module in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the parts that are not detailed or described in the specific embodiments may be referred to the related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法, 可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided by the present application, it should be understood that the disclosed apparatus/terminal device and method, It can be implemented in other ways. For example, the device/terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units. Or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增 减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer readable instructions, which may be stored in a computer readable storage medium. The computer readable instructions, when executed by a processor, may implement the steps of the various method embodiments described above. Wherein, the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like. The computer readable medium can include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read-Only) Memory), random access memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased according to the requirements of legislation and patent practice in the jurisdiction. Subtract, for example, in certain jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。 The above-mentioned embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still implement the foregoing embodiments. The technical solutions described in the examples are modified or equivalently replaced with some of the technical features; and the modifications or substitutions do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种测试任务自动化管理方法,其特征在于,所述测试任务自动化管理方法包括:A test task automation management method, characterized in that the test task automation management method comprises:
    获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;Obtaining a test task to be executed, and obtaining a corresponding test package according to the test task;
    根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包;Update the code in the test package according to the new code in the system to get the latest version of the test package;
    验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务。Verifying the test environment in which the test task is executed. When it is determined that the test environment meets the test condition, the test task is executed according to the latest version of the test package.
  2. 如权利要求1所述的测试任务自动化管理方法,其特征在于,根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包,包括:The test task automation management method according to claim 1, wherein the code in the test package is updated according to the code added in the system to obtain the latest version of the test package, including:
    当检查到代码服务器写入代码或者下载新的补丁包时,获取所写入或者新的补丁包中的代码;Obtain the code in the written or new patch package when it is checked that the code server writes the code or downloads a new patch package;
    根据所获取的代码重新编译测试包;Recompile the test package based on the code obtained;
    确定重新编译的测试包为最新版本的测试包。Make sure the recompiled test package is the latest version of the test package.
  3. 如权利要求1所述的测试任务自动化管理方法,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The test task automation management method according to claim 1, wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    所述验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:And verifying the test environment that performs the test task, when it is determined that the test environment meets the test condition, performing the test task according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本;Verify the hardware device, network status, and software version that performed the test task;
    当所述硬件设备、网络状态以及软件版本满足测试条件时,根据所述最新版本的测试包执行所述测试任务。When the hardware device, the network status, and the software version meet the test condition, the test task is performed according to the latest version of the test package.
  4. 如权利要求1所述的测试任务自动化管理方法,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The test task automation management method according to claim 1, wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    验证执行所述测试任务的测试环境,当所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:Verifying a test environment in which the test task is executed. When the test environment meets the test condition, the test task is executed according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件 时,并判定即将执行的测试任务对应的测试包与正在执行的测试任务对应的测试包不存在冲突时,确定所述测试环境满足测试条件。Verify that the hardware device, network status, and software version that performed the test task meet the test conditions When it is determined that there is no conflict between the test package corresponding to the test task to be executed and the test package corresponding to the test task being executed, it is determined that the test environment satisfies the test condition.
  5. 如权利要求1所述的测试任务自动化管理方法,其特征在于,根据所述最新测试包执行所述测试任务,之后还包括:The test task automation management method according to claim 1, wherein the performing the test task according to the latest test package further comprises:
    在测试机上执行测试任务时,根据测试任务的执行状态为所述测试机设置操作完成标志,其中,当执行完成测试任务时,将操作完成标志置1,当未完成测试任务时,将操作完成标志置0;When the test task is executed on the test machine, the operation completion flag is set for the test machine according to the execution state of the test task, wherein when the test task is completed, the operation completion flag is set to 1, and when the test task is not completed, the operation is completed. The flag is set to 0;
    当优先级别高于当前测试任务的高优先级别测试任务访问测试机时,查询所述测试机操作完成标志是否被置1;When the high priority test task with a higher priority than the current test task accesses the test machine, query whether the test machine operation completion flag is set to 1;
    如果操作完成标志被置1,则访问测试机,并将操作完成标志清0;If the operation completion flag is set to 1, access the test machine and clear the operation completion flag to 0;
    如果操作完成标志被置0,则打断当前测试任务并访问测试机,并将访问冲突标志置1;If the operation completion flag is set to 0, the current test task is interrupted and the test machine is accessed, and the access violation flag is set to 1;
    当所述高优先级别测试任务完成时,继续执行中断的测试任务,并将所述访问冲突标志置0。When the high priority test task is completed, the interrupted test task continues to be executed and the access violation flag is set to zero.
  6. 一种测试任务自动化管理装置,其特征在于,所述自动化测试任务管理装置包括:A test task automation management device, wherein the automated test task management device comprises:
    测试包获取模块,用于获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;a test package obtaining module, configured to acquire a test task to be executed, and obtain a corresponding test package according to the test task;
    测试包更新模块,用于根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包;a test package update module for updating code in the test package according to new code in the system to obtain the latest version of the test package;
    测试环境验证模块,用于验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务。And a test environment verification module, configured to verify a test environment that executes the test task, and when it is determined that the test environment meets the test condition, execute the test task according to the latest version of the test package.
  7. 如权利要求6所述的测试任务自动化管理装置,其特征在于,所述测试包更新模块包括:The test task automation management apparatus according to claim 6, wherein the test package update module comprises:
    代码获取单元,用于当检查到代码服务器写入代码或者下载新的补丁包时,获取所写入或者新的补丁包中的代码; a code obtaining unit, configured to acquire code in the written or new patch package when checking that the code server writes the code or downloads a new patch package;
    代码编译单元,用于根据所获取的代码重新编译测试包;a code compilation unit for recompiling the test package according to the acquired code;
    测试包确认单元,用于确定重新编译的测试包为最新测试包。The test package confirmation unit is used to determine that the recompiled test package is the latest test package.
  8. 如权利要求6所述的测试任务自动化管理装置,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The test task automation management apparatus according to claim 6, wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    所述测试环境验证模块,验证执行所述测试任务的测试环境,确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:The test environment verification module, the test environment for executing the test task is verified, and when the test environment meets the test condition, the test task is executed according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件时,确定所述测试环境满足测试条件。When it is verified that the hardware device, the network state, and the software version that perform the test task meet the test conditions, it is determined that the test environment satisfies the test condition.
  9. 如权利要求6所述的测试任务自动化管理装置,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The test task automation management apparatus according to claim 6, wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    所述测试环境验证模块,验证执行所述测试任务的测试环境,当所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:The test environment verification module verifies the test environment in which the test task is executed. When the test environment meets the test condition, the test task is executed according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件时,并判定即将执行的测试任务对应的测试包与正在执行的测试任务对应的测试包不存在冲突时,确定所述测试环境满足测试条件。Determining the test when the hardware device, the network state, and the software version of the test task satisfy the test condition, and it is determined that the test package corresponding to the test task to be executed does not conflict with the test package corresponding to the test task being executed. The environment meets the test conditions.
  10. 如权利要求6所述的测试任务自动化管理装置,其特征在于,所述测试环境验证模块还用于:The test task automation management apparatus according to claim 6, wherein the test environment verification module is further configured to:
    在测试机上执行测试任务时,根据测试任务的执行状态为所述测试机设置操作完成标志,其中,当执行完成测试任务时,将操作完成标志置1,当未完成测试任务时,将操作完成标志置0;When the test task is executed on the test machine, the operation completion flag is set for the test machine according to the execution state of the test task, wherein when the test task is completed, the operation completion flag is set to 1, and when the test task is not completed, the operation is completed. The flag is set to 0;
    当优先级别高于当前测试任务的高优先级别测试任务访问测试机时,查询所述测试机操作完成标志是否被置1;When the high priority test task with a higher priority than the current test task accesses the test machine, query whether the test machine operation completion flag is set to 1;
    如果操作完成标志被置1,则访问测试机,并将操作完成标志清0;If the operation completion flag is set to 1, access the test machine and clear the operation completion flag to 0;
    如果操作完成标志被置0,则打断当前测试任务并访问测试机,并将访问冲突标志置1;If the operation completion flag is set to 0, the current test task is interrupted and the test machine is accessed, and the access violation flag is set to 1;
    当所述高优先级别测试任务完成时,继续执行中断的测试任务,并将所述 访问冲突标志置0。When the high priority test task is completed, the interrupted test task continues to be executed, and the The access violation flag is set to 0.
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and operable on the processor, wherein the processor executes the computer readable instructions as follows step:
    获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;Obtaining a test task to be executed, and obtaining a corresponding test package according to the test task;
    根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包;Update the code in the test package according to the new code in the system to get the latest version of the test package;
    验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务。Verifying the test environment in which the test task is executed. When it is determined that the test environment meets the test condition, the test task is executed according to the latest version of the test package.
  12. 如权利要求11所述的终端设备,其特征在于,根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包,包括:The terminal device according to claim 11, wherein the code in the test package is updated according to a code added in the system to obtain a latest version of the test package, including:
    当检查到代码服务器写入代码或者下载新的补丁包时,获取所写入或者新的补丁包中的代码;Obtain the code in the written or new patch package when it is checked that the code server writes the code or downloads a new patch package;
    根据所获取的代码重新编译测试包;Recompile the test package based on the code obtained;
    确定重新编译的测试包为最新版本的测试包。Make sure the recompiled test package is the latest version of the test package.
  13. 如权利要求11所述的终端设备,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The terminal device according to claim 11, wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    所述验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:And verifying the test environment that performs the test task, when it is determined that the test environment meets the test condition, performing the test task according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本;Verify the hardware device, network status, and software version that performed the test task;
    当所述硬件设备、网络状态以及软件版本满足测试条件时,根据所述最新版本的测试包执行所述测试任务。When the hardware device, the network status, and the software version meet the test condition, the test task is performed according to the latest version of the test package.
  14. 如权利要求11所述的终端设备,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The terminal device according to claim 11, wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    验证执行所述测试任务的测试环境,当所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括: Verifying a test environment in which the test task is executed. When the test environment meets the test condition, the test task is executed according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件时,并判定即将执行的测试任务对应的测试包与正在执行的测试任务对应的测试包不存在冲突时,确定所述测试环境满足测试条件。Determining the test when the hardware device, the network state, and the software version of the test task satisfy the test condition, and it is determined that the test package corresponding to the test task to be executed does not conflict with the test package corresponding to the test task being executed. The environment meets the test conditions.
  15. 如权利要求11所述的终端设备,其特征在于,根据所述最新测试包执行所述测试任务,之后还包括:The terminal device according to claim 11, wherein the performing the test task according to the latest test package further comprises:
    在测试机上执行测试任务时,根据测试任务的执行状态为所述测试机设置操作完成标志,其中,当执行完成测试任务时,将操作完成标志置1,当未完成测试任务时,将操作完成标志置0;When the test task is executed on the test machine, the operation completion flag is set for the test machine according to the execution state of the test task, wherein when the test task is completed, the operation completion flag is set to 1, and when the test task is not completed, the operation is completed. The flag is set to 0;
    当优先级别高于当前测试任务的高优先级别测试任务访问测试机时,查询所述测试机操作完成标志是否被置1;When the high priority test task with a higher priority than the current test task accesses the test machine, query whether the test machine operation completion flag is set to 1;
    如果操作完成标志被置1,则访问测试机,并将操作完成标志清0;If the operation completion flag is set to 1, access the test machine and clear the operation completion flag to 0;
    如果操作完成标志被置0,则打断当前测试任务并访问测试机,并将访问冲突标志置1;If the operation completion flag is set to 0, the current test task is interrupted and the test machine is accessed, and the access violation flag is set to 1;
    当所述高优先级别测试任务完成时,继续执行中断的测试任务,并将所述访问冲突标志置0。When the high priority test task is completed, the interrupted test task continues to be executed and the access violation flag is set to zero.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the following steps:
    获取即将执行的测试任务,并根据所述测试任务获取其对应的测试包;Obtaining a test task to be executed, and obtaining a corresponding test package according to the test task;
    根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包;Update the code in the test package according to the new code in the system to get the latest version of the test package;
    验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务。Verifying the test environment in which the test task is executed. When it is determined that the test environment meets the test condition, the test task is executed according to the latest version of the test package.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,根据系统中新增的代码对所述测试包中的代码进行更新以获取最新版本的测试包,包括:The computer readable storage medium of claim 16 wherein the code in the test package is updated according to new code in the system to obtain the latest version of the test package, including:
    当检查到代码服务器写入代码或者下载新的补丁包时,获取所写入或者新的补丁包中的代码; Obtain the code in the written or new patch package when it is checked that the code server writes the code or downloads a new patch package;
    根据所获取的代码重新编译测试包;Recompile the test package based on the code obtained;
    确定重新编译的测试包为最新版本的测试包。Make sure the recompiled test package is the latest version of the test package.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The computer readable storage medium of claim 16 wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    所述验证执行所述测试任务的测试环境,当确定所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:And verifying the test environment that performs the test task, when it is determined that the test environment meets the test condition, performing the test task according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本;Verify the hardware device, network status, and software version that performed the test task;
    当所述硬件设备、网络状态以及软件版本满足测试条件时,根据所述最新版本的测试包执行所述测试任务。When the hardware device, the network status, and the software version meet the test condition, the test task is performed according to the latest version of the test package.
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述测试环境包括测试任务的硬件设备、网络状态以及软件版本;The computer readable storage medium of claim 16 wherein the test environment comprises a hardware device, a network state, and a software version of the test task;
    验证执行所述测试任务的测试环境,当所述测试环境满足测试条件时,根据所述最新版本的测试包执行所述测试任务,包括:Verifying a test environment in which the test task is executed. When the test environment meets the test condition, the test task is executed according to the latest version of the test package, including:
    验证执行所述测试任务的硬件设备、网络状态以及软件版本满足测试条件时,并判定即将执行的测试任务对应的测试包与正在执行的测试任务对应的测试包不存在冲突时,确定所述测试环境满足测试条件。Determining the test when the hardware device, the network state, and the software version of the test task satisfy the test condition, and it is determined that the test package corresponding to the test task to be executed does not conflict with the test package corresponding to the test task being executed. The environment meets the test conditions.
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,根据所述最新测试包执行所述测试任务,之后还包括:The computer readable storage medium of claim 16, wherein the performing the test task according to the latest test package further comprises:
    在测试机上执行测试任务时,根据测试任务的执行状态为所述测试机设置操作完成标志,其中,当执行完成测试任务时,将操作完成标志置1,当未完成测试任务时,将操作完成标志置0;When the test task is executed on the test machine, the operation completion flag is set for the test machine according to the execution state of the test task, wherein when the test task is completed, the operation completion flag is set to 1, and when the test task is not completed, the operation is completed. The flag is set to 0;
    当优先级别高于当前测试任务的高优先级别测试任务访问测试机时,查询所述测试机操作完成标志是否被置1;When the high priority test task with a higher priority than the current test task accesses the test machine, query whether the test machine operation completion flag is set to 1;
    如果操作完成标志被置1,则访问测试机,并将操作完成标志清0;If the operation completion flag is set to 1, access the test machine and clear the operation completion flag to 0;
    如果操作完成标志被置0,则打断当前测试任务并访问测试机,并将访问冲突标志置1; If the operation completion flag is set to 0, the current test task is interrupted and the test machine is accessed, and the access violation flag is set to 1;
    当所述高优先级别测试任务完成时,继续执行中断的测试任务,并将所述访问冲突标志置0。 When the high priority test task is completed, the interrupted test task continues to be executed and the access violation flag is set to zero.
PCT/CN2017/107945 2017-09-21 2017-10-27 Automated test task management method and apparatus, device, and storage medium WO2019056475A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710857314.7 2017-09-21
CN201710857314.7A CN107766236B (en) 2017-09-21 2017-09-21 Test task automatic management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019056475A1 true WO2019056475A1 (en) 2019-03-28

Family

ID=61266298

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107945 WO2019056475A1 (en) 2017-09-21 2017-10-27 Automated test task management method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN107766236B (en)
WO (1) WO2019056475A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112564971B (en) * 2020-12-07 2022-02-22 广州芯德通信科技股份有限公司 Tr069 protocol-based automatic batch CPE (customer premise Equipment) management method
CN113626344B (en) * 2021-10-12 2022-02-08 广州嘉为科技有限公司 Scheduling method and system for software automation test

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220163A (en) * 2012-01-19 2013-07-24 阿里巴巴集团控股有限公司 Updating method and system of configuring information
US20150007138A1 (en) * 2013-06-26 2015-01-01 Sap Ag Method and system for incrementally updating a test suite utilizing run-time application executions
CN105095089A (en) * 2015-09-14 2015-11-25 北京金山安全软件有限公司 Method and apparatus for testing application performance
CN105183657A (en) * 2015-09-30 2015-12-23 上海斐讯数据通信技术有限公司 System and method for testing WEB interface
CN106326100A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Software automatic testing method and device
CN106681924A (en) * 2016-12-30 2017-05-17 深圳天珑无线科技有限公司 Software testing method and software testing system
CN106775911A (en) * 2016-11-25 2017-05-31 努比亚技术有限公司 A kind of method of testing and device for application and development

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100451989C (en) * 2007-04-20 2009-01-14 北京航空航天大学 Software testing system and testing method
CN102799515B (en) * 2011-05-24 2016-01-20 腾讯科技(深圳)有限公司 Applied program testing method and device
CN103077111B (en) * 2011-10-26 2016-02-10 阿里巴巴集团控股有限公司 A kind of localization method of continuous integrating failure use-case and system
CN103678097A (en) * 2012-09-05 2014-03-26 百度在线网络技术(北京)有限公司 Method and device for selecting regression test case
US20140245264A1 (en) * 2013-02-28 2014-08-28 International Business Machines Corporation Identifying Test Cases Based on Changed Test Code
CN103246604B (en) * 2013-03-29 2016-06-15 北京京东尚科信息技术有限公司 Software testing system and method
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system
CN106407124B (en) * 2016-11-10 2019-03-12 中国工商银行股份有限公司 A kind of programming automation test method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220163A (en) * 2012-01-19 2013-07-24 阿里巴巴集团控股有限公司 Updating method and system of configuring information
US20150007138A1 (en) * 2013-06-26 2015-01-01 Sap Ag Method and system for incrementally updating a test suite utilizing run-time application executions
CN106326100A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Software automatic testing method and device
CN105095089A (en) * 2015-09-14 2015-11-25 北京金山安全软件有限公司 Method and apparatus for testing application performance
CN105183657A (en) * 2015-09-30 2015-12-23 上海斐讯数据通信技术有限公司 System and method for testing WEB interface
CN106775911A (en) * 2016-11-25 2017-05-31 努比亚技术有限公司 A kind of method of testing and device for application and development
CN106681924A (en) * 2016-12-30 2017-05-17 深圳天珑无线科技有限公司 Software testing method and software testing system

Also Published As

Publication number Publication date
CN107766236B (en) 2021-03-02
CN107766236A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
US10620936B2 (en) Updating software
US20150007148A1 (en) Identifying Test Cases Based on Changed Test Code
US8209564B2 (en) Systems and methods for initiating software repairs in conjunction with software package updates
US8838964B2 (en) Package audit tool
US20150089297A1 (en) Using Crowd Experiences for Software Problem Determination and Resolution
WO2019056475A1 (en) Automated test task management method and apparatus, device, and storage medium
CN109271359B (en) Log information processing method and device, electronic equipment and readable storage medium
US20120054560A1 (en) Verifying correctness of processor transactions
JP2015011372A (en) Debug support system, method, program, and recording medium
JP6722528B2 (en) Software development support method and system
US20200310779A1 (en) Validating a firmware compliance policy prior to use in a production system
CN108459962B (en) Code normalization detection method and device, terminal equipment and storage medium
CN108563445B (en) Application program code detection method and server
US20190188103A1 (en) In-band monitor in system management mode context for improved cloud platform availability
US20150331772A1 (en) Methods for updating diagnostic tools on a hardware device and devices thereof
JP2011145824A (en) Information processing apparatus, fault analysis method, and fault analysis program
WO2019200808A1 (en) Test case recommendation method, electronic device, and readable storage medium
US20140143749A1 (en) Affinity recommendation in software lifecycle management
WO2019056545A1 (en) Test machine automation management method and apparatus, device, and storage medium
US10261925B2 (en) Enhanced techniques for detecting programming errors in device drivers
CN112925524A (en) Method and device for detecting unsafe direct memory access in driver
CN114253846A (en) Automatic test exception positioning method, device and equipment and readable storage medium
CN113434353A (en) Server testing method and device, electronic equipment and storage medium
TW201514728A (en) System and method for downloading file
CN111694684A (en) Abnormal construction method and device of storage equipment, electronic equipment and storage medium

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: 17925634

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 23.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17925634

Country of ref document: EP

Kind code of ref document: A1