CN116303041A - Distributed testing method and system - Google Patents

Distributed testing method and system Download PDF

Info

Publication number
CN116303041A
CN116303041A CN202310282732.3A CN202310282732A CN116303041A CN 116303041 A CN116303041 A CN 116303041A CN 202310282732 A CN202310282732 A CN 202310282732A CN 116303041 A CN116303041 A CN 116303041A
Authority
CN
China
Prior art keywords
test
cloud
strategy
equipment
client
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310282732.3A
Other languages
Chinese (zh)
Inventor
陈文峰
胡仁义
李尚春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Semiconductor Chengdu Co Ltd
Original Assignee
Spreadtrum Semiconductor Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Semiconductor Chengdu Co Ltd filed Critical Spreadtrum Semiconductor Chengdu Co Ltd
Priority to CN202310282732.3A priority Critical patent/CN116303041A/en
Publication of CN116303041A publication Critical patent/CN116303041A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明提供一种分布式测试方法及系统,所述方法包括:在测试设备上内置云测客户端,并对所需环境进行配置和初始化;在云测系统端创建测试策略;由云测系统端将所述测试策略发送至对应测试设备并启动测试任务;测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。本发明一方面能够极大限度地管理利用分散的终端设备,另一方面能够按策略将测试的用例分发到不同测试设备的终端设备上进行测试,并在各测试设备的测试任务结束后将测试结果汇总发送汇总报告,进而明显缩短测试时间、提高测试效率;节省产品测试、开发时间。

Figure 202310282732

The present invention provides a distributed test method and system. The method includes: building a cloud test client on the test device, and configuring and initializing the required environment; creating a test strategy at the cloud test system; The terminal sends the test strategy to the corresponding test equipment and starts the test task; after the test task ends, it summarizes the test results of each test equipment and sends a summary report. On the one hand, the present invention can manage and utilize scattered terminal devices to the greatest extent; on the other hand, it can distribute test cases to terminal devices of different test devices for testing according to strategies, and after the test tasks of each test device are completed, test Summarize the results and send a summary report, thereby significantly shortening the test time and improving test efficiency; saving product testing and development time.

Figure 202310282732

Description

分布式测试方法及系统Distributed testing method and system

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种分布式测试方法及系统。The invention relates to the field of computer technology, in particular to a distributed testing method and system.

背景技术Background technique

XTS(Executable Test Suite,可执行测试套)测试是对CTS(Compatibility TestSuite,兼容性测试套件)/VTS(Vendor Test Suite,Vendor接口测试套件)/STS(SecurityTest Suite,安全测试套件)等测试服务的统称,当各测试套件的测试用例均通过测试后,才可申请发布最新版本。XTS (Executable Test Suite, executable test suite) test is for CTS (Compatibility TestSuite, compatibility test suite) / VTS (Vendor Test Suite, Vendor interface test suite) / STS (SecurityTest Suite, security test suite) and other test services Collectively, when the test cases of each test suite pass the test, the latest version can be applied for release.

然而,在测试设备上只有单台终端设备的情况下,XTS测试在跑测用例较多的模块时会消耗较多时间,测试人员必须等待测试结果文件生成后才能进行下一步操作,此过程降低了测试效率。若要提高测试效率,目前只能收集终端设备到同一台测试设备利用分布式测试方法进行测试,但是在终端设备紧缺且分散的情况下十分不方便。因此,迫切需要一种能够在线利用分散在不同测试设备的终端设备进行分布式测试方案或技术。However, when there is only a single terminal device on the test device, the XTS test will consume more time when running tests on modules with many use cases. Testers must wait for the test result file to be generated before proceeding to the next step. This process reduces improved test efficiency. To improve test efficiency, at present, terminal equipment can only be collected to the same test equipment for testing using a distributed test method, but it is very inconvenient when terminal equipment is in short supply and scattered. Therefore, there is an urgent need for a distributed test solution or technology that can utilize terminal devices scattered in different test devices online.

发明内容Contents of the invention

本发明提供的分布式测试方法及系统,一方面能够极大限度地管理利用分散的终端设备,另一方面能够按策略将测试的用例分发到不同测试设备的终端设备上进行测试,并在每一台测试设备的测试任务结束后将测试结果汇总发送汇总报告,进而明显缩短测试时间、提高测试效率,节省产品测试、开发时间。The distributed testing method and system provided by the present invention, on the one hand, can manage and utilize scattered terminal equipment to the greatest extent; After the test task of a test equipment is completed, the test results are summarized and sent to a summary report, thereby significantly shortening the test time, improving test efficiency, and saving product testing and development time.

第一方面,本发明提供一种分布式测试方法,所述方法包括:In a first aspect, the present invention provides a distributed testing method, the method comprising:

在测试设备上内置云测客户端,并对所需环境进行配置和初始化;Built-in cloud test client on the test equipment, and configure and initialize the required environment;

在云测系统端创建测试策略;Create a test strategy on the cloud test system side;

由云测系统端将所述测试策略发送至对应测试设备并启动测试任务;The test strategy is sent to the corresponding test equipment by the cloud test system end and the test task is started;

测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。After the test task is completed, the test results of each test equipment are summarized and a summary report is sent.

可选地,所述在测试设备上内置云测客户端,并对所需环境进行配置和初始化包括:Optionally, the built-in cloud test client on the test device, and configuring and initializing the required environment includes:

在测试设备上内置云测客户端,并对所需环境进行配置;Built-in cloud test client on the test device, and configure the required environment;

执行云测客户端启动脚本,选择配置文件;Execute the cloud measurement client startup script and select the configuration file;

启动云测客户端后,云测系统端检测到所述测试设备并对所述测试设备进行分配管理。After the cloud test client is started, the cloud test system side detects the test equipment and allocates and manages the test equipment.

可选地,所述在云测系统端创建测试策略包括:Optionally, said creating a test strategy at the cloud testing system end includes:

由云测系统端根据终端设备信息、和/或测试信息创建对应的测试策略集合;The cloud test system side creates a corresponding set of test strategies according to the terminal device information and/or test information;

由云测系统端将所述测试策略集合作为策略参数发送至对应的测试设备;The test strategy set is sent to the corresponding test equipment as a strategy parameter by the cloud test system end;

其中,所述测试策略集合包括至少一个测试策略,且各测试策略与所述终端设备信息、和/或测试信息相对应。Wherein, the set of test strategies includes at least one test strategy, and each test strategy corresponds to the terminal device information and/or test information.

所述云测系统端根据终端设备信息、和/或测试信息创建测试策略集合包括:The cloud test system end creates a test strategy set according to terminal equipment information and/or test information including:

当所述测试设备上连接至少两台终端设备,则同时利用至少两台终端设备进行分布式测试;When at least two terminal devices are connected to the test device, at least two terminal devices are used for distributed testing at the same time;

和/或,当云测系统端与至少两台测试设备连接,则同时利用至少两台测试设备进行分布式测试。And/or, when the cloud test system is connected to at least two test devices, at least two test devices are used to perform distributed testing at the same time.

可选地,所述测试信息包括:测试包的全路径、和/或需测试的模块名称、和/或待测试的模块测试用例范围、和/或包含待测试模块的历史测试结果所在的全路径,和/或所述测试设备所在实验室的网络信息。Optionally, the test information includes: the full path of the test package, and/or the name of the module to be tested, and/or the scope of the test cases of the module to be tested, and/or the full path containing the historical test results of the module to be tested. path, and/or network information of the laboratory where the test equipment is located.

可选地,所述由云测系统端将所述测试策略发送至对应测试设备并启动测试任务包括:Optionally, the sending the test strategy to the corresponding test equipment by the cloud test system and starting the test task includes:

测试设备执行云测适配脚本,解析云测系统端发送的对应策略参数;The test equipment executes the cloud test adaptation script, and analyzes the corresponding policy parameters sent by the cloud test system;

云测适配脚本解析指定模块的用例信息;并根据策略参数中待测试的模块测试用例范围将所述范围内的用例拆分成一个计划文件,并保存在测试包路径对应目录下;The cloud test adaptation script parses the use case information of the specified module; and splits the use cases within the range into a plan file according to the scope of the module test cases to be tested in the policy parameters, and saves them in the directory corresponding to the test package path;

使用工具包执行所述计划文件,并对所述范围的用例进行测试;Execute the described planning document using the toolkit and conduct tests for the stated range of use cases;

在工具包测试完成后,云测客户端将测试结果上传至云测服务器。After the toolkit test is completed, the cloud test client uploads the test results to the cloud test server.

可选地,所述策略参数包括:测试设备上的测试包路径、和/或包含指定测试模块的历史结果文件路径。Optionally, the policy parameters include: a path of a test package on the test device, and/or a path of a historical result file containing a specified test module.

第二方面,本发明提供一种分布式测试系统,所述系统包括:In a second aspect, the present invention provides a distributed testing system, the system comprising:

配置单元,用于在测试设备上内置云测客户端,并对所需环境进行配置和初始化;The configuration unit is used to build the cloud test client on the test device, and configure and initialize the required environment;

策略创建单元,用于在云测系统端创建测试策略;A strategy creation unit is used to create a test strategy on the cloud test system side;

测试启动单元,用于通过云测系统端将所述测试策略发送至对应测试设备并启动测试任务;A test start unit, configured to send the test strategy to the corresponding test equipment through the cloud test system and start the test task;

汇总单元,用于测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。The summary unit is used to summarize the test results of each test equipment after the test task is completed, and send a summary report.

可选地,所述配置单元包括:Optionally, the configuration unit includes:

环境配置子单元,用于在测试设备上内置云测客户端,并对所需环境进行配置;The environment configuration subunit is used to build the cloud test client on the test device and configure the required environment;

选择子单元,用于执行云测客户端启动脚本,选择配置文件;Select a subunit to execute the cloud measurement client startup script and select a configuration file;

分配管理子单元,用于启动云测客户端后,通过云测系统端检测到所述测试设备并对所述测试设备进行分配管理。The allocation management subunit is used to detect the test equipment through the cloud test system after starting the cloud test client and perform allocation management on the test equipment.

可选地,所述策略创建单元包括:Optionally, the policy creation unit includes:

创建子单元,用于通过云测系统端根据终端设备信息、和/或测试信息创建对应的测试策略集合;其中,所述测试策略集合包括至少一个测试策略,且各测试策略与所述终端设备信息、和/或测试信息相对应;Create a subunit, which is used to create a corresponding test strategy set according to terminal device information and/or test information through the cloud test system; wherein, the test strategy set includes at least one test strategy, and each test strategy is related to the terminal device information, and/or test information;

发送子单元,用于通过云测系统端将所述测试策略集合作为策略参数发送至对应的测试设备。The sending subunit is configured to send the set of test strategies as strategy parameters to the corresponding test equipment through the cloud test system.

可选地,所述测试启动单元包括:Optionally, the test initiation unit includes:

策略解析子单元,用于通过测试设备执行云测适配脚本,解析云测系统端发送的对应策略参数;The policy analysis subunit is used to execute the cloud test adaptation script through the test equipment, and analyze the corresponding policy parameters sent by the cloud test system;

用例解析子单元,用于通过云测适配脚本解析指定模块的用例信息;并根据策略参数中待测试的模块测试用例范围将所述范围内的用例拆分成一个计划文件,并保存在测试包路径对应目录下;The use case analysis subunit is used to analyze the use case information of the specified module through the cloud test adaptation script; and split the use cases within the range into a plan file according to the test case range of the module to be tested in the policy parameters, and save it in the test Under the directory corresponding to the package path;

测试子单元,用于使用工具包执行所述计划文件,并对所述范围的用例进行测试;a test subunit for executing said plan file using a toolkit and testing a range of use cases;

上传子单元,用于在工具包测试完成后,通过云测客户端将测试结果上传至云测服务器。The upload subunit is used to upload the test results to the cloud test server through the cloud test client after the toolkit test is completed.

本发明提供的分布式测试方法及系统,一方面能够极大限度地管理利用分散的终端设备,灵活利用不同测试设备的终端设备,充分利用所有的终端设备资源,大大节省测试成本。另一方面能够按策略将测试的用例分发到不同测试设备的终端设备上进行测试,并在每一台测试设备的测试任务结束后将测试结果汇总,并发送汇总报告,特别是对于有大量测试用例的测试模块,本发明能够明显缩短测试时间、提高测试效率;大大节省产品测试、开发时间。The distributed test method and system provided by the present invention, on the one hand, can manage and utilize scattered terminal equipment to the greatest extent, flexibly utilize terminal equipment of different test equipment, fully utilize all terminal equipment resources, and greatly save test costs. On the other hand, test cases can be distributed to terminal devices of different test devices for testing according to strategies, and after the test task of each test device is completed, the test results can be summarized and a summary report can be sent, especially for a large number of tests The test module of the use case, the present invention can obviously shorten test time, improve test efficiency; greatly save product test and development time.

附图说明Description of drawings

图1为本发明一实施例分布式测试方法的流程图;Fig. 1 is the flowchart of the distributed test method of an embodiment of the present invention;

图2为本发明另一实施例分布式测试方法的流程图;Fig. 2 is the flow chart of another embodiment of the distributed test method of the present invention;

图3为本发明一实施例分布式测试系统的结构示意图;Fig. 3 is a schematic structural diagram of a distributed test system according to an embodiment of the present invention;

图4为本发明另一实施例分布式测试系统的结构示意图。FIG. 4 is a schematic structural diagram of a distributed testing system according to another embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明实施例提供一种分布式测试方法,如图1所示,所述方法包括:An embodiment of the present invention provides a distributed testing method, as shown in Figure 1, the method includes:

S11、在测试设备上内置云测客户端,并对所需环境进行配置和初始化;S11. Build a cloud test client on the test device, and configure and initialize the required environment;

S12、在云测系统端创建测试策略;S12. Create a test strategy on the cloud test system side;

S13、由云测系统端将所述测试策略发送至对应测试设备并启动测试任务;S13. The cloud test system sends the test strategy to the corresponding test equipment and starts the test task;

S14、测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。S14. After the test task is completed, the test results of each test device are summarized, and a summary report is sent.

本发明实施例提供的分布式测试方法,一方面能够极大限度地管理利用分散的终端设备,灵活利用不同测试设备的终端设备,充分利用所有的终端设备资源,大大节省测试成本。另一方面能够按策略将测试的用例分发到不同测试设备的终端设备上进行测试,并在每一台测试设备的测试任务结束后将测试结果汇总,并发送汇总报告,特别是对于有大量测试用例的测试模块,本发明能够明显缩短测试时间、提高测试的效率;大大节省产品测试、开发时间。The distributed test method provided by the embodiment of the present invention can manage and utilize scattered terminal equipment to the greatest extent, flexibly utilize terminal equipment of different test equipment, fully utilize all terminal equipment resources, and greatly save test costs. On the other hand, test cases can be distributed to terminal devices of different test devices for testing according to strategies, and after the test task of each test device is completed, the test results can be summarized and a summary report can be sent, especially for a large number of tests The test module of the use case, the present invention can obviously shorten the test time, improve the efficiency of the test, and greatly save the product test and development time.

例如,当待测试的模块(比如XTS测试)需要使用大量测试用例时,且具有多个可用的测试设备(可不在一个地理空间范围内)时,则可通过在给测试设备上内置云测客户端,并对待测试的模块所需环境进行配置初始化;然后由云测系统端对多个测试设备按测试策略进行分配管理;例如,给第一测试设备下发测试策略,第一测试设备根据测试策略启动测试任务,并完成测试1-S1范围内的测试用例,给第一测试设备下发测试策略,第一测试设备根据测试策略启动测试任务,并完成测试S1+1-S2范围内的测试用例……直至完成待测试模块所有的用例。然后由第一测试设备、第二测试设备……将测试结果发送给云侧系统端,由云侧系统端汇总所有的测试结果并发送完整的测试报告。For example, when the module to be tested (such as XTS test) needs to use a large number of test cases, and there are multiple available test equipment (may not be within a geographical space range), you can use the built-in cloud test client on the test equipment end, and configure and initialize the environment required by the module to be tested; then the cloud test system end allocates and manages multiple test devices according to test strategies; for example, to send a test strategy to the first test device, the first test device The strategy starts the test task, and completes the test case in the range of test 1-S 1 , sends the test strategy to the first test device, and the first test device starts the test task according to the test strategy, and completes the test in the range of S 1+1 -S 2 Test cases within...until all the test cases of the module to be tested are completed. Then, the first test equipment, the second test equipment...send the test results to the cloud side system, and the cloud side system summarizes all the test results and sends a complete test report.

另外,当测试设备与多个同类型终端设备连接时,可同时控制多个同类型终端设备进行测试,例如,如第一终端设备完成测试1-N1范围内的测试用例;第二终端设备完成测试N1+1-N2范围内的测试用例……。In addition, when the test device is connected to multiple terminal devices of the same type, it can simultaneously control multiple terminal devices of the same type for testing. Complete the test cases in the range of N 1+1 -N 2 ....

如图2所示,可选地,所述在测试设备上内置云测客户端,并对所需环境进行配置和初始化包括:As shown in Figure 2, optionally, the built-in cloud test client on the test device, and configuring and initializing the required environment includes:

S111、在测试设备上内置云测客户端,并对所需环境进行配置;S111, build a cloud test client on the test device, and configure the required environment;

S112、执行云测客户端启动脚本,选择配置文件;S112. Execute the startup script of the cloud test client, and select the configuration file;

S113、启动云测客户端后,云测系统端检测到所述测试设备并对所述测试设备进行分配管理。S113. After starting the cloud test client, the cloud test system side detects the test equipment and allocates and manages the test equipment.

具体的,本发明在待测试设备上提前内置云测客户端,配置好相关模块的所需环境,如jdk、python、刷机工具环境等。执行云测客户端启动脚本,配置文件选择XTS专用配置文件(cts-and-vts.xml)。启动云测客户端后,云测系统端即可检测到待测试设备上的终端设备并对这些设备进行管理分配。此外,需在待测试设备上准备XTS的测试环境。Specifically, the present invention builds a cloud test client in advance on the device to be tested, and configures the required environment of the relevant modules, such as jdk, python, flashing tool environment, etc. Execute the cloud test client startup script, and select the XTS special configuration file (cts-and-vts.xml) for the configuration file. After starting the cloud test client, the cloud test system can detect the terminal devices on the device to be tested and manage and allocate these devices. In addition, the XTS test environment needs to be prepared on the device to be tested.

以CTS测试模块为例,若要测试安卓13的设备,则需在待测试设备上放置与此版本对应的CTS测试包。若用户要测试某个特定模块,还需在待测试设备上准备包含该模块的历史测试结果的xml文件(test_result.xml)。Taking the CTS test module as an example, if you want to test Android 13 devices, you need to place the CTS test package corresponding to this version on the device to be tested. If the user wants to test a specific module, it is also necessary to prepare an xml file (test_result.xml) containing the historical test results of the module on the device to be tested.

可选的,在步骤S113之后还包括:Optionally, after step S113, it also includes:

S114、判断环境配置是否成功;如是,则执行步骤S12;如果否,则执行步骤S111。S114. Determine whether the environment configuration is successful; if yes, execute step S12; if not, execute step S111.

可选地,所述在云测系统端创建测试策略包括:Optionally, said creating a test strategy at the cloud testing system end includes:

S121、由云测系统端根据终端设备信息、和/或测试信息创建对应的测试策略集合;S121. The cloud test system side creates a corresponding test strategy set according to the terminal device information and/or test information;

S122、由云测系统端将所述测试策略集合作为策略参数发送至对应的测试设备;S122. The cloud test system side sends the test policy set as a policy parameter to the corresponding test equipment;

其中,所述测试策略集合包括至少一个测试策略,且各测试策略与所述终端设备信息、和/或测试信息相对应。Wherein, the set of test strategies includes at least one test strategy, and each test strategy corresponds to the terminal device information and/or test information.

所述云测系统端根据终端设备信息、和/或测试信息创建测试策略包括:The cloud test system end creates a test strategy according to terminal equipment information and/or test information including:

当所述测试设备上连接至少两台终端设备,则同时利用至少两台终端设备进行分布式测试;When at least two terminal devices are connected to the test device, at least two terminal devices are used for distributed testing at the same time;

和/或,当云测系统端与至少两台测试设备连接,则同时利用至少两台测试设备进行分布式测试。And/or, when the cloud test system is connected to at least two test devices, at least two test devices are used to perform distributed testing at the same time.

可选地,所述测试信息包括:测试包的全路径、和/或需测试的模块名称、和/或待测试的模块测试用例范围、和/或包含待测试模块的历史测试结果所在的全路径,和/或所述测试设备所在实验室的网络信息。Optionally, the test information includes: the full path of the test package, and/or the name of the module to be tested, and/or the scope of the test cases of the module to be tested, and/or the full path containing the historical test results of the module to be tested. path, and/or network information of the laboratory where the test equipment is located.

具体的,经过步S11后,云测系统端可对所有待测试设备上的终端设备进行管理,并可通过云测系统端创建策略集合。策略集合是由一系列策略(至少两个)组成,每一个策略的对象都是一台待测试设备上的终端设备。创建策略意义在于所述方法可自动或人工地为不同的待测试设备的XTS测试过程制定差异化的配置,并将这些配置以策略参数的形式下发到待测试设备。Specifically, after step S11, the cloud test system end can manage all terminal devices on the device to be tested, and can create a policy set through the cloud test system end. The policy set is composed of a series of policies (at least two), and the object of each policy is a terminal device on a device to be tested. The significance of creating a strategy lies in that the method can automatically or manually formulate differentiated configurations for the XTS testing process of different devices under test, and deliver these configurations to the devices under test in the form of policy parameters.

在每一个策略中,通过输入待测试设备上XTS测试包的部分信息,如XTS测试包在该测试设备上的全路径、需测试的模块名称、待测试模块测试用例范围、包含该模块的历史测试结果(test_result.xml)所在的全路径,以及该测试设备所在实验室的网络信息(例如:WIFI信息、互联网信息等)。In each strategy, by inputting part of the information of the XTS test package on the device to be tested, such as the full path of the XTS test package on the test device, the name of the module to be tested, the scope of the test case of the module to be tested, and the history of the module The full path where the test result (test_result.xml) is located, and the network information (such as WIFI information, Internet information, etc.) of the laboratory where the test equipment is located.

例如:当该测试设备上连接有至少两台同类型终端设备,所述方法创建的测试策略可自动或者人工选择同时利用至少两台终端设备对待测模块进行分布式测试;例如,测试人员可通过在策略中选择进行分布式测试选项(DistributedTest)来进行分布式测试;For example: when at least two terminal devices of the same type are connected to the test device, the test strategy created by the method can be automatically or manually selected to use at least two terminal devices to perform distributed testing on the module to be tested at the same time; for example, testers can pass Select the distributed test option (DistributedTest) in the strategy to perform distributed testing;

当待测试的模块为媒体相关模块时,所述方法创建的测试策略可自动调取并输入媒体文件在该待测试设备上的全路径,或人工在策略中填写媒体文件在该待测试设备上的全路径。When the module to be tested is a media-related module, the test strategy created by the method can automatically transfer and input the full path of the media file on the device to be tested, or manually fill in the media file in the strategy on the device to be tested full path.

当需要在第一次测试完成后对测试过程中未测试项和测试失败项重新测试,所述方法创建的测试策略则可在该测试策略中开启重测项并填写重测的次数。When it is necessary to retest the untested items and test failed items in the test process after the first test is completed, the test strategy created by the method can enable retest items in the test strategy and fill in the number of retests.

当需要在整个测试完成后上传最终的测试log和测试结果,所述方法创建的测试策略则可在该测试策略中自动输入或人工填写待上传目标FTP服务器的相关信息,包括服务器地址、传输端口号、用户名、用户密码、服务器内保存路径。When the final test log and test results need to be uploaded after the entire test is completed, the test strategy created by the method can automatically input or manually fill in the relevant information of the target FTP server to be uploaded in the test strategy, including server address, transmission port ID, user name, user password, save path in the server.

可选地,所述由云测系统端将所述测试策略发送至对应测试设备并启动测试任务包括:Optionally, the sending the test strategy to the corresponding test equipment by the cloud test system and starting the test task includes:

S131、测试设备执行云测适配脚本,解析云测系统端发送的对应策略参数;S131. The test device executes the cloud test adaptation script, and analyzes the corresponding policy parameters sent by the cloud test system;

例如,所述方法执行XTS云测适配脚本(start.py),解析云测系统端下发的对应策略参数,包含但不限于所述测试设备上的XTS测试包路径、包含指定测试模块的历史结果XML文件(test_result.xml)路径等。For example, the method executes the XTS cloud test adaptation script (start.py) to analyze the corresponding policy parameters issued by the cloud test system, including but not limited to the XTS test package path on the test device, the path containing the specified test module Historical result XML file (test_result.xml) path, etc.

S132、云测适配脚本解析指定模块的用例信息;并根据策略参数中待测试的模块测试用例范围将所述范围内的用例拆分成一个计划文件,并保存在测试包路径对应目录下;S132. The cloud test adaptation script parses the use case information of the specified module; and splits the use cases within the scope into a plan file according to the scope of the module test cases to be tested in the policy parameters, and saves them in the directory corresponding to the test package path;

例如,本发明所述方法可通过XTS云测适配脚本从test_result.xml中解析指定模块的用例信息,并根据步骤S131中解析出的用例范围将这个范围的用例拆分出来单独生成一个计划XML文件,保存在XTS测试包路径android-xts/subplans/目录下。For example, the method of the present invention can analyze the use case information of the specified module from test_result.xml through the XTS cloud test adaptation script, and split the use cases in this range according to the use case range parsed in step S131 to generate a plan XML separately The file is saved in the android-xts/subplans/ directory of the XTS test package path.

S133、使用工具包执行所述计划文件,并对所述范围的用例进行测试;S133. Use the toolkit to execute the plan file, and test the range of use cases;

例如,本发明所述方法可使用XTS工具包执行步骤S132中生成的计划XML文件,此时只对指定范围的用例进行了测试。For example, the method of the present invention can use the XTS toolkit to execute the plan XML file generated in step S132, and at this time only the use cases in the specified range are tested.

S134、在工具包测试完成后,云测客户端将测试结果上传至云测服务器。S134. After the toolkit test is completed, the cloud test client uploads the test result to the cloud test server.

可选地,所述参数包括:测试设备上的测试包路径、和/或包含指定测试模块的历史结果文件路径。Optionally, the parameters include: a path of a test package on the test device, and/or a path of a historical result file containing a specified test module.

S14、测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。S14. After the test task is completed, the test results of each test device are summarized, and a summary report is sent.

具体的,本发明所述方法当测试任务内所有测试策略在对应测试设备中都执行完毕后,云测客户端还可将测试结果上传至云测服务器,云测服务器对所有测试策略的结果进行分析汇总,并将分析数据通过报告的形式发送至相关人员、或设备。其中,所述报告的形式可以为表格、或文档格式。Specifically, in the method of the present invention, after all the test strategies in the test task have been executed in the corresponding test equipment, the cloud test client can also upload the test results to the cloud test server, and the cloud test server performs all test strategies on the results Analyze and summarize, and send the analyzed data to relevant personnel or equipment in the form of reports. Wherein, the form of the report may be a table or a document format.

本发明实施例还提供一种分布式测试系统,如图3所示,所述系统包括:The embodiment of the present invention also provides a distributed test system, as shown in Figure 3, the system includes:

配置单元11,用于在测试设备上内置云测客户端,并对所需环境进行配置和初始化;The configuration unit 11 is used to build the cloud test client on the test equipment, and configure and initialize the required environment;

策略创建单元12,用于在云测系统端创建测试策略;A strategy creation unit 12, used to create a test strategy at the cloud test system end;

测试启动单元13,用于通过云测系统端将所述测试策略发送至对应测试设备并启动测试任务;The test start unit 13 is used to send the test strategy to the corresponding test equipment and start the test task through the cloud test system end;

汇总单元14,用于测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。The summarizing unit 14 is used for summarizing the test results of each test equipment and sending a summary report after the test task is finished.

本发明实施例提供的分布式测试系统,所述系统一方面能够极大限度地管理利用分散的终端设备,灵活利用不同测试设备的终端设备,充分利用所有的终端设备资源,大大节省测试成本。另一方面能够利用策略创建单元12将测试的用例分发到不同测试设备的终端设备上按测试策略进行测试,并在每一台测试设备的测试任务结束后由汇总单元14将测试结果汇总,并发送汇总报告,特别是对于有大量测试用例的测试模块,本发明能够明显缩短测试时间、提高测试的效率;大大节省产品测试、开发时间。The distributed test system provided by the embodiment of the present invention, on the one hand, the system can manage and utilize scattered terminal devices to a great extent, flexibly utilize terminal devices of different test devices, fully utilize all terminal device resources, and greatly save test costs. On the other hand, it is possible to utilize the strategy creation unit 12 to distribute the use cases of the test to the terminal equipment of different test equipment for testing according to the test strategy, and after the test task of each test equipment is finished, the test results are summarized by the summary unit 14, and Sending summary reports, especially for test modules with a large number of test cases, the present invention can significantly shorten test time and improve test efficiency; greatly save product test and development time.

如图4所示,可选地,所述配置单元11包括:As shown in Figure 4, optionally, the configuration unit 11 includes:

环境配置子单元111,用于在测试设备上内置云测客户端,并对所需环境进行配置;The environment configuration subunit 111 is used to build the cloud test client on the test equipment and configure the required environment;

选择子单元112,用于执行云测客户端启动脚本,选择配置文件;The selection subunit 112 is used to execute the cloud measurement client startup script and select the configuration file;

分配管理子单元113,用于启动云测客户端后,通过云测系统端检测到所述测试设备并对所述测试设备进行分配管理。The allocation management subunit 113 is configured to detect the test equipment through the cloud test system after starting the cloud test client and perform allocation management on the test equipment.

可选地,所述配置单元11还包括:Optionally, the configuration unit 11 also includes:

判断子单元114,用于判断环境配置是否成功。The judging subunit 114 is configured to judge whether the environment configuration is successful.

可选地,所述策略创建单元12包括:Optionally, the policy creation unit 12 includes:

创建子单元121,用于通过云测系统端根据终端设备信息、和/或测试信息创建对应的测试策略集合;其中,所述测试策略集合包括至少一个测试策略,且各测试策略与所述终端设备信息、和/或测试信息相对应;Creating a subunit 121 for creating a corresponding test strategy set according to terminal device information and/or test information through the cloud test system; wherein, the test strategy set includes at least one test strategy, and each test strategy is related to the terminal Corresponding to equipment information and/or test information;

发送子单元122,用于通过云测系统端将所述测试策略集合作为策略参数发送至对应的测试设备。The sending subunit 122 is configured to send the set of test strategies as strategy parameters to the corresponding test equipment through the cloud test system.

可选地,所述测试启动单元13包括:Optionally, the test initiation unit 13 includes:

策略解析子单元131,用于通过测试设备执行云测适配脚本,解析云测系统端发送的对应策略参数;The policy analysis subunit 131 is used to execute the cloud test adaptation script through the test equipment, and analyze the corresponding policy parameters sent by the cloud test system end;

用例解析子单元132,用于通过云测适配脚本解析指定模块的用例信息;并根据策略参数中待测试的模块测试用例范围将所述范围内的用例拆分成一个计划文件,并保存在测试包路径对应目录下;The use case analysis subunit 132 is used to analyze the use case information of the specified module through the cloud test adaptation script; and according to the scope of the module test case to be tested in the policy parameter, the use case in the scope is split into a plan file, and stored in Under the corresponding directory of the test package path;

测试子单元133,用于使用工具包执行所述计划文件,并对所述范围的用例进行测试;A test subunit 133, configured to use a toolkit to execute the plan file and test the range of use cases;

上传子单元134,用于在工具包测试完成后,通过云测客户端将测试结果上传至云测服务器。The upload subunit 134 is configured to upload the test results to the cloud test server through the cloud test client after the toolkit test is completed.

所述测试设备可以为通用或专用的计算机。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。The test equipment can be a general-purpose or special-purpose computer. Examples: personal computers, server computers, handheld or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, etc.

所述移动设备可以为智能手机、或数码照相机、或数码摄像机、或平板电脑、或MP4、或核磁共振成像设备(MRI)、或电子计算机断层扫描成像设备(CT)等。The mobile device may be a smart phone, or a digital camera, or a digital video camera, or a tablet computer, or MP4, or a nuclear magnetic resonance imaging device (MRI), or an electronic computer tomography imaging device (CT).

本领域普通技术人员可以理解实现上述方法实施例中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium. The program During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM) and the like.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. All should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (11)

1.一种分布式测试方法,其特征在于,所述方法包括:1. A distributed testing method, characterized in that the method comprises: 在测试设备上内置云测客户端,并对所需环境进行配置和初始化;Built-in cloud test client on the test equipment, and configure and initialize the required environment; 在云测系统端创建测试策略;Create a test strategy on the cloud test system side; 由云测系统端将所述测试策略发送至对应测试设备并启动测试任务;The test strategy is sent to the corresponding test equipment by the cloud test system end and the test task is started; 测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。After the test task is completed, the test results of each test equipment are summarized and a summary report is sent. 2.根据权利要求1所述的方法,其特征在于,所述在测试设备上内置云测客户端,并对所需环境进行配置和初始化包括:2. The method according to claim 1, wherein the built-in cloud test client on the test device, and configuring and initializing the required environment comprises: 在测试设备上内置云测客户端,并对所需环境进行配置;Built-in cloud test client on the test device, and configure the required environment; 执行云测客户端启动脚本,选择配置文件;Execute the cloud measurement client startup script and select the configuration file; 在启动云测客户端后,云测系统端检测到所述测试设备并对所述测试设备进行分配管理。After starting the cloud test client, the cloud test system side detects the test equipment and allocates and manages the test equipment. 3.根据权利要求2所述的方法,其特征在于,所述在云测系统端创建测试策略包括:3. The method according to claim 2, wherein said creating a test strategy at the cloud testing system end comprises: 由云测系统端根据终端设备信息、和/或测试信息创建对应的测试策略集合;The cloud test system side creates a corresponding set of test strategies according to the terminal device information and/or test information; 由云测系统端将所述测试策略集合作为策略参数发送至对应的测试设备;The test strategy set is sent to the corresponding test equipment as a strategy parameter by the cloud test system end; 其中,所述测试策略集合包括至少一个测试策略,且各测试策略与所述终端设备信息、和/或测试信息相对应。Wherein, the set of test strategies includes at least one test strategy, and each test strategy corresponds to the terminal device information and/or test information. 4.根据权利要求3所述的方法,其特征在于,所述云测系统端根据终端设备信息、和/或测试信息创建测试策略集合包括:4. The method according to claim 3, wherein said cloud testing system end creates a test strategy set according to terminal device information and/or test information including: 当所述测试设备上连接至少两台终端设备,则同时利用至少两台终端设备进行分布式测试;When at least two terminal devices are connected to the test device, at least two terminal devices are used for distributed testing at the same time; 和/或,当云测系统端与至少两台测试设备连接,则同时利用至少两台测试设备进行分布式测试。And/or, when the cloud test system is connected to at least two test devices, at least two test devices are used to perform distributed testing at the same time. 5.根据权利要求3所述的方法,其特征在于,所述测试信息包括:测试包的全路径、和/或需测试的模块名称、和/或待测试的模块测试用例范围、和/或包含待测试模块的历史测试结果所在的全路径,和/或所述测试设备所在实验室的网络信息。5. The method according to claim 3, wherein the test information includes: the full path of the test package, and/or the name of the module to be tested, and/or the scope of the test case of the module to be tested, and/or It includes the full path where the historical test results of the module to be tested are located, and/or the network information of the laboratory where the test equipment is located. 6.根据权利要求1-5任一所述的方法,其特征在于,所述由云测系统端将所述测试策略发送至对应测试设备并启动测试任务包括:6. The method according to any one of claims 1-5, wherein the sending the test strategy to the corresponding test equipment by the cloud test system and starting the test task comprises: 测试设备执行云测适配脚本,解析云测系统端发送的对应策略参数;The test equipment executes the cloud test adaptation script, and analyzes the corresponding policy parameters sent by the cloud test system; 云测适配脚本解析指定模块的用例信息;并根据策略参数中待测试的模块测试用例范围将所述范围内的用例拆分成一个计划文件,并保存在测试包路径对应目录下;The cloud test adaptation script parses the use case information of the specified module; and splits the use cases within the range into a plan file according to the scope of the module test cases to be tested in the policy parameters, and saves them in the directory corresponding to the test package path; 使用工具包执行所述计划文件,并对所述范围的用例进行测试;Execute the described planning document using the toolkit and conduct tests for the stated range of use cases; 在工具包测试完成后,云测客户端将测试结果上传至云测服务器。After the toolkit test is completed, the cloud test client uploads the test results to the cloud test server. 7.根据权利要求6所述的方法,其特征在于,所述策略参数包括:测试设备上的测试包路径、和/或包含指定测试模块的历史结果文件路径。7. The method according to claim 6, wherein the policy parameters include: a test package path on the test device, and/or a path of a historical result file containing a specified test module. 8.一种分布式测试系统,其特征在于,所述系统包括:8. A distributed testing system, characterized in that the system comprises: 配置单元,用于在测试设备上内置云测客户端,并对所需环境进行配置和初始化;The configuration unit is used to build the cloud test client on the test device, and configure and initialize the required environment; 策略创建单元,用于在云测系统端创建测试策略;A strategy creation unit is used to create a test strategy on the cloud test system side; 测试启动单元,用于通过云测系统端将所述测试策略发送至对应测试设备并启动测试任务;A test start unit, configured to send the test strategy to the corresponding test equipment through the cloud test system and start the test task; 汇总单元,用于在测试任务结束后,汇总各测试设备的测试结果,并发送汇总报告。The summary unit is used for summarizing the test results of each test equipment and sending a summary report after the test task ends. 9.根据权利要求8所述的系统,其特征在于,所述配置单元包括:9. The system according to claim 8, wherein the configuration unit comprises: 环境配置子单元,用于在测试设备上内置云测客户端,并对所需环境进行配置;The environment configuration subunit is used to build the cloud test client on the test device and configure the required environment; 选择子单元,用于执行云测客户端启动脚本,选择配置文件;Select a subunit to execute the cloud measurement client startup script and select a configuration file; 分配管理子单元,用于在启动云测客户端后,通过云测系统端检测到所述测试设备并对所述测试设备进行分配管理。The allocation management subunit is used to detect the test equipment through the cloud test system and perform allocation management on the test equipment after the cloud test client is started. 10.根据权利要求8或9所述的系统,其特征在于,所述策略创建单元包括:10. The system according to claim 8 or 9, wherein the policy creation unit comprises: 创建子单元,用于通过云测系统端根据终端设备信息、和/或测试信息创建对应的测试策略集合;其中,所述测试策略集合包括至少一个测试策略,且各测试策略与所述终端设备信息、和/或测试信息相对应;Create a subunit, which is used to create a corresponding test strategy set according to terminal device information and/or test information through the cloud test system; wherein, the test strategy set includes at least one test strategy, and each test strategy is related to the terminal device information, and/or test information; 发送子单元,用于通过云测系统端将所述测试策略集合作为策略参数发送至对应的测试设备。The sending subunit is configured to send the set of test strategies as strategy parameters to the corresponding test equipment through the cloud test system. 11.根据权利要求8-10任一所述的系统,其特征在于,所述测试启动单元包括:11. The system according to any one of claims 8-10, wherein the test initiation unit comprises: 策略解析子单元,用于通过测试设备执行云测适配脚本,解析云测系统端发送的对应策略参数;The policy analysis subunit is used to execute the cloud test adaptation script through the test equipment, and analyze the corresponding policy parameters sent by the cloud test system; 用例解析子单元,用于通过云测适配脚本解析指定模块的用例信息;并根据策略参数中待测试的模块测试用例范围将所述范围内的用例拆分成一个计划文件,并保存在测试包路径对应目录下;The use case analysis subunit is used to analyze the use case information of the specified module through the cloud test adaptation script; and split the use cases within the range into a plan file according to the test case range of the module to be tested in the policy parameters, and save it in the test Under the directory corresponding to the package path; 测试子单元,用于使用工具包执行所述计划文件,并对所述范围的用例进行测试;a test subunit for executing said plan file using a toolkit and testing a range of use cases; 上传子单元,用于在工具包测试完成后,通过云测客户端将测试结果上传至云测服务器。The upload subunit is used to upload the test results to the cloud test server through the cloud test client after the toolkit test is completed.
CN202310282732.3A 2023-03-22 2023-03-22 Distributed testing method and system Pending CN116303041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310282732.3A CN116303041A (en) 2023-03-22 2023-03-22 Distributed testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310282732.3A CN116303041A (en) 2023-03-22 2023-03-22 Distributed testing method and system

Publications (1)

Publication Number Publication Date
CN116303041A true CN116303041A (en) 2023-06-23

Family

ID=86779434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310282732.3A Pending CN116303041A (en) 2023-03-22 2023-03-22 Distributed testing method and system

Country Status (1)

Country Link
CN (1) CN116303041A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991750A (en) * 2023-09-28 2023-11-03 北京索云科技股份有限公司 Pressure test method for realizing large concurrency simulation by utilizing multithreading and distributed agents

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991750A (en) * 2023-09-28 2023-11-03 北京索云科技股份有限公司 Pressure test method for realizing large concurrency simulation by utilizing multithreading and distributed agents
CN116991750B (en) * 2023-09-28 2023-12-22 北京索云科技股份有限公司 Pressure test method for realizing large concurrency simulation by utilizing multithreading and distributed agents

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN108762803B (en) Configuration management method, device, terminal equipment and storage medium
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN104699616B (en) The method of a kind of application test, Apparatus and system
US20230161694A1 (en) Orchestration for automated performance testing
US9602598B2 (en) Coordinating application migration processes
CN103186444B (en) A kind of performance test methods, test platform and test machine
US11526431B2 (en) Systems and methods for automated provisioning of a virtual mainframe test environment
US11327880B2 (en) Generic serverless performance testing framework
WO2020177385A1 (en) Virtual machine function detection method and apparatus, electronic device and storage medium
CN102651700A (en) Management test automation
CN107436844A (en) A kind of generation method and device of interface use-case intersection
CN107145440A (en) Applied program testing method, device and computer equipment
CN110888804B (en) Interface test method and interface test platform
WO2016015563A1 (en) Application program installation method and apparatus
US9170924B2 (en) Ecosystem certification of a partner product
CN114168471A (en) Test method, device, electronic equipment and storage medium
CN111930625A (en) Log obtaining method, device and system based on cloud service platform
CN116303041A (en) Distributed testing method and system
US20240333704A1 (en) Agentless gitops and custom resources for application orchestration and management
CN115185644B (en) Detection method, system, equipment and storage medium based on container interactive application
CN116136818A (en) Health inspection method, device, equipment and medium for message queue
CN112988589A (en) Interface testing method, device and system
CN116881161A (en) Software testing method, system, device and electronic equipment
CN106933718B (en) Method for monitoring performance and device

Legal Events

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