[go: up one dir, main page]

CN116185810A - Automated testing with improved scalability and compatibility - Google Patents

Automated testing with improved scalability and compatibility Download PDF

Info

Publication number
CN116185810A
CN116185810A CN202111432022.1A CN202111432022A CN116185810A CN 116185810 A CN116185810 A CN 116185810A CN 202111432022 A CN202111432022 A CN 202111432022A CN 116185810 A CN116185810 A CN 116185810A
Authority
CN
China
Prior art keywords
test
testing
agent
automated
authorization code
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
CN202111432022.1A
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.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft Technology Licensing LLC
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 Microsoft Technology Licensing LLC filed Critical Microsoft Technology Licensing LLC
Priority to CN202111432022.1A priority Critical patent/CN116185810A/en
Priority to PCT/US2022/042581 priority patent/WO2023096690A1/en
Publication of CN116185810A publication Critical patent/CN116185810A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure presents methods for performing automated testing. A test request for performing an automated test with a specified set of test equipment may be received by a registry. A test task corresponding to the test request may be generated by the registry. The test tasks may be scheduled by the registry to test agents associated with the specified test equipment set. The automated test may be performed by the test agent using the specified set of test equipment. The present disclosure also proposes an automated testing system. The automated test system may include: a registry, at least one test agent, and at least one set of test devices.

Description

具有改进的扩展性和兼容性的自动化测试Automated testing with improved scalability and compatibility

背景技术Background technique

在软件应用的开发过程中,测试作为保证应用质量极其重要的一环,起着非常关键的作用。在本文中,可以将针对其来执行测试的软件应用称为目标应用。通常,在对目标应用进行测试时,在确定了测试用例之后,可以由测试人员根据测试用例中描述的规程一步步执行测试,并将实际的测试结果与期望的测试结果进行比较,以验证目标应用的各项功能是否正确。在此过程中,为了节省人力、时间或硬件资源,提高测试效率,引入了自动化测试。自动化测试可以是把以人为驱动的测试转化为机器执行的测试的过程。在自动化测试中,可以利用特定的软件或程序来控制测试的执行以及实际的测试结果与期望的测试结果之间的比较。通过自动化测试,可以使测试流程中存在的一些重复但必要的测试任务自动化,或者可以使原本以人工的方式难以执行的一些测试任务得以执行。In the development process of software applications, testing, as an extremely important part of ensuring application quality, plays a very critical role. Herein, the software application against which testing is performed may be referred to as a target application. Usually, when testing the target application, after the test case is determined, the tester can execute the test step by step according to the procedure described in the test case, and compare the actual test result with the expected test result to verify the target Whether the functions of the application are correct. During this process, in order to save manpower, time or hardware resources and improve test efficiency, automated testing is introduced. Automated testing can be the process of turning human-driven testing into machine-executed testing. In automated testing, specific software or programs can be used to control the execution of tests and the comparison between actual test results and expected test results. Through automated testing, some repetitive but necessary testing tasks that exist in the testing process can be automated, or some testing tasks that are difficult to perform manually can be performed.

发明内容Contents of the invention

提供本发明内容以便介绍一组构思,这组构思将在以下的具体实施方式中做进一步描述。本发明内容并非旨在标识所保护主题的关键特征或必要特征,也不旨在用于限制所保护主题的范围。This Summary is provided to introduce a set of concepts that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

本公开的实施例提出了用于执行自动化测试的方法。可以通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求。可以通过所述注册中心,生成与所述测试请求相对应的测试任务。可以通过所述注册中心,将所述测试任务调度给与所述指定测试设备集相关联的测试代理。可以通过所述测试代理,利用所述指定测试设备集来执行所述自动化测试。Embodiments of the present disclosure propose methods for performing automated testing. A test request for performing automated testing with a specified set of test equipment may be received through the registry. A test task corresponding to the test request may be generated through the registration center. The test task may be dispatched to a test agent associated with the specified set of test equipment through the registration center. The automated testing may be performed by the testing agent using the specified set of testing equipment.

本公开的实施例提出了还提出了一种自动化测试系统。所述自动化测试系统可以包括:注册中心,被配置为接收用于利用指定测试设备集来执行针对目标应用的自动化测试的测试请求,生成与所述测试请求相对应的测试任务,并且将所述测试任务调度给与所述指定测试设备集相关联的测试代理;至少一个测试代理,每个测试代理被配置为接收测试任务,并且利用所接收的测试任务中所指定的测试设备集来执行自动化测试;以及至少一个测试设备集,每个测试设备集与所述至少一个测试代理中的一个测试代理相关联,并且被配置为运行所述目标应用。Embodiments of the present disclosure also propose an automated testing system. The automated test system may include: a registration center configured to receive a test request for performing an automated test for a target application using a specified set of test equipment, generate a test task corresponding to the test request, and upload the Test tasks are dispatched to test agents associated with the specified set of test equipment; at least one test agent, each test agent configured to receive test tasks and perform automation using the specified set of test equipment in the received test tasks testing; and at least one set of test equipment, each set of test equipment associated with one of the at least one test agent and configured to run the target application.

应当注意,以上一个或多个方面包括以下详细描述以及权利要求中具体指出的特征。下面的说明书及附图详细提出了所述一个或多个方面的某些说明性特征。这些特征仅仅指示可以实施各个方面的原理的多种方式,并且本公开旨在包括所有这些方面和其等同变换。It should be noted that one or more of the above aspects include the features specified in the following detailed description as well as in the claims. Certain illustrative features of the one or more aspects are set forth in detail in the following description and accompanying drawings. These features are merely indicative of the various ways in which the principles of various aspects can be implemented and this disclosure is intended to include all such aspects and their equivalents.

附图说明Description of drawings

以下将结合附图描述所公开的多个方面,这些附图被提供用以说明而非限制所公开的多个方面。The disclosed aspects will be described below with reference to the accompanying drawings, which are provided to illustrate but not limit the disclosed aspects.

图1示出了根据本公开实施例的用于执行自动化测试的示例性过程。FIG. 1 illustrates an exemplary process for performing automated testing according to an embodiment of the present disclosure.

图2示出了根据本公开实施例的用于创建测试代理的示例性过程。FIG. 2 illustrates an exemplary process for creating a test agent according to an embodiment of the disclosure.

图3示出了根据本公开实施例的用于获取测试设备集的授权码的示例性过程。FIG. 3 illustrates an exemplary process for obtaining an authorization code for a set of test devices according to an embodiment of the present disclosure.

图4示出了根据本公开实施例的示例性视频导航界面。FIG. 4 illustrates an exemplary video navigation interface according to an embodiment of the disclosure.

图5示出了根据本公开实施例的自动化测试系统的示例性架构。FIG. 5 shows an exemplary architecture of an automated testing system according to an embodiment of the present disclosure.

图6示出了根据本公开实施例的示例性测试设备集。FIG. 6 illustrates an exemplary set of test equipment according to an embodiment of the disclosure.

图7是根据本公开实施例的用于执行自动化测试的示例性方法的流程图。FIG. 7 is a flowchart of an exemplary method for performing automated testing according to an embodiment of the disclosure.

图8示出了根据本公开实施例的示例性自动化测试系统。FIG. 8 illustrates an exemplary automated testing system according to an embodiment of the disclosure.

图9示出了根据本公开实施例的用于执行自动化测试的示例性装置。FIG. 9 shows an exemplary apparatus for performing automated testing according to an embodiment of the present disclosure.

具体实施方式Detailed ways

现在将参考若干示例性实施方式来讨论本公开。应当理解,这些实施方式的讨论仅仅用于使得本领域技术人员能够更好地理解并从而实施本公开的实施例,而并非教导对本公开的范围的任何限制。The present disclosure will now be discussed with reference to several exemplary embodiments. It should be understood that the discussion of these embodiments is only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than teaching any limitation to the scope of the present disclosure.

目前,通常利用单个机器来执行自动化测试并呈现测试结果。以针对移动应用的自动化测试为例,该自动化测试通常运行在与移动设备连接的个人计算机上,并且由个人计算机来执行自动化测试并呈现测试结果。个人计算机可能会因故障而宕机。一旦宕机,自动化测试将会中断且已有的测试结果将会丢失。因此,这种方式可能难以提供可靠的自动化测试服务。此外,由于移动设备通常是以有线的方式连接到个人计算机,因此能够连接到个人计算机的移动设备的数量是有限的。这导致能够同时执行的自动化测试的数量也是受限的。Currently, a single machine is typically utilized to execute automated tests and present test results. Taking automated testing for mobile applications as an example, the automated testing usually runs on a personal computer connected to the mobile device, and the personal computer executes the automated testing and presents the test results. Personal computers may go down due to malfunctions. Once down, automated testing will be interrupted and existing test results will be lost. Therefore, it may be difficult to provide reliable automated testing services in this way. Furthermore, since mobile devices are usually wired to personal computers, the number of mobile devices that can be connected to personal computers is limited. This results in a limited number of automated tests that can be executed simultaneously.

本公开的实施例提出了改进的自动化测试服务。可以将自动化测试服务解耦到注册中心和测试代理。注册中心可以管理测试代理、调度测试任务、可视化测试结果等等。测试代理可以执行测试任务、发送测试结果给注册中心等等。注册中心和测试代理可以部署在不同的地方。可以同时部署多个测试代理。即使其中一个或一些测试代理出现故障,还能够通过其他测试代理来执行自动化测试,并且测试结果也可以被保留。注册中心也可以进行多节点部署以避免出现单节点故障。以这种方式,可以显著提高自动化测试服务的可靠性。Embodiments of the present disclosure propose improved automated testing services. Automated testing services can be decoupled to registries and testing agents. The registry can manage test agents, schedule test tasks, visualize test results, and more. The test agent can perform test tasks, send test results to the registration center, and so on. Registry and test agent can be deployed in different places. Multiple test agents can be deployed at the same time. Even if one or some of the test agents fail, automated tests can be executed by other test agents and the test results can be preserved. Registries can also be deployed on multiple nodes to avoid single node failures. In this way, the reliability of automated testing services can be significantly improved.

在一个方面,本公开的实施例提出了利用终端设备来创建测试代理。终端设备可以是位于任何地理位置的任何计算设备,例如台式计算机、膝上型计算机、平板计算机、蜂窝电话、可穿戴设备等。可以通过在终端设备上运行测试代理创建程序并向注册中心进行注册来将终端设备配置为测试代理。可以将安装了目标应用的、期望的测试设备集连接到测试代理来进行针对该目标应用的自动化测试。本文中,测试设备集可以指作为整体连接到测试代理的测试设备的集合。测试设备集的形式可以包括例如单个测试设备,由两个测试设备构成的测试设备对,以及由两个以上的测试设备构成的测试设备组等等。在本文中,测试设备可以指在其上运行目标应用并利用其来执行针对目标应用的自动化测试的计算设备,例如台式计算机、膝上型计算机、平板计算机、蜂窝电话、可穿戴设备等。由于测试代理是可以由位于任何地理位置的终端设备来创建的,并且将期望的测试设备集连接到测试代理则可以进行自动化测试,因此可以极大地扩展所支持的测试设备集的数量,从而提高自动化测试服务的扩展性。另外,这种方式使得能够便捷地利用位于任何地理位置的测试设备集来进行自动化测试。例如,用户可能位于A地,而期望的测试设备集位于B地。可以在B地创建一测试代理,并将该期望的测试设备集连接到该测试代理。位于A地的用户则可以请求利用B地的测试设备集来进行自动化测试。此外,在当前可用测试设备集数量不足的情况下,可以通过创建测试代理并将合适的测试设备集连接到测试代理来补充测试设备集,或者可以通过请求使用其他测试代理上的测试设备集来补充测试设备集。以这种方式,可以缩短用于调度测试任务以及等待测试执行的时间。In one aspect, embodiments of the present disclosure propose utilizing a terminal device to create a test agent. An end device may be any computing device such as a desktop computer, laptop computer, tablet computer, cellular phone, wearable device, etc. located in any geographic location. An end device can be configured as a test agent by running a test agent creation program on the end device and registering with the registry. A desired set of test devices on which a target application is installed can be connected to a test agent for automated testing of the target application. Herein, a set of test devices may refer to a collection of test devices connected to a test agent as a whole. The form of the test equipment set may include, for example, a single test equipment, a test equipment pair composed of two test equipment, a test equipment group composed of more than two test equipment, and so on. Herein, a test device may refer to a computing device, such as a desktop computer, laptop computer, tablet computer, cell phone, wearable device, etc., on which a target application is run and utilized to perform automated testing for the target application. Since test agents can be created by terminal devices located in any geographic location, and automated testing can be performed by connecting the desired test device set to the test agent, the number of supported test device sets can be greatly expanded, thereby improving Scalability of automated testing services. In addition, this approach makes it easy to utilize test equipment sets located in any geographic location for automated testing. For example, a user may be located at site A, while the desired set of test equipment is located at site B. A test agent can be created at site B and the desired set of test devices connected to the test agent. A user at location A can request to use the test equipment set at location B to perform automated testing. Furthermore, in cases where the number of test fixture sets currently available is insufficient, the test fixture sets can be supplemented by creating test agents and connecting suitable test fixture sets to the test agents, or by requesting the use of test fixture sets on other test agents. Complementary set of test equipment. In this way, the time for scheduling test tasks and waiting for test execution can be reduced.

在另一个方面,本公开的实施例提出了通过使测试代理支持各种类型的测试框架(testing framework)并且将各种形式的测试设备集与测试代理相关联来使得自动化测试服务能够兼容各种类型的自动化测试。可以兼容的自动化测试的类型可以包括例如针对单操作系统应用的测试、针对跨操作系统应用的测试和针对Web应用的测试等等。在本文中,单操作系统应用可以指仅涉及单个操作系统的应用,例如安卓应用、iOS应用、Windows应用、macOS应用等等。跨操作系统应用可以指涉及多个操作系统之间的交互的应用,例如涉及安卓操作系统和Windows操作系统之间的交互的应用、涉及iOS操作系统和macOS操作系统之间的交互的应用等等。Web应用可以指基于Web的应用,例如通过浏览器访问的网站、通过浏览器运行的插件等。例如,可以通过使测试代理支持例如Appium之类的测试框架,并且将安装了不同操作系统的测试设备对连接到该测试代理来实现针对跨操作系统应用的测试。以这种方式,可以使得自动化测试应用场景更加广泛,从而显著提高自动化测试服务的兼容性。In another aspect, the embodiments of the present disclosure propose to enable the automated testing service to be compatible with various Types of automated tests. Types of compatible automated tests may include, for example, tests for single operating system applications, tests for cross-operating system applications, tests for web applications, and so on. Herein, a single operating system application may refer to an application involving only a single operating system, such as an Android application, an iOS application, a Windows application, a macOS application, and the like. A cross-operating system application may refer to an application involving the interaction between multiple operating systems, such as an application involving the interaction between the Android operating system and the Windows operating system, an application involving the interaction between the iOS operating system and the macOS operating system, etc. . A web application may refer to a web-based application, such as a website accessed through a browser, a plug-in run through a browser, and the like. For example, the test for cross-operating system applications can be implemented by enabling the test agent to support a test framework such as Appium, and connecting a pair of test devices installed with different operating systems to the test agent. In this way, the application scenarios of automated testing can be made wider, thereby significantly improving the compatibility of automated testing services.

在另一个方面,本公开的实施例提出了对测试资源进行统一的管理以便在各个测试代理之间进行共享。测试资源可以包括例如目标应用的应用程序包、包括要执行的自动化测试的测试用例的测试套件、测试设备集等。应用程序包和测试套件可以存储在部署在云端的数据存储装置中并被注册中心管理。测试设备集也可以通过注册中心进行管理。以这种方式,不同的用户或团队,例如位于不同地理位置的用户或团队,可以共享测试资源,从而提高了测试资源的复用性并节省了资源成本。In another aspect, the embodiments of the present disclosure propose unified management of test resources so as to be shared among various test agents. Test resources may include, for example, an application package of a target application, a test suite including test cases for automated tests to be performed, a set of test equipment, and the like. Application packages and test suites can be stored in data storage devices deployed in the cloud and managed by the registry. Sets of test devices can also be managed through a registry. In this way, different users or teams, such as users or teams located in different geographical locations, can share test resources, thereby improving the reusability of test resources and saving resource costs.

在另一个方面,本公开的实施例提出了通过授权码来对测试设备集的使用权限进行管理。在本文中,授权码可以指与特定测试设备集相关联,并且用于授权测试请求的发送方使用该特定测试设备集来进行自动化测试的加密代码。与公开可见的测试设备集的标识符不同,测试设备集的授权码是访问受限的。测试设备集的授权码可以在创建与该测试设备集相关联的测试代理时由注册中心提供给测试代理,并进一步提供给测试代理的指定用户,例如测试代理的创建者、管理者等。另外,测试设备集的授权码可以是由注册中心在与测试设备集相关联的测试代理的指定用户准予的情况下提供给普通用户的。在测试代理从注册中心接收到用于利用指定测试设备集来执行自动化测试的测试任务时,测试代理可以确定其所接收的测试任务是否包括该指定测试设备集的授权码,并且在测试任务包括授权码的情况下执行自动化测试。以这种方式,可以避免测试设备集被任意使用,从而提高自动化测试服务的安全性。In another aspect, the embodiment of the present disclosure proposes to manage the use authority of the test equipment set through the authorization code. Herein, the authorization code may refer to an encrypted code associated with a specific test equipment set and used to authorize the sender of the test request to use the specific test equipment set to perform automated testing. Unlike the identifiers of test sets that are publicly visible, authorization codes for test sets are restricted access. The authorization code of the test equipment set can be provided to the test agent by the registration center when creating the test agent associated with the test equipment set, and further provided to the designated user of the test agent, such as the creator and manager of the test agent. Additionally, the authorization code for the set of test equipment may be provided by the registration center to the general user upon authorization by the designated user of the test agent associated with the set of test equipment. When the test agent receives from the registration center a test task for using a specified test equipment set to perform automated testing, the test agent can determine whether the test task it receives includes the authorization code of the specified test equipment set, and when the test task includes Execute automated tests without authorization codes. In this way, arbitrary use of the test equipment set can be avoided, thereby improving the security of the automated testing service.

在另一个方面,本公开的实施例提出了通过呈现视频导航界面来对自动化测试的测试结果进行可视化。视频导航界面可以包括用于显示自动化测试包括的多个测试用例的导航区域。每个测试用例是可以被选择的。视频导航界面还可以包括用于显示与被选择的测试用例相对应的视频片段的视频区域。以这种方式,可以使得用户可以方便地查看在执行自动化测试的各个用例期间测试设备的状况。更进一步地,可以将失败的测试用例的视频片段与相应的测试日志、设备日志等结合起来,从而更迅速且更准确地定位出目标应用中存在的漏洞。In another aspect, the embodiments of the present disclosure propose to visualize the test results of the automated test by presenting a video navigation interface. The video navigation interface may include a navigation area for displaying a plurality of test cases included in the automated test. Each test case can be selected. The video navigation interface may also include a video area for displaying video clips corresponding to the selected test cases. In this way, it is possible for the user to conveniently view the status of the test equipment during the execution of each use case of the automated test. Furthermore, video clips of failed test cases can be combined with corresponding test logs, device logs, etc., so as to more quickly and accurately locate the loopholes in the target application.

图1示出了根据本公开实施例的用于执行自动化测试的示例性过程100。在过程100中,可以将自动化测试服务解耦到注册中心和测试代理。注册中心可以管理测试代理、调度测试任务、可视化测试结果等等。测试代理可以执行测试任务、发送测试结果给注册中心等等。FIG. 1 illustrates an exemplary process 100 for performing automated testing according to an embodiment of the disclosure. In process 100, automated testing services can be decoupled to registries and testing agents. The registry can manage test agents, schedule test tasks, visualize test results, and more. The test agent can perform test tasks, send test results to the registration center, and so on.

在102处,可以通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求。测试请求可以包括例如目标应用的应用程序包、包括要执行的自动化测试的一组测试用例的测试套件、指定测试设备集的标识符、测试报告的接收方等等。例如,在用户发起测试请求时,可以选择要在其上执行自动化测试的测试设备集作为指定测试设备集。另外,在用户知晓指定测试设备集的授权码的情况下,测试请求还可以包括该授权码。指定测试设备集可以具有各种形式,例如单个测试设备,由两个测试设备构成的测试设备对,以及由两个以上的测试设备构成的测试设备组等等。后面将结合图6来说明测试设备集的示例性形式。测试设备可以是任何类型的计算设备,例如台式计算机、膝上型计算机、平板计算机、蜂窝电话、可穿戴设备等。优选地,在注册中心接收到测试请求之后,可以经由与其相连接的前端来向用户呈现该测试请求中的指定测试设备集的信息,例如指定测试设备集的标识符,所支持的测试类型,所支持的测试框架,指定测试设备集所包括的测试设备的当前状态、设备类型、设备型号等。At 102, a test request for performing automated testing with a specified set of test equipment can be received through a registry. A test request may include, for example, an application package of a target application, a test suite including a set of test cases for an automated test to be performed, an identifier specifying a set of test equipment, recipients of test reports, and the like. For example, when a user initiates a test request, the test equipment set on which the automated test is to be executed may be selected as the designated test equipment set. In addition, in the case that the user knows the authorization code specifying the test equipment set, the test request may also include the authorization code. The specified test equipment set can have various forms, such as a single test equipment, a test equipment pair consisting of two test equipment, a test equipment group consisting of more than two test equipment, and so on. An exemplary form of the test equipment set will be described later with reference to FIG. 6 . The test device may be any type of computing device, such as a desktop computer, laptop computer, tablet computer, cellular phone, wearable device, and the like. Preferably, after the registration center receives the test request, it can present the information of the specified test equipment set in the test request to the user via the front end connected to it, such as the identifier of the specified test equipment set, the supported test type, The supported test framework specifies the current status, device type, and device model of the test equipment included in the test equipment set.

在104处,可以通过注册中心,生成与测试请求相对应的测试任务。例如,注册中心可以从测试请求中识别应用程序包、测试套件、指定测试设备集的标识符、指定测试设备集的授权码等,并且基于所识别的应用程序包、测试套件、指定测试设备集的标识符、指定测试设备集的授权码等来生成测试任务。At 104, a test task corresponding to the test request may be generated through the registration center. For example, the registry can identify an application package, test suite, identifier for a specified test set, authorization code for a specified test set, etc. from a test request, and based on the identified application package, test suite, specified test set The identifier of the test device, the authorization code specifying the set of test equipment, etc. to generate test tasks.

在106处,可以通过注册中心,将测试任务调度给与指定测试设备集相关联的测试代理。例如,测试任务中可以包括指定测试设备集的标识符。注册中心可以识别与该指定测试设备集相关联的测试代理,并将测试任务调度给所识别出的测试代理。At 106, the test task can be dispatched to the test agent associated with the specified set of test equipment through the registration center. For example, a test task may include an identifier specifying a set of test equipment. The registry can identify test agents associated with the specified set of test equipment, and schedule test tasks to the identified test agents.

可以通过测试代理,利用指定测试设备集来执行自动化测试。优选地,测试代理可以首先确定其所接收的测试任务是否包括该测试任务中所指定的测试设备集的授权码,并且响应于确定测试任务包括授权码来执行自动化测试。例如,在108处,可以通过测试代理,确定测试任务是否包括指定测试设备集的授权码。授权码可以是来自测试请求的。Automated testing can be performed by a test agent using a specified set of test equipment. Preferably, the test agent may first determine whether the test task it has received includes an authorization code for the set of test equipment specified in the test task, and execute the automated test in response to determining that the test task includes the authorization code. For example, at 108, it may be determined, by the testing agent, whether the testing task includes an authorization code specifying a set of testing equipment. Authorization codes can be from test requests.

如果在108处确定了测试任务不包括指定测试设备集的授权码,则过程100可以进行至步骤110。在110处,不利用指定测试设备集来执行自动化测试。If it is determined at 108 that the test task does not include an authorization code specifying a set of test devices, process 100 may proceed to step 110 . At 110, automated testing is performed without the specified set of test equipment.

如果在108处确定了测试任务包括指定测试设备集的授权码,则过程100可以进行至步骤112。在112处,可以通过测试代理,利用指定测试设备集来执行自动化测试。If it is determined at 108 that the test task includes an authorization code specifying a set of test devices, process 100 may proceed to step 112 . At 112, automated testing can be performed by a testing agent using the specified set of testing equipment.

根据本公开的实施例,在执行自动化测试期间,可以对测试设备集中的每个测试设备的状态进行实时监控,以获得所测试的目标应用的性能数据。例如,可以实时监控测试设备的中央处理单元(Central Processing Unit,CPU)利用率、存储器利用率、网络连接状态等等。还可以实时监控测试设备的电池使用情况,以使得用户可以知晓所测试的目标应用的电量消耗情况。另外,还可以对应用点击的延迟进行实时监控,以使得用户可以知晓目标应用的运行速度。此外,可以通过实时捕获测试设备在执行自动化测试期间的屏幕和/或声音来录制与该自动化测试相对应的视频。所录制的视频可以包括与自动化测试所包括的多个测试用例相对应的多个视频片段。According to the embodiments of the present disclosure, during the execution of the automated test, the state of each test device in the test device set can be monitored in real time, so as to obtain performance data of the tested target application. For example, the central processing unit (Central Processing Unit, CPU) utilization rate, memory utilization rate, network connection status, etc. of the testing device may be monitored in real time. The battery usage of the test device can also be monitored in real time, so that the user can know the power consumption of the tested target application. In addition, the delay of application clicking can also be monitored in real time, so that the user can know the running speed of the target application. In addition, a video corresponding to the automated test may be recorded by capturing the screen and/or sound of the testing device during execution of the automated test in real time. The recorded video may include a plurality of video clips corresponding to the plurality of test cases included in the automated test.

在114处,可以通过测试代理,获取自动化测试的测试结果,并将测试结果发送给注册中心。自动化测试的测试结果可以包括例如与各个测试用例相对应的通过/失败信息、运行时间、测试日志、设备日志、自定义日志截图、性能数据、视频等。上述测试结果可以全面地反映所测试的目标应用的情况。可以根据上述全面的测试结果生成自动化测试的详细测试报告。详细测试报告可以有助于目标应用的开发者迅速且准确地定位出目标应用中存在的漏洞。At step 114, the test result of the automated test may be obtained through the test agent, and the test result may be sent to the registration center. The test results of the automated test may include, for example, pass/fail information corresponding to each test case, running time, test logs, device logs, custom log screenshots, performance data, videos, and the like. The above test results can fully reflect the situation of the tested target application. A detailed test report for the automated test can be generated based on the above-mentioned comprehensive test results. The detailed test report can help the developer of the target application quickly and accurately locate the vulnerabilities in the target application.

在116处,可以通过注册中心,对测试结果进行可视化。例如,可以通过指示板(dashboard)来呈现测试结果。指示板可以例如是经由与注册中心相连接的前端来显示的。优选地,在可视化测试结果时,可以呈现一视频导航界面。视频导航界面可以包括用于显示自动化测试包括的多个测试用例的导航区域。每个测试用例是可以被选择的。视频导航界面还可以包括用于显示与被选择的测试用例相对应的视频片段的视频区域。后面将结合图4来说明示例性视频导航界面。At 116, the test results can be visualized through the registry. For example, test results can be presented through a dashboard. Dashboards may be displayed, for example, via a front end connected to a registry. Preferably, when visualizing test results, a video navigation interface can be presented. The video navigation interface may include a navigation area for displaying a plurality of test cases included in the automated test. Each test case can be selected. The video navigation interface may also include a video area for displaying video clips corresponding to the selected test cases. An exemplary video navigation interface will be described later with reference to FIG. 4 .

应当理解,上文结合图1描述的用于执行自动化测试的过程仅是示例性的。根据实际应用需求,可以以任意方式对用于执行自动化测试的过程中的步骤进行替换或修改,并且该过程可以包括更多或更少的步骤。例如,测试代理可以在接收到测试任务之后直接利用测试任务中的指定测试设备集来执行自动化测试而无需确定测试任务是否包括指定测试设备集的授权码,例如在测试代理知晓测试任务是来自其指定用户的情况下。另外,在116处,除了对测试结果进行可视化之外,还可以呈现测试设备集中的测试设备的状态。此外,过程100中的步骤的具体顺序或层级仅是示例性的,可以按照与所描述顺序不同的顺序来执行用于执行自动化测试的过程。It should be understood that the process for performing automated testing described above in conjunction with FIG. 1 is only exemplary. According to actual application requirements, the steps in the process for executing the automated test may be replaced or modified in any manner, and the process may include more or fewer steps. For example, after receiving the test task, the test agent can directly use the specified test equipment set in the test task to execute the automated test without determining whether the test task includes the authorization code of the specified test equipment set, for example, when the test agent knows that the test task is from its When specifying a user. Additionally, at 116, in addition to visualizing the test results, the status of the test devices in the test device set can also be presented. Furthermore, the specific order or hierarchy of steps in process 100 is exemplary only, and the process for performing automated testing may be performed in an order different than that described.

根据本公开的实施例,测试代理可以是由终端设备创建而成的。终端设备可以是位于任何地理位置的任何计算设备,例如台式计算机、膝上型计算机、平板计算机、蜂窝电话、可穿戴设备等。例如,用户可以使用其可访问的计算设备来创建测试代理。图2示出了根据本公开实施例的用于创建测试代理的示例性过程200。According to an embodiment of the present disclosure, a test agent may be created by a terminal device. An end device may be any computing device such as a desktop computer, laptop computer, tablet computer, cellular phone, wearable device, etc. located in any geographic location. For example, a user can create a test agent using a computing device that they have access to. FIG. 2 illustrates an exemplary process 200 for creating a test agent according to an embodiment of the disclosure.

在202处,可以在终端设备上运行测试代理创建程序。测试代理创建程序可以是能够用于创建测试代理的预定计算机程序。At 202, a test agent creation program can be run on the terminal device. The test agent creation program may be a predetermined computer program that can be used to create test agents.

在204处,可以在终端设备处,向注册中心发起注册过程。例如,可以通过终端设备向注册中心发送注册请求。注册中心可以响应于接收到注册请求而对终端设备进行注册。At 204, a registration process may be initiated to the registration center at the terminal device. For example, a registration request may be sent to the registration center through the terminal device. The registration center may register the terminal device in response to receiving the registration request.

在206处,可以响应于注册过程的完成,将终端设备配置为测试代理。At 206, the end device may be configured as a test agent in response to completion of the registration process.

在注册了测试代理之后,可以进一步地,获取与该测试代理相关联的测试设备集的授权码。After the test agent is registered, the authorization code of the test equipment set associated with the test agent can be further obtained.

在208处,可以通过注册中心,接收用于生成与测试代理相关联的测试设备集的授权码的授权码生成请求。例如,测试代理可以向注册中心发送用于生成与其相关联的测试设备集的授权码的授权码生成请求。该授权码生成请求可以包括测试设备集的信息,例如测试设备集的标识符,所支持的测试类型,所支持的测试框架,测试设备集所包括的测试设备的当前状态、设备类型、设备型号等。At 208, an authorization code generation request for generating an authorization code for a set of test devices associated with the test agent can be received, via the registration center. For example, a test agent may send an authorization code generation request to the registry for generating authorization codes for a set of test devices associated therewith. The authorization code generation request may include the information of the test equipment set, such as the identifier of the test equipment set, the supported test type, the supported test framework, the current state of the test equipment included in the test equipment set, the equipment type, and the equipment model wait.

在210处,可以通过注册中心,生成授权码。例如,注册中心可以基于从测试代理接收的授权码生成请求中所包括的测试设备集的信息来生成测试设备集的授权码。At 210, an authorization code may be generated through the registration center. For example, the registration center may generate the authorization codes for the set of test devices based on the information of the set of test devices included in the authorization code generation request received from the test agent.

在212处,可以通过注册中心,将所生成的授权码发送给测试代理。At 212, the generated authorization code can be sent to the testing agent through the registration center.

由于测试代理是可以由位于任何地理位置的终端设备来创建的,并且将期望的测试设备集连接到测试代理则可以进行自动化测试,因此可以极大地扩展所支持的测试设备集的数量,从而提高自动化测试服务的扩展性。另外,用户可能位于A地,而期望的测试设备集位于B地。可以在B地创建一测试代理,并将该期望的测试设备集连接到该测试代理。位于A地的用户则可以请求利用B地的测试设备集来进行自动化测试。这种方式使得能够便捷地利用位于任何地理位置的测试设备集来进行自动化测试。此外,在当前可用测试设备集数量不足的情况下,可以通过创建测试代理并将合适的测试设备集连接到测试代理来补充测试设备集。另外地或替代地,可以通过请求使用其他测试代理上的测试设备集来补充测试设备。以这种方式,可以缩短用于调度测试任务以及等待测试执行的时间。Since test agents can be created by terminal devices located in any geographic location, and automated testing can be performed by connecting the desired test device set to the test agent, the number of supported test device sets can be greatly expanded, thereby improving Scalability of automated testing services. Alternatively, the user may be located at site A, while the desired set of test equipment is located at site B. A test agent can be created at site B and the desired set of test devices connected to the test agent. A user at location A can request to use the test equipment set at location B to perform automated testing. This approach makes it easy to use test equipment sets located in any geographic location for automated testing. Furthermore, in cases where the currently available test set is insufficient, the test set can be supplemented by creating a test agent and connecting a suitable test set to the test agent. Additionally or alternatively, test equipment may be supplemented by requesting use of test equipment sets on other test agents. In this way, the time for scheduling test tasks and waiting for test execution can be reduced.

应当理解,上文结合图2描述的用于创建测试代理的过程仅是示例性的。根据实际应用需求,可以以任意方式对用于创建测试代理的过程中的步骤进行替换或修改,并且该过程可以包括更多或更少的步骤。此外,过程200中的步骤的具体顺序或层级仅是示例性的,可以按照与所描述顺序不同的顺序来执行用于创建测试代理的过程。It should be understood that the process for creating a test agent described above in conjunction with FIG. 2 is exemplary only. According to actual application requirements, the steps in the process for creating the test agent can be replaced or modified in any manner, and the process can include more or fewer steps. Furthermore, the specific order or hierarchy of steps in process 200 is exemplary only, and the process for creating test agents may be performed in an order different than that described.

如上文所描述的,在向注册中心发起用于利用指定测试设备集来执行自动化测试的测试请求时,可以提供指定测试设备集的授权码。在测试代理从注册中心接收到与该测试请求相对应的测试任务时,测试代理可以确定其所接收的测试任务是否包括该指定测试设备集的授权码,并且在测试任务包括授权码的情况下执行自动化测试。对于与指定测试设备集相关联的测试代理的指定用户而言,例如对于测试代理的创建者、管理者等而言,可以从测试代理处获得该授权码。测试代理处的授权码可以是例如通过图2的过程200在创建了测试代理时从注册中心获得的。对于普通用户而言,例如对于不是测试代理的指定用户而言,可以经由注册中心向与指定测试设备集相关联的测试代理请求指定测试设备集的授权码。注册中心可以在与测试设备集相关联的测试代理的指定用户准予的情况下将授权码提供给普通用户。以这种方式,可以避免测试设备集被任意使用,从而提高自动化测试服务的安全性。图3示出了根据本公开实施例的用于获取测试设备集的授权码的示例性过程300。As described above, when initiating a test request to the registration center for using the specified test equipment set to perform automated testing, the authorization code of the specified test equipment set can be provided. When the test agent receives the test task corresponding to the test request from the registration center, the test agent can determine whether the test task it receives includes the authorization code of the specified test equipment set, and if the test task includes the authorization code Execute automated tests. For a designated user of a testing agent associated with a designated set of testing equipment, such as a creator, manager, etc. of the testing agent, the authorization code may be obtained from the testing agent. The authorization code at the testing agent may be obtained from the registry when the testing agent is created, eg, through process 200 of FIG. 2 . For ordinary users, for example, for designated users who are not test agents, they can request the authorization code of the designated test device set from the test agent associated with the designated test device set via the registration center. The registration center may provide the authorization code to the general user with the permission of the designated user of the testing agent associated with the set of testing devices. In this way, arbitrary use of the test equipment set can be avoided, thereby improving the security of the automated testing service. FIG. 3 illustrates an exemplary process 300 for obtaining an authorization code for a set of test devices according to an embodiment of the disclosure.

在302处,可以通过注册中心,接收用于获取指定测试设备集的授权码的授权码获取请求。授权码获取请求可以例如是从与想要利用指定测试设备集来执行自动化测试的用户相关联的计算设备接收的。At 302, an authorization code acquisition request for acquiring an authorization code of a specified test equipment set may be received through the registration center. The authorization code retrieval request may be received, for example, from a computing device associated with a user who wants to perform automated testing with a specified set of testing devices.

在304处,可以通过注册中心,将授权码获取请求转发给与该指定测试设备集相关联的测试代理。At 304, the authorization code acquisition request can be forwarded to the test agent associated with the specified set of test equipment through the registration center.

随后,可以通过注册中心,基于从测试代理接收到的响应来确定是否提供授权码。Subsequently, whether to provide an authorization code can be determined by the registry based on the response received from the test agent.

在306处,可以通过注册中心,从测试代理接收对授权码获取请求的响应。例如,测试代理可以在接收到注册中心转发的授权码获取请求之后,确定是否准予向授权码获取请求的发送方提供该授权码,并将确定结果包含在发送给注册中心的、对授权码获取请求的响应中。At 306, a response to the authorization code retrieval request can be received from the testing agent via the registry. For example, after receiving the authorization code acquisition request forwarded by the registration center, the test agent can determine whether to provide the authorization code to the sender of the authorization code acquisition request, and include the determination result in the authorization code acquisition request sent to the registration center. in response to the request.

在308处,可以通过注册中心,确定从测试代理接收到的响应是否指示测试代理准予提供授权码。如果在308处确定了从测试代理接收到的响应指示测试代理准予提供授权码,则过程300可以进行至步骤310。在310处,可以通过注册中心,提供授权码。如果在308处确定了从测试代理接收到的响应并未指示测试代理准予提供授权码,则过程300可以进行至步骤312。在312处,不提供授权码。At 308, it may be determined, by the registry, whether the response received from the testing agent indicates that the testing agent grants the authorization code. If at 308 it is determined that the response received from the testing agent indicates that the testing agent grants the authorization code, then process 300 may proceed to step 310 . At 310, the authorization code can be provided by the registration center. If at 308 it is determined that the response received from the testing agent does not indicate that the testing agent grants the authorization code, then process 300 may proceed to step 312 . At 312, no authorization code is provided.

应当理解,上文结合图3描述的用于获取测试设备集的授权码的过程仅是示例性的。根据实际应用需求,可以以任意方式对用于获取测试设备集的授权码的过程中的步骤进行替换或修改,并且该过程可以包括更多或更少的步骤。例如,测试代理在确定是否准予向授权码获取请求的发送方提供授权码时可以考虑该发送方是否曾经创建过其他测试代理。创建过其他测试代理的发送方可以优先使用该测试代理的测试设备集。此外,过程300中的步骤的具体顺序或层级仅是示例性的,可以按照与所描述顺序不同的顺序来执行用于获取测试设备集的授权码的过程。It should be understood that the process for obtaining the authorization code of the test device set described above in conjunction with FIG. 3 is only exemplary. According to actual application requirements, the steps in the process of obtaining the authorization code of the test equipment set may be replaced or modified in any manner, and the process may include more or fewer steps. For example, the test agent may consider whether the sender of the authorization code acquisition request has ever created other test agents when determining whether to grant the authorization code to the sender of the authorization code acquisition request. The sender who has created other test agents can preferentially use the test equipment set of this test agent. Furthermore, the specific order or hierarchy of steps in process 300 is exemplary only, and the process for obtaining an authorization code for a set of test devices may be performed in an order different from that described.

图4示出了根据本公开实施例的示例性视频导航界面400。FIG. 4 illustrates an exemplary video navigation interface 400 according to an embodiment of the disclosure.

视频导航界面400可以包括用于显示自动化测试包括的多个测试用例的导航区域410。在导航区域410中,示出了各个测试用例的名称和相应的时间。可选地,在导航区域410中,还示出了初始化事件、测试运行开始事件和相应的时间。优选地,可以标记失败的测试用例。可以通过各种方式来标记失败的测试用例。例如,可以将失败的测试用例显示为具有与成功的测试用例不同的颜色,可以在失败的测试用例下方显示下划线,可以突出显示失败的测试用例等等。例如,在导航区域410中突出显示了测试用例“5.NotesCardTest.createTextNote”,这表明该测试用例失败了。The video navigation interface 400 may include a navigation area 410 for displaying a plurality of test cases included in the automated test. In the navigation area 410, the names and corresponding times of the respective test cases are shown. Optionally, in the navigation area 410, initialization events, test run start events and corresponding times are also shown. Preferably, failed test cases can be flagged. Failed test cases can be marked in various ways. For example, failed test cases can be displayed with a different color than successful test cases, failed test cases can be underlined, failed test cases can be highlighted, and so on. For example, the test case "5.NotesCardTest.createTextNote" is highlighted in the navigation area 410, which indicates that the test case failed.

可以通过点击每个测试用例来选择该测试用例。视频导航界面400还可以包括用于显示与被选择的测试用例相对应的视频片段的视频区域420。在从导航区域410中选择了一个测试用例之后,与自动化测试相对应的视频可以跳到与所选择的测试用例相对应的时间点,从而可以在视频区域420中显示与所选择的测试用例的视频片段。以这种方式,可以使得用户可以方便地查看在执行自动化测试的各个用例期间测试设备的状况。更进一步地,可以将失败的测试用例的视频片段与相应的测试日志、设备日志等结合起来,以更迅速且更准确地定位出目标应用中存在的漏洞。Each test case can be selected by clicking on it. The video navigation interface 400 may also include a video area 420 for displaying video clips corresponding to the selected test cases. After selecting a test case from the navigation area 410, the video corresponding to the automated test can jump to a point in time corresponding to the selected test case, so that the video corresponding to the selected test case can be displayed in the video area 420. video clip. In this way, it is possible for the user to conveniently view the status of the test equipment during the execution of each use case of the automated test. Furthermore, video clips of failed test cases can be combined with corresponding test logs, device logs, etc., so as to more quickly and accurately locate the loopholes in the target application.

可选地,视频导航界面400还可以包括用于下载视频的按钮430和用于设置播放速度的一组按钮440。Optionally, the video navigation interface 400 may also include a button 430 for downloading the video and a set of buttons 440 for setting the playback speed.

应当理解,图4所示的视频导航界面400仅仅是视频导航界面的一个示例。根据实际应用需求,视频导航界面可以具有任意其他结构,并且可以包括更多或更少的元素。例如,在视频导航界面400中,除了显示用于下载视频和设置播放速度的按钮之外,还可以显示诸如设置视频清晰度之类的按钮。It should be understood that the video navigation interface 400 shown in FIG. 4 is just an example of a video navigation interface. According to actual application requirements, the video navigation interface may have any other structure, and may include more or less elements. For example, in the video navigation interface 400, in addition to displaying buttons for downloading videos and setting playback speed, buttons such as setting video resolution may also be displayed.

图5示出了根据本公开实施例的自动化测试系统的示例性架构500。架构500可以例如通过执行前面结合图1至图4描述的过程来提供针对目标应用的自动化测试服务。架构500可以包括注册中心510以及至少一个测试代理,例如测试代理520-1至测试代理520-K(K≥1)。另外,架构500还可以包括至少一个测试设备集。每个测试设备集可以与至少一个测试代理中的一个测试代理相关联。例如,测试设备集540-1至测试设备集540-M(M≥1)可以与测试代理520-1相关联,并且测试设备集542-1至测试设备集542-N(N≥1)可以与测试代理520-K相关联。FIG. 5 shows an exemplary architecture 500 of an automated testing system according to an embodiment of the disclosure. The architecture 500 can provide automated testing services for target applications, for example, by performing the processes described above in conjunction with FIGS. 1 to 4 . The architecture 500 may include a registration center 510 and at least one test agent, such as a test agent 520-1 to a test agent 520-K (K≧1). In addition, the architecture 500 may also include at least one test equipment set. Each set of test equipment may be associated with one of the at least one test agents. For example, test equipment set 540-1 through test equipment set 540-M (M≥1) may be associated with test agent 520-1, and test equipment set 542-1 through test equipment set 542-N (N≥1) may Associated with Testing Agent 520-K.

注册中心510可以管理测试代理、调度测试任务、可视化测试结果等等。注册中心510可以部署在云端。应当理解,尽管在架构500中,仅示出了一个注册中心510,但是在一些实施例中,注册中心也是可以扩展的。例如,自动化测试系统可以包括一个以上的注册中心。这些注册中心可以被管理成具有统一端点的注册中心集群。注册中心集群中的各个注册中心可以以分布式方式进行多节点部署,从而避免出现单节点故障。The registry 510 can manage test agents, schedule test tasks, visualize test results, and so on. The registration center 510 can be deployed in the cloud. It should be understood that although only one registry 510 is shown in architecture 500, in some embodiments, the registry can also be extended. For example, an automated testing system may include more than one registry. These registries can be managed as clusters of registries with a unified endpoint. Each registry in the registry cluster can be deployed on multiple nodes in a distributed manner, thereby avoiding single-node failures.

注册中心510可以与前端550相连接。前端550可以与用户对接,并且将与注册中心510相关联的用户界面呈现给用户。另外,注册中心510可以与数据存储装置560相连接。数据存储装置560可以部署在云端。数据存储装置560可以存储测试资源,例如应用程序包562、测试套件564等。应用程序包562可以包括用于安装、运行目标应用的应用程序。测试套件564可以包括要执行的自动化测试的一组测试用例。注册中心510可以对数据存储装置560中存储的测试资源进行管理。Registration center 510 may be connected to front end 550 . Front end 550 may interface with a user and present a user interface associated with registry 510 to the user. In addition, the registration center 510 may be connected to a data storage device 560 . The data storage device 560 can be deployed in the cloud. Data storage device 560 may store test resources, such as application package 562, test suite 564, and the like. The application package 562 may include application programs for installing and running target applications. Test suite 564 may include a set of test cases for automated testing to be performed. The registration center 510 can manage the test resources stored in the data storage device 560 .

注册中心510可以包括权限管理单元512。权限管理单元512可以对测试代理的权限进行管理。例如,权限管理单元512可以在接收到来自终端设备的注册请求时确定是否对该终端设备进行注册以将该终端设备配置为测试代理。注册请求可以是由在终端设备上运行的测试代理创建程序触发的。另外,权限管理单元512可以对用户的权限进行管理,以确定用户能够使用的测试设备集。The registration center 510 may include a rights management unit 512 . The authority management unit 512 can manage the authority of the test agent. For example, the rights management unit 512 may determine whether to register the terminal device to configure the terminal device as a test agent when receiving a registration request from the terminal device. The registration request may be triggered by a test agent creation program running on the terminal device. In addition, the authority management unit 512 can manage the user's authority to determine the test equipment set that the user can use.

注册中心510可以包括代理及设备集管理单元514。代理及设备集管理单元514可以用于管理注册到注册中心510的测试代理以及与测试代理相关联的测试设备集。测试代理和/或测试设备集中的测试设备的状态可以经由前端550呈现给用户。The registration center 510 may include a proxy and device set management unit 514 . The agent and device set management unit 514 can be used to manage the test agents registered to the registration center 510 and the test device sets associated with the test agents. The status of the test agents and/or test devices in the set of test devices may be presented to the user via the front end 550 .

注册中心510可以包括测试任务调度单元516。测试任务调度单元516可以生成与测试请求相对应的测试任务,并将测试任务调度给相应的测试代理。例如,测试请求中可能指定了要利用其来执行自动化测试的测试设备集。测试任务调度单元516可以将与测试请求相对应的测试任务调度给与该测试请求中所指定测试设备集相关联的测试代理。The registry 510 may include a test task scheduling unit 516 . The test task scheduling unit 516 can generate a test task corresponding to the test request, and schedule the test task to a corresponding test agent. For example, a test request might specify a set of test equipment with which to execute automated tests. The test task scheduling unit 516 can schedule the test task corresponding to the test request to the test agent associated with the test equipment set specified in the test request.

注册中心510可以包括测试结果可视化单元518。测试结果可视化单元518可以对自动化测试的测试结果进行可视化。自动化测试的测试结果可以包括例如与各个测试用例相对应的通过/失败信息、运行时间、测试日志、设备日志、自定义日志截图、性能数据等。优选地,在可视化测试结果时,可以呈现一视频导航界面,例如前面结合图4说明的视频导航界面400。Registry 510 may include a test result visualization unit 518 . The test result visualization unit 518 can visualize the test results of the automated test. The test results of the automated test may include, for example, pass/fail information corresponding to each test case, running time, test logs, device logs, custom log screenshots, performance data, and the like. Preferably, when visualizing the test results, a video navigation interface may be presented, such as the video navigation interface 400 described above in conjunction with FIG. 4 .

测试代理520-1至测试代理520-K中的每个测试代理520-k(1≤k≤K),可以注册到注册中心510。注册中心510和测试代理520-k可以通过例如远程过程调用(RemoteProcedure Call)来互相访问。测试代理520-k可以是由位于任何地理位置的任何计算设备创建而成的。例如,可以通过前面结合图2说明的过程200来创建测试代理。测试代理520-k可以执行测试任务、发送测试结果给注册中心510等。Each of the test agents 520 - k (1≤k≤K) among the test agents 520 - 1 to 520 -K can register with the registration center 510 . The registration center 510 and the test agent 520-k can access each other through, for example, Remote Procedure Call (Remote Procedure Call). The test agent 520-k can be created by any computing device located in any geographic location. For example, a test agent may be created through the process 200 described above in connection with FIG. 2 . The test agent 520-k can perform test tasks, send test results to the registration center 510, and so on.

测试代理520-k可以包括注册单元522-k,用于向注册中心510发起注册过程。The testing agent 520 - k may include a registration unit 522 - k for initiating a registration process with the registration center 510 .

测试代理520-k可以包括安全单元524-k,用于确定是否要执行注册中心510所调度的测试任务。例如,安全单元524-k可以分析从注册中心510接收的测试任务,确定所接收的测试任务是否包括相应指定测试设备集的授权码,并在确定了所接收的测试任务包括授权码的情况下通知测试代理520-k,例如测试代理520-k中的测试执行单元530-k,执行自动化测试。The testing agent 520-k may include a security unit 524-k for determining whether to execute the testing task scheduled by the registration center 510. For example, security unit 524-k may analyze test tasks received from registry 510, determine whether the received test tasks include an authorization code for a corresponding specified set of test devices, and if determined that the received test tasks include an authorization code, The testing agent 520-k, such as the test execution unit 530-k in the testing agent 520-k, is notified to execute the automated test.

测试代理520-k可以包括设备集管理单元526-k,用于在本地管理与其相关联的一个或多个测试设备集。A test agent 520-k may include a device set management unit 526-k for locally managing one or more test device sets associated therewith.

测试代理520-k可以包括设备集控制工具528-k,用于对与其相关联的一个或多个测试设备集进行控制和调试。测试代理520-k通常与一种类型的测试设备集相关联。设备集控制工具528-k可以例如对应于与测试代理520-k相关联的测试设备集的类型。作为示例,当与测试代理520-k相关联的测试设备集是安卓设备时,设备集控制工具528-k可以是针对安卓设备的软件开发工具包(SDK)。作为另一示例,当与测试代理520-k相关联的测试设备集是iOS设备时,设备集控制工具528-k可以是针对iOS设备的SDK。A test agent 520-k may include a set control tool 528-k for controlling and debugging one or more test sets associated therewith. A testing agent 520-k is typically associated with one type of set of testing equipment. A device set control tool 528-k may, for example, correspond to a type of test device set associated with a test agent 520-k. As an example, when the test device set associated with the test agent 520-k is an Android device, the device set control tool 528-k may be a software development kit (SDK) for Android devices. As another example, when the test device set associated with the test agent 520-k is an iOS device, the device set control tool 528-k may be an SDK for iOS devices.

测试代理520-k可以包括测试执行单元530-k,用于利用测试任务中指定的测试设备集、测试套件等来执行自动化测试。The test agent 520-k may include a test execution unit 530-k, configured to execute automated tests using the set of test equipment, test suites, etc. specified in the test task.

测试代理520-k可以包括测试结果处理单元532-k,用于获取自动化测试的测试结果,并将测试结果发送给注册中心510。The test agent 520-k may include a test result processing unit 532-k, configured to obtain the test result of the automated test, and send the test result to the registration center 510.

测试代理520-k可以支持各种类型的测试框架,例如Appium、Espresso、Junit等。可以将各种形式的测试设备集与测试代理520-k相关联来使得自动化测试服务能够兼容各种类型自动化测试。可以兼容的自动化测试的类型可以包括例如针对单操作系统应用的测试、针对跨操作系统应用的测试和针对Web应用的测试等等。测试代理520-k可以与一个或多个测试设备集相关联。例如,测试代理520-1可以与测试设备集540-1至测试设备集540-M相关联,并且测试代理520-K可以与测试设备集542-1至测试设备集542-N相关联。每个测试设备集可以被配置为运行目标应用。The test agent 520-k can support various types of test frameworks, such as Appium, Espresso, Junit and so on. Various forms of test equipment sets can be associated with the test agent 520-k to make the automated test service compatible with various types of automated tests. Types of compatible automated tests may include, for example, tests for single operating system applications, tests for cross-operating system applications, tests for web applications, and so on. A test agent 520-k may be associated with one or more sets of test devices. For example, test agent 520-1 may be associated with test equipment set 540-1 through test equipment set 540-M, and test agent 520-K may be associated with test equipment set 542-1 through test equipment set 542-N. Each set of test devices can be configured to run a target application.

测试设备集可以具有各种形式,例如单个测试设备,由两个测试设备构成的测试设备对,以及由两个以上的测试设备构成的测试设备组等等。图6示出了根据本公开实施例的示例性测试设备集600、620和640。测试设备集600、620和640中的每一个测试设备集可以对应于图5中的测试设备集540-1至测试设备集540-M和测试设备集542-1至测试设备集542-N中的任一个测试设备集。The test equipment set can have various forms, such as a single test equipment, a test equipment pair composed of two test equipment, a test equipment group composed of more than two test equipment, and so on. FIG. 6 illustrates exemplary sets of test equipment 600, 620, and 640 according to an embodiment of the disclosure. Each of test equipment sets 600, 620, and 640 may correspond to test equipment sets 540-1 through 540-M and test equipment sets 542-1 through 542-N in FIG. any set of test equipment.

测试设备集600可以包括单个测试设备610。该单个测试设备610可以独立地用于执行自动化测试。可以在测试设备610上运行目标应用612。目标应用612可以例如是单操作系统应用、Web应用等等。Set of test equipment 600 may include a single test equipment 610 . This single test device 610 can be used independently to perform automated testing. Target application 612 can be run on test device 610 . Target application 612 may be, for example, a single operating system application, a web application, or the like.

测试设备集620可以包括两个测试设备,例如测试设备630-1和测试设备630-2。测试设备630-1和测试设备630-2可以是相互绑定的,构成了一个测试设备对。测试设备630-1和测试设备630-2可以用于协同执行自动化测试。可以在测试设备630-1和测试设备630-2上运行目标应用632。目标应用632可以例如是单操作系统应用、Web应用、跨操作系统应用等等。在测试设备630-1和测试设备630-2上运行的目标应用632是跨操作系统应用的情况下,可以在测试设备630-1和测试设备630-2上分别运行目标应用632的、与相应操作系统相对应的版本。作为示例,目标应用632可以是涉及安卓操作系统和Windows操作系统之间的交互的应用。在这种情况下,测试设备630-1可以是安装了安卓操作系统的安卓手机,测试设备630-2可以是安装了Windows操作系统的Windows计算机。可以在测试设备630-1上运行目标应用632的安卓版本,并且在测试设备630-2上运行目标应用632的Windows版本。与测试设备集620相关联的测试代理可以是支持例如Appium之类的测试框架的测试代理。在执行自动化测试时,可以在测试设备630-1和测试设备630-2二者上分别执行操作。测试设备630-1和测试设备630-2之间也可以进行互操作。Test device set 620 may include two test devices, such as test device 630-1 and test device 630-2. The test device 630-1 and the test device 630-2 may be bound to each other to form a test device pair. The test equipment 630-1 and the test equipment 630-2 can be used to cooperate to execute automated testing. Target application 632 may run on test device 630-1 and test device 630-2. Target application 632 may be, for example, a single operating system application, a web application, a cross-operating system application, and the like. In the case that the target application 632 running on the test device 630-1 and the test device 630-2 is a cross-operating system application, the target application 632 and the corresponding The corresponding version of the operating system. As an example, target application 632 may be an application that involves interaction between the Android operating system and the Windows operating system. In this case, the testing device 630-1 may be an Android mobile phone installed with an Android operating system, and the testing device 630-2 may be a Windows computer installed with a Windows operating system. An Android version of target application 632 may be run on test device 630-1 and a Windows version of target application 632 may be run on test device 630-2. The test agents associated with the set of test devices 620 may be test agents that support a testing framework such as Appium. When performing automated testing, operations may be performed on both the testing device 630-1 and the testing device 630-2, respectively. Interoperation between the test equipment 630-1 and the test equipment 630-2 is also possible.

测试设备集640可以包括两个以上的测试设备,例如测试设备650-1、测试设备650-2、……、测试设备650-T(T>2)。测试设备650-1、测试设备650-2、……、测试设备650-T可以是相互绑定的,构成了一个测试设备组或者测试设备集群。这些测试设备可以用于协同执行自动化测试。可以在测试设备650-1、测试设备650-2、……、测试设备650-T上运行目标应用652。目标应用652可以例如是单操作系统应用、Web应用、跨操作系统应用等等。作为示例,目标应用652可以例如是关于服务器分发操作的、要求两个以上的测试设备参与的应用。The test equipment set 640 may include more than two test equipment, for example, the test equipment 650-1, the test equipment 650-2, . . . , the test equipment 650-T (T>2). The test equipment 650-1, the test equipment 650-2, . . . , the test equipment 650-T may be bound to each other to form a test equipment group or a test equipment cluster. These test devices can be used to coordinate the execution of automated tests. Target application 652 may run on test device 650-1, test device 650-2, ..., test device 650-T. Target application 652 may be, for example, a single-operating system application, a web application, a cross-operating system application, and the like. As an example, target application 652 may be, for example, an application that requires more than two test devices to participate in a server distribution operation.

通过使测试代理支持各种类型的测试框架并且将各种形式的测试设备集与测试代理相关联可以使自动化测试应用场景更加广泛,从而显著提高自动化测试服务的兼容性。By enabling the test agent to support various types of test frameworks and associating various forms of test equipment sets with the test agent, the application scenarios of automated testing can be extended, thereby significantly improving the compatibility of automated testing services.

返回参考图5,根据本公开的实施例,测试代理可以相对于测试设备集有多种实施方式。Referring back to FIG. 5 , according to an embodiment of the present disclosure, a test agent may have various implementations with respect to a set of test equipment.

在一种实施方式中,测试代理可以是独立于测试设备集而实施的。例如,测试代理520-1可以是独立于测试设备集540-1至测试设备集540-M而实施的,测试代理520-K可以是独立于测试设备集542-1至测试设备集542-N而实施的,等等。图5示出了测试代理是独立于测试设备集而实施的方式。在这种实施方式中,测试设备集可以通过有线的方式连接到与其相关联的测试代理。与一个测试代理连接的测试设备集的数量可以取决于该测试代理所能提供的端口的数量。In one embodiment, the test agent may be implemented independently of the set of test equipment. For example, test agent 520-1 may be implemented independently of test equipment set 540-1 through test equipment set 540-M, and test agent 520-K may be implemented independently of test equipment set 542-1 through test equipment set 542-N. And implemented, and so on. Figure 5 illustrates the manner in which the test agent is implemented independently of the set of test devices. In such an embodiment, a set of test devices may be wired to its associated test agents. The number of sets of test devices connected to a test agent may depend on the number of ports the test agent can provide.

在另一种实施方式中,测试代理可以被实施在测试设备集中。例如,测试代理可以作为测试设备集中的一个测试设备而实施。测试代理在执行自动化测试时需要获取其他应用的资源,因此要求跨应用之间的相互交互。如果测试设备可以实现跨应用之间的相互交互,那么这台测试设备本身就可以成为测试代理。在这种实施方式中,在测试设备集仅包括单个测试设备时,测试代理和测试设备可以是同一台设备。在测试设备集包括一个以上的测试设备时,测试代理可以是该一个以上的测试设备中的一个测试设备。In another implementation, a test agent may be implemented in a set of test devices. For example, a test agent can be implemented as a test device in a set of test devices. The test agent needs to obtain the resources of other applications when performing automated tests, so cross-application interaction is required. If a test device can interact across applications, then the test device itself can become a test agent. In such an embodiment, the test agent and the test device may be the same device when the set of test devices only includes a single test device. When the set of test equipment includes more than one test equipment, the test agent may be one of the more than one test equipment.

根据本公开的实施例,在架构500中,可以对测试资源进行统一的管理以便在各个测试代理之间进行共享。测试资源可以包括例如应用程序包562、测试套件564、测试设备集540-1至测试设备集540-M和测试设备集542-1至测试设备集542-N等。应用程序包562和测试套件564可以存储在部署在云端的数据存储装置560中并被注册中心510管理。测试设备集540-1至测试设备集540-M和测试设备集542-1至测试设备集542-N也可以通过注册中心510进行管理。以这种方式,不同的用户或团队,例如位于不同地理位置的用户或团队,可以共享测试资源,从而提高了测试资源的复用性并节省了资源成本。According to the embodiment of the present disclosure, in the architecture 500, the test resources can be managed uniformly so as to be shared among various test agents. Test resources may include, for example, application package 562, test suite 564, test set 540-1 through test set 540-M, test set 542-1 through test set 542-N, and the like. The application package 562 and the test suite 564 can be stored in the data storage device 560 deployed in the cloud and managed by the registration center 510 . The test equipment set 540 - 1 to the test equipment set 540 -M and the test equipment set 542 - 1 to the test equipment set 542 -N can also be managed by the registration center 510 . In this way, different users or teams, such as users or teams located in different geographical locations, can share test resources, thereby improving the reusability of test resources and saving resource costs.

应当理解,图5所示的架构500仅是自动化测试系统的架构一个示例。根据实际应用需求,自动化测试系统可以具有任意其他结构,并且可以包括更多或更少的部件。例如,可以通过图2的过程200来向现有的自动化测试系统添加新的测试代理,以增强自动化测试系统的扩展性。另外,注册中心510可以作为测试代理再注册到其他注册中心,从而进一步增强自动化测试系统的扩展性。It should be understood that the architecture 500 shown in FIG. 5 is only an example of the architecture of the automated testing system. According to actual application requirements, the automated test system may have any other structure, and may include more or less components. For example, a new test agent can be added to the existing automated test system through the process 200 in FIG. 2 to enhance the scalability of the automated test system. In addition, the registration center 510 can serve as a test agent and then register with other registration centers, thereby further enhancing the scalability of the automated testing system.

图7是根据本公开实施例的用于执行自动化测试的示例性方法700的流程图。FIG. 7 is a flowchart of an exemplary method 700 for performing automated testing according to an embodiment of the disclosure.

在710处,可以通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求。At 710, a test request to perform automated testing with a specified set of test equipment can be received via a registry.

在720处,可以通过所述注册中心,生成与所述测试请求相对应的测试任务。At 720, a test task corresponding to the test request may be generated through the registration center.

在730处,可以通过所述注册中心,将所述测试任务调度给与所述指定测试设备集相关联的测试代理。At 730, the test task can be dispatched to a test agent associated with the specified set of test equipment through the registration center.

在740处,可以通过所述测试代理,利用所述指定测试设备集来执行所述自动化测试。At 740, the automated testing can be performed by the testing agent using the specified set of testing equipment.

在一种实施方式中,所述自动化测试可以包括以下至少之一:针对单操作系统应用的测试、针对跨操作系统应用的测试和针对Web应用的测试。In an implementation manner, the automated testing may include at least one of the following: testing for a single operating system application, testing for a cross-operating system application, and testing for a Web application.

在一种实施方式中,所述指定测试设备集的形式可以是以下至少之一:单个测试设备,由两个测试设备构成的测试设备对,以及由两个以上的测试设备构成的测试设备组。In one embodiment, the form of the specified test equipment set may be at least one of the following: a single test equipment, a test equipment pair composed of two test equipment, and a test equipment group composed of more than two test equipment .

在一种实施方式中,所述指定测试设备集可以包括一个以上的测试设备。所述执行所述自动化测试可以包括:通过所述测试代理,利用所述一个以上的测试设备来协同执行所述自动化测试。In an implementation manner, the specified test equipment set may include more than one test equipment. The executing the automated test may include: using the test agent to coordinately execute the automated test with the one or more test devices.

在一种实施方式中,所述测试代理可以独立于所述指定测试设备集而实施,或者被实施在所述指定测试设备集中。In one embodiment, the test agent may be implemented independently of the specified set of test equipment, or implemented in the specified set of test equipment.

在一种实施方式中,方法700还可以包括:通过所述测试代理,确定所述测试任务是否包括所述指定测试设备集的授权码,所述授权码来自所述测试请求。所述自动化测试可以是响应于确定所述测试任务包括所述授权码而执行的。In an implementation manner, the method 700 may further include: by the test agent, determining whether the test task includes an authorization code of the specified test equipment set, the authorization code is from the test request. The automated testing may be performed in response to determining that the testing task includes the authorization code.

在一种实施方式中,方法700还可以包括通过以下操作来创建所述测试代理:在终端设备上运行测试代理创建程序;在所述终端设备处,向所述注册中心发起注册过程;以及响应于所述注册过程的完成,将所述终端设备配置为所述测试代理。In one embodiment, the method 700 may also include creating the test agent through the following operations: running a test agent creation program on the terminal device; at the terminal device, initiating a registration process to the registration center; and responding Upon completion of the registration process, the terminal device is configured as the test proxy.

方法700还可以包括:通过所述注册中心,接收用于生成与所述测试代理相关联的测试设备集的授权码的授权码生成请求;通过所述注册中心,生成所述授权码;以及通过所述注册中心,将所生成的授权码发送给所述测试代理。The method 700 may further include: receiving, through the registration center, an authorization code generation request for generating an authorization code for a set of test devices associated with the test agent; generating the authorization code through the registration center; and The registration center sends the generated authorization code to the test agent.

在一种实施方式中,方法700还可以包括:通过所述注册中心,接收用于获取所述指定测试设备集的授权码的授权码获取请求;通过所述注册中心,将所述授权码获取请求转发给所述测试代理;以及通过所述注册中心,基于从所述测试代理接收到的响应来确定是否提供所述授权码。In one embodiment, the method 700 may further include: through the registration center, receiving an authorization code acquisition request for obtaining the authorization code of the specified test equipment set; through the registration center, obtaining the authorization code forwarding the request to the testing proxy; and determining, by the registry, whether to provide the authorization code based on a response received from the testing proxy.

在一种实施方式中,方法700还可以包括对所述自动化测试的测试结果进行可视化。所述测试结果可以包括视频导航界面。所述视频导航界面可以包括:用于显示所述自动化测试包括的多个测试用例的导航区域,每个测试用例能够被选择,以及用于显示与被选择的测试用例相对应的视频片段的视频区域。In an implementation manner, the method 700 may further include visualizing test results of the automated test. The test results may include a video navigation interface. The video navigation interface may include: a navigation area for displaying a plurality of test cases included in the automated test, each test case can be selected, and a video for displaying a video segment corresponding to the selected test case area.

应当理解,方法700还可以包括根据上述本公开的实施例的用于执行自动化测试的任何步骤/过程。It should be understood that the method 700 may also include any steps/processes for performing automated testing according to the above-mentioned embodiments of the present disclosure.

图8示出了根据本公开实施例的示例性自动化测试系统800。FIG. 8 illustrates an exemplary automated testing system 800 according to an embodiment of the disclosure.

自动化测试系统800可以包括注册中心810,被配置为接收用于利用指定测试设备集来执行针对目标应用的自动化测试的测试请求,生成与所述测试请求相对应的测试任务,并且将所述测试任务调度给与所述指定测试设备集相关联的测试代理;至少一个测试代理820,每个测试代理被配置为接收测试任务,并且利用所接收的测试任务中所指定的测试设备集来执行自动化测试;以及至少一个测试设备集830,每个测试设备集与所述至少一个测试代理中的一个测试代理相关联,并且被配置为运行所述目标应用。The automated testing system 800 may include a registration center 810 configured to receive a test request for using a specified test equipment set to perform automated testing for a target application, generate a test task corresponding to the test request, and store the test task scheduling to test agents associated with the specified set of test equipment; at least one test agent 820, each test agent configured to receive a test task and perform automation using the specified set of test equipment in the received test task testing; and at least one set of test equipment 830, each set of test equipment associated with one of the at least one test agent and configured to run the target application.

在一种实施方式中,所述目标应用可以包括以下至少之一:单操作系统应用、跨操作系统应用和Web应用。In an implementation manner, the target application may include at least one of the following: a single operating system application, a cross-operating system application, and a Web application.

在一种实施方式中,所述至少一个测试设备集中的每个测试设备集的形式可以是以下至少之一:单个测试设备,由两个测试设备构成的测试设备对,以及由两个以上的测试设备构成的测试设备组。In one embodiment, the form of each test equipment set in the at least one test equipment set may be at least one of the following: a single test equipment, a test equipment pair consisting of two test equipment, and a test equipment set consisting of more than two Test equipment constitutes a test equipment group.

在一种实施方式中,所述至少一个测试代理中的每个测试代理可以独立于与所述测试代理相关联的测试设备集而实施,或者被实施在所述测试设备集中。In one embodiment, each test agent of the at least one test agent may be implemented independently of or within the set of test equipment associated with the test agent.

在一种实施方式中,所述至少一个测试代理中的每个测试代理还可以被配置为:确定所接收的测试任务是否包括相应指定测试设备集的授权码;以及响应于确定所接收的测试任务包括所述授权码来执行所述自动化测试。In one embodiment, each test agent of the at least one test agent may be further configured to: determine whether the received test task includes an authorization code corresponding to a specified set of test equipment; A task includes the authorization code to execute the automated test.

在一种实施方式中,所述注册中心还可以被配置为:从终端设备接收注册请求,所述注册请求是由在所述终端设备上运行的测试代理创建程序触发的;以及响应于接收到所述注册请求,将所述终端设备注册为测试代理。In one embodiment, the registration center may also be configured to: receive a registration request from a terminal device, the registration request is triggered by a test agent creation program running on the terminal device; and respond to receiving The registration request registers the terminal device as a test agent.

所述注册中心还可以被配置为:接收用于生成与所注册的测试代理相关联的测试设备集的授权码的授权码生成请求;生成所述授权码;以及将所生成的授权码发送给所注册的测试代理。The registration center may also be configured to: receive an authorization code generation request for generating an authorization code for a set of test devices associated with the registered test agent; generate the authorization code; and send the generated authorization code to The registered testing agent.

在一种实施方式中,所述注册中心还可以被配置为:接收用于获取所述指定测试设备集的授权码的授权码获取请求;将所述授权码获取请求转发给所述测试代理;以及基于从所述测试代理接收到的响应来确定是否提供所述授权码。In an implementation manner, the registration center may also be configured to: receive an authorization code acquisition request for acquiring the authorization code of the specified test equipment set; forward the authorization code acquisition request to the test agent; and determining whether to provide the authorization code based on a response received from the testing agent.

在一种实施方式中,所述注册中心还可以被配置为对所述自动化测试的测试结果进行可视化。所述测试结果可以包括视频导航界面。所述视频导航界面可以包括:用于显示所述自动化测试包括的多个测试用例的导航区域,每个测试用例能够被选择,以及用于显示与被选择的测试用例相对应的视频片段的视频区域。In an implementation manner, the registration center may also be configured to visualize test results of the automated test. The test results may include a video navigation interface. The video navigation interface may include: a navigation area for displaying a plurality of test cases included in the automated test, each test case can be selected, and a video for displaying a video segment corresponding to the selected test case area.

应当理解,自动化测试系统800还可以包括根据上述本公开的实施例的被配置用于执行自动化测试的任何其他部件。It should be understood that the automated testing system 800 may also include any other components configured to perform automated testing according to the above-mentioned embodiments of the present disclosure.

图9示出了根据本公开实施例的用于执行自动化测试的示例性装置900。FIG. 9 shows an exemplary apparatus 900 for performing automated testing according to an embodiment of the present disclosure.

装置900可以包括:至少一个处理器910;以及存储计算机可执行指令的存储器920。所述计算机可执行指令在被执行时可以使得所述至少一个处理器910:通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求;通过所述注册中心,生成与所述测试请求相对应的测试任务;通过所述注册中心,将所述测试任务调度给与所述指定测试设备集相关联的测试代理;以及通过所述测试代理,利用所述指定测试设备集来执行所述自动化测试。Apparatus 900 may include: at least one processor 910; and memory 920 storing computer-executable instructions. The computer-executable instructions, when executed, may cause the at least one processor 910 to: receive, through a registry, a test request for performing an automated test using a specified set of test equipment; Test a test task corresponding to the request; through the registration center, schedule the test task to a test agent associated with the specified test equipment set; and through the test agent, use the specified test equipment set to execute The automated tests.

应当理解,处理器910还可以执行根据上述本公开实施例的用于执行自动化测试的方法的任何其他步骤/过程。It should be understood that the processor 910 may also perform any other steps/processes of the method for performing automated testing according to the above-mentioned embodiments of the present disclosure.

本公开的实施例提出了用于执行自动化测试的计算机程序产品,包括计算机程序,所述计算机程序被至少一个处理器执行用于:通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求;通过所述注册中心,生成与所述测试请求相对应的测试任务;通过所述注册中心,将所述测试任务调度给与所述指定测试设备集相关联的测试代理;以及通过所述测试代理,利用所述指定测试设备集来执行所述自动化测试。此外,所述计算机程序还可以被执行用于实现根据上述本公开实施例的用于执行自动化测试的方法的任何其他步骤/过程。Embodiments of the present disclosure propose a computer program product for performing automated testing, comprising a computer program executed by at least one processor for: receiving, through a registration center, a program for performing automated testing with a specified set of test equipment through the registration center, generating a test task corresponding to the test request; through the registration center, dispatching the test task to a test agent associated with the specified test equipment set; and through The test agent executes the automated test by using the specified set of test equipment. In addition, the computer program can also be executed to implement any other steps/processes of the method for performing automated testing according to the above-mentioned embodiments of the present disclosure.

本公开的实施例可以体现在非暂时性计算机可读介质中。所述非暂时性计算机可读介质可以包括指令,所述指令当被执行时,使得一个或多个处理器执行根据如上所述的本公开的实施例的用于执行自动化测试的方法的任何操作。Embodiments of the present disclosure can be embodied on a non-transitory computer readable medium. The non-transitory computer-readable medium may include instructions that, when executed, cause one or more processors to perform any of the operations of the method for performing automated testing according to an embodiment of the present disclosure as described above. .

应当理解,以上描述的方法中的所有操作都仅仅是示例性的,本公开并不限制于方法中的任何操作或这些操作的顺序,而是应当涵盖在相同或相似构思下的所有其他等同变换。另外,除非另有规定或者从上下文能清楚得知针对单数形式,否则如本说明书和所附权利要求书中所使用的冠词“一(a)”和“一个(an)”通常应当被解释为意指“一个”或者“一个或多个”。It should be understood that all operations in the method described above are exemplary only, and the present disclosure is not limited to any operation in the method or the order of these operations, but should cover all other equivalent transformations under the same or similar concept . In addition, the articles "a (a)" and "an (an)" as used in this specification and the appended claims should generally be construed unless otherwise specified or clear from the context to refer to a singular form. means "one" or "one or more".

还应当理解,以上描述的装置中的所有模块都可以通过各种方式来实施。这些模块可以被实施为硬件、软件、或其组合。此外,这些模块中的任何模块可以在功能上被进一步划分成子模块或组合在一起。It should also be understood that all modules in the apparatus described above may be implemented in various ways. These modules may be implemented as hardware, software, or a combination thereof. Furthermore, any of these modules may be functionally further divided into sub-modules or grouped together.

已经结合各种装置和方法描述了处理器。这些处理器可以使用电子硬件、计算机软件或其任意组合来实施。这些处理器是实施为硬件还是软件将取决于具体的应用以及施加在系统上的总体设计约束。作为示例,本公开中给出的处理器、处理器的任意部分、或者处理器的任意组合可以利用微处理器、微控制器、数字信号处理器(DSP)、现场可编程门阵列(FPGA)、可编程逻辑器件(PLD)、状态机、门控逻辑单元、分立硬件电路、以及配置用于执行在本公开中描述的各种功能的其他适合的处理组件来实现。本公开给出的处理器、处理器的任意部分、或者处理器的任意组合的功能可以利用由微处理器、微控制器、DSP或其他适合的平台所执行的软件来实现。Processors have been described in connection with various apparatus and methods. These processors may be implemented using electronic hardware, computer software, or any combination thereof. Whether such processors are implemented as hardware or software will depend upon the particular application and overall design constraints imposed on the system. As examples, a processor, any portion of a processor, or any combination of processors presented in this disclosure may utilize a microprocessor, microcontroller, digital signal processor (DSP), field programmable gate array (FPGA) , programmable logic devices (PLDs), state machines, gating logic units, discrete hardware circuits, and other suitable processing components configured to perform the various functions described in this disclosure. The functions of a processor, any part of a processor, or any combination of processors given in this disclosure may be implemented by software executed by a microprocessor, microcontroller, DSP, or other suitable platform.

软件应当被广泛地视为意指指令、指令集、代码、代码段、程序代码、程序、子程序、软件模块、应用、软件应用、软件包、例程、子例程、对象、运行线程、过程、函数等。软件可以驻留在计算机可读介质中。计算机可读介质可以包括例如存储器,存储器可以例如为磁性存储设备(例如,硬盘、软盘、磁条)、光盘、智能卡、闪存设备、随机存取存储器(RAM)、只读存储器(ROM)、可编程ROM(PROM)、可擦除PROM(EPROM)、电可擦除PROM(EEPROM)、寄存器或者可移动盘。尽管在本公开给出的多个方面中将存储器示出为是与处理器分离的,但是存储器也可以位于处理器内部,例如高速缓存器或寄存器。Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subroutines, software modules, applications, software applications, software packages, routines, subroutines, objects, threads of execution, procedures, functions, etc. The software may reside on a computer readable medium. The computer readable medium may include, for example, memory, which may be, for example, a magnetic storage device (e.g., hard disk, floppy disk, magnetic strip), an optical disk, a smart card, a flash memory device, random access memory (RAM), read only memory (ROM), Programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), register or removable disk. Although memory is shown as being separate from the processor in the various aspects presented in this disclosure, memory may also be located internal to the processor, such as a cache or register.

以上描述被提供用于使得本领域任何技术人员能够实践本文所描述的各个方面。对这些方面的各种修改对于本领域技术人员将是显而易见的,并且本文限定的一般性原理可以应用于其他方面。因此,权利要求并非旨在被局限于本文示出的方面。关于本领域普通技术人员已知或即将获知的、对本公开所描述各个方面的元素的所有结构和功能上的等同变换都被明确并入本文并且由权利要求所覆盖。The above description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Accordingly, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the described aspects of this disclosure that are known or come to be known to those of ordinary skill in the art are expressly incorporated herein and are covered by the claims.

Claims (20)

1.一种用于执行自动化测试的方法,包括:1. A method for performing automated testing comprising: 通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求;receiving, through the registry, a test request for performing automated testing using a specified set of test equipment; 通过所述注册中心,生成与所述测试请求相对应的测试任务;Generate a test task corresponding to the test request through the registration center; 通过所述注册中心,将所述测试任务调度给与所述指定测试设备集相关联的测试代理;以及dispatching, via the registry, the test tasks to test agents associated with the specified set of test devices; and 通过所述测试代理,利用所述指定测试设备集来执行所述自动化测试。The automated testing is performed by the testing agent using the specified set of testing equipment. 2.根据权利要求1所述的方法,其中,所述自动化测试包括以下至少之一:针对单操作系统应用的测试、针对跨操作系统应用的测试和针对Web应用的测试。2. The method according to claim 1, wherein the automated testing comprises at least one of the following: testing for single operating system applications, testing for cross-operating system applications, and testing for Web applications. 3.根据权利要求1所述的方法,其中,所述指定测试设备集的形式是以下至少之一:3. The method according to claim 1, wherein the form of the designated test equipment set is at least one of the following: 单个测试设备,single test equipment, 由两个测试设备构成的测试设备对,以及a test equipment pair consisting of two test equipment, and 由两个以上的测试设备构成的测试设备组。A test equipment group consisting of two or more test equipment. 4.根据权利要求1所述的方法,其中,所述指定测试设备集包括一个以上的测试设备,并且所述执行所述自动化测试包括:4. The method of claim 1, wherein the specified set of test equipment includes more than one test equipment, and the performing the automated test comprises: 通过所述测试代理,利用所述一个以上的测试设备来协同执行所述自动化测试。The automated testing is performed cooperatively by the testing agent using the one or more testing devices. 5.根据权利要求1所述的方法,其中,所述测试代理独立于所述指定测试设备集而实施,或者被实施在所述指定测试设备集中。5. The method of claim 1, wherein the test agent is implemented independently of or within the specified set of test equipment. 6.根据权利要求1所述的方法,还包括:6. The method of claim 1, further comprising: 通过所述测试代理,确定所述测试任务是否包括所述指定测试设备集的授权码,所述授权码来自所述测试请求,并且determining, by the test agent, whether the test task includes an authorization code for the specified set of test equipment, the authorization code from the test request, and 其中,所述自动化测试是响应于确定所述测试任务包括所述授权码而执行的。Wherein, the automated testing is performed in response to determining that the testing task includes the authorization code. 7.根据权利要求1所述的方法,还包括通过以下操作来创建所述测试代理:7. The method of claim 1, further comprising creating the test proxy by: 在终端设备上运行测试代理创建程序;Run the test agent creation program on the terminal device; 在所述终端设备处,向所述注册中心发起注册过程;以及at the terminal device, initiate a registration process with the registration center; and 响应于所述注册过程的完成,将所述终端设备配置为所述测试代理。In response to completion of the registration process, the terminal device is configured as the testing agent. 8.根据权利要求7所述的方法,还包括:8. The method of claim 7, further comprising: 通过所述注册中心,接收用于生成与所述测试代理相关联的测试设备集的授权码的授权码生成请求;receiving, via the registration center, an authorization code generation request for generating an authorization code for a set of test devices associated with the test agent; 通过所述注册中心,生成所述授权码;以及generating the authorization code via the registry; and 通过所述注册中心,将所生成的授权码发送给所述测试代理。The generated authorization code is sent to the testing agent through the registration center. 9.根据权利要求1所述的方法,还包括:9. The method of claim 1, further comprising: 通过所述注册中心,接收用于获取所述指定测试设备集的授权码的授权码获取请求;receiving an authorization code acquisition request for obtaining an authorization code of the designated test equipment set through the registration center; 通过所述注册中心,将所述授权码获取请求转发给所述测试代理;以及forwarding the authorization code acquisition request to the testing agent through the registration center; and 通过所述注册中心,基于从所述测试代理接收到的响应来确定是否提供所述授权码。Whether to provide the authorization code is determined by the registry based on a response received from the testing agent. 10.根据权利要求1所述的方法,还包括对所述自动化测试的测试结果进行可视化,所述测试结果包括视频导航界面,并且所述视频导航界面包括:10. The method of claim 1, further comprising visualizing test results of the automated test, the test results comprising a video navigation interface, and the video navigation interface comprising: 用于显示所述自动化测试包括的多个测试用例的导航区域,每个测试用例能够被选择,以及a navigation area for displaying a plurality of test cases included in the automated test, each test case can be selected, and 用于显示与被选择的测试用例相对应的视频片段的视频区域。The video area used to display the video clip corresponding to the selected test case. 11.一种自动化测试系统,包括:11. An automated testing system comprising: 注册中心,被配置为接收用于利用指定测试设备集来执行针对目标应用的自动化测试的测试请求,生成与所述测试请求相对应的测试任务,并且将所述测试任务调度给与所述指定测试设备集相关联的测试代理;The registration center is configured to receive a test request for performing an automated test for a target application by using a specified set of test equipment, generate a test task corresponding to the test request, and schedule the test task to the specified the test agent associated with the set of test devices; 至少一个测试代理,每个测试代理被配置为接收测试任务,并且利用所接收的测试任务中所指定的测试设备集来执行自动化测试;以及at least one test agent, each test agent configured to receive test tasks and perform automated testing using a set of test equipment specified in the received test tasks; and 至少一个测试设备集,每个测试设备集与所述至少一个测试代理中的一个测试代理相关联,并且被配置为运行所述目标应用。At least one set of test equipment, each set of test equipment associated with one of the at least one test agent and configured to run the target application. 12.根据权利要求11所述的自动化测试系统,其中,所述目标应用包括以下至少之一:单操作系统应用、跨操作系统应用和Web应用。12. The automated testing system according to claim 11, wherein the target application comprises at least one of the following: a single operating system application, a cross-operating system application and a Web application. 13.根据权利要求11所述的自动化测试系统,其中,所述至少一个测试设备集中的每个测试设备集的形式是以下至少之一:13. The automated testing system according to claim 11, wherein each test equipment set in the at least one test equipment set is in at least one of the following forms: 单个测试设备,single test equipment, 由两个测试设备构成的测试设备对,以及a test equipment pair consisting of two test equipment, and 由两个以上的测试设备构成的测试设备组。A test equipment group consisting of two or more test equipment. 14.根据权利要求11所述的自动化测试系统,其中,所述至少一个测试代理中的每个测试代理独立于与所述测试代理相关联的测试设备集而实施,或者被实施在所述测试设备集中。14. The automated testing system of claim 11 , wherein each of the at least one test agent is implemented independently of a set of test equipment associated with the test agent, or is implemented in the test Equipment concentration. 15.根据权利要求11所述的自动化测试系统,其中,所述至少一个测试代理中的每个测试代理还被配置为:15. The automated testing system of claim 11 , wherein each of the at least one testing agent is further configured to: 确定所接收的测试任务是否包括相应指定测试设备集的授权码;以及determining whether the received test task includes an authorization code for the corresponding specified set of test equipment; and 响应于确定所接收的测试任务包括所述授权码来执行所述自动化测试。The automated testing is performed in response to determining that the received testing task includes the authorization code. 16.根据权利要求11所述的自动化测试系统,所述注册中心还被配置为:16. The automated testing system according to claim 11, the registration center is further configured to: 从终端设备接收注册请求,所述注册请求是由在所述终端设备上运行的测试代理创建程序触发的;以及receiving a registration request from an end device, the registration request being triggered by a test agent creation program running on the end device; and 响应于接收到所述注册请求,将所述终端设备注册为测试代理。In response to receiving the registration request, the terminal device is registered as a test agent. 17.根据权利要求16所述的自动化测试系统,其中,所述注册中心还被配置为:17. The automated testing system according to claim 16, wherein the registration center is further configured to: 接收用于生成与所注册的测试代理相关联的测试设备集的授权码的授权码生成请求;receiving an authorization code generation request for generating an authorization code for a set of test devices associated with the registered test agent; 生成所述授权码;以及generate said authorization code; and 将所生成的授权码发送给所注册的测试代理。Send the generated authorization code to the registered testing agent. 18.根据权利要求11所述的自动化测试系统,其中,所述注册中心还被配置为:18. The automated testing system according to claim 11, wherein the registration center is further configured to: 接收用于获取所述指定测试设备集的授权码的授权码获取请求;receiving an authorization code obtaining request for obtaining the authorization code of the specified test equipment set; 将所述授权码获取请求转发给所述测试代理;以及forwarding the authorization code acquisition request to the testing agent; and 基于从所述测试代理接收到的响应来确定是否提供所述授权码。Whether to provide the authorization code is determined based on a response received from the testing agent. 19.根据权利要求11所述的自动化测试系统,其中,所述注册中心还被配置为对所述自动化测试的测试结果进行可视化,所述测试结果包括视频导航界面,并且所述视频导航界面包括:19. The automated testing system according to claim 11 , wherein the registration center is further configured to visualize test results of the automated tests, the test results include a video navigation interface, and the video navigation interface includes : 用于显示所述自动化测试包括的多个测试用例的导航区域,每个测试用例能够被选择,以及a navigation area for displaying a plurality of test cases included in the automated test, each test case can be selected, and 用于显示与被选择的测试用例相对应的视频片段的视频区域。The video area used to display the video clip corresponding to the selected test case. 20.一种用于执行自动化测试的计算机程序产品,包括计算机程序,所述计算机程序被至少一个处理器执行用于:20. A computer program product for performing automated testing, comprising a computer program executed by at least one processor for: 通过注册中心,接收用于利用指定测试设备集来执行自动化测试的测试请求;receiving, through the registry, a test request for performing automated testing using a specified set of test equipment; 通过所述注册中心,生成与所述测试请求相对应的测试任务;Generate a test task corresponding to the test request through the registration center; 通过所述注册中心,将所述测试任务调度给与所述指定测试设备集相关联的测试代理;以及dispatching, via the registry, the test tasks to test agents associated with the specified set of test devices; and 通过所述测试代理,利用所述指定测试设备集来执行所述自动化测试。The automated testing is performed by the testing agent using the specified set of testing equipment.
CN202111432022.1A 2021-11-29 2021-11-29 Automated testing with improved scalability and compatibility Pending CN116185810A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111432022.1A CN116185810A (en) 2021-11-29 2021-11-29 Automated testing with improved scalability and compatibility
PCT/US2022/042581 WO2023096690A1 (en) 2021-11-29 2022-09-05 Automated testing with improved scalability and compatibility

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111432022.1A CN116185810A (en) 2021-11-29 2021-11-29 Automated testing with improved scalability and compatibility

Publications (1)

Publication Number Publication Date
CN116185810A true CN116185810A (en) 2023-05-30

Family

ID=83902882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111432022.1A Pending CN116185810A (en) 2021-11-29 2021-11-29 Automated testing with improved scalability and compatibility

Country Status (2)

Country Link
CN (1) CN116185810A (en)
WO (1) WO2023096690A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208258A1 (en) * 2014-01-20 2015-07-23 Nokia Corporation Remote access to a wireless device
CN104978259A (en) * 2014-04-01 2015-10-14 中国银联股份有限公司 Mobile equipment software automation test cluster system and test method thereof
US20170195457A1 (en) * 2015-12-30 2017-07-06 Amazon Technologies, Inc. Service authorization handshake
CN111078580A (en) * 2019-12-31 2020-04-28 贵阳货车帮科技有限公司 Test case management method and device, storage medium and electronic equipment
CN111444100A (en) * 2020-03-26 2020-07-24 深圳创维-Rgb电子有限公司 Test method, test device, test apparatus and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208258A1 (en) * 2014-01-20 2015-07-23 Nokia Corporation Remote access to a wireless device
CN104978259A (en) * 2014-04-01 2015-10-14 中国银联股份有限公司 Mobile equipment software automation test cluster system and test method thereof
US20170195457A1 (en) * 2015-12-30 2017-07-06 Amazon Technologies, Inc. Service authorization handshake
CN111078580A (en) * 2019-12-31 2020-04-28 贵阳货车帮科技有限公司 Test case management method and device, storage medium and electronic equipment
CN111444100A (en) * 2020-03-26 2020-07-24 深圳创维-Rgb电子有限公司 Test method, test device, test apparatus and storage medium

Also Published As

Publication number Publication date
WO2023096690A1 (en) 2023-06-01

Similar Documents

Publication Publication Date Title
CN112965700B (en) Routing-based micro-service processing method and device, computer equipment and medium
US9483383B2 (en) Injecting faults at select execution points of distributed applications
CN107302475A (en) The method of testing and device of a kind of Based on Distributed storage cluster
US9870307B2 (en) Regression testing of software services
US20140280913A1 (en) Device and settings management platform
CN108287694A (en) Application builds method, system, computer equipment and storage medium
CN112631919A (en) Comparison test method and device, computer equipment and storage medium
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN102567172A (en) Concurrent workload simulation for application performance testing
CN110134612B (en) UI test data generation method, apparatus, equipment, and readable storage medium
US20170364436A1 (en) Plugin-based software verification system
CN109388420A (en) Application upgrade test method, device, computer equipment and storage medium
CN104246715A (en) Constructing test-centric model of application
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN107577600A (en) A kind of method of testing of equipment, device and computer equipment
CN105677689B (en) Log recording method and device
Gudmundsson et al. An initial evaluation of model-based testing
CN116185810A (en) Automated testing with improved scalability and compatibility
CN105339974B (en) analog sensor
CN105677569A (en) Automatic Android testing tool based on event processor and testing method
CN114564387A (en) Scene type automatic testing method and system for OpenStack cloud platform
CN116860304A (en) Cloud service updating method, cloud service updating device, computer equipment and storage medium
US20180203790A1 (en) Detection of software errors
CN113505079A (en) Application program testing method, device, equipment and medium

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