[go: up one dir, main page]

CN105224464A - A kind of parallel automated testing method - Google Patents

A kind of parallel automated testing method Download PDF

Info

Publication number
CN105224464A
CN105224464A CN201510760943.9A CN201510760943A CN105224464A CN 105224464 A CN105224464 A CN 105224464A CN 201510760943 A CN201510760943 A CN 201510760943A CN 105224464 A CN105224464 A CN 105224464A
Authority
CN
China
Prior art keywords
test
test resource
resource
target
server
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
CN201510760943.9A
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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510760943.9A priority Critical patent/CN105224464A/en
Publication of CN105224464A publication Critical patent/CN105224464A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种并行自动化测试方法,包括:客户端发送测试资源请求至服务端,其中,客户端在预先搭建的RobotFramework环境下工作,服务端在预先搭建的staf环境下工作;服务端判断是否存在满足测试资源请求所需的测试资源的空闲测试资源,如果是,则确定该空闲测试资源中与测试资源请求对应的测试资源为目标测试资源,确定客户端中预先获取的与测试资源请求对应的测试用例为目标测试用例,并利用目标测试资源对目标测试用例进行测试。本申请公开的上述技术特征,避免了背景技术中提到的浪费时间的情况,即,本申请提供的一种并行自动化测试方法能够避免测试资源及测试时间的浪费,进而高效快速的完成测试任务。

The invention discloses a parallel automatic testing method, comprising: a client sends a test resource request to a server, wherein the client works in a pre-built RobotFramework environment, and the server works in a pre-built staf environment; the server judges Whether there is an idle test resource that satisfies the test resource required by the test resource request, if yes, then determine that the test resource corresponding to the test resource request in the idle test resource is the target test resource, and determine the test resource that is pre-acquired in the client and the test resource request The corresponding test case is a target test case, and the target test case is tested using the target test resources. The above-mentioned technical features disclosed in this application avoid the waste of time mentioned in the background technology, that is, a parallel automated testing method provided by this application can avoid the waste of testing resources and testing time, and then complete the testing task efficiently and quickly .

Description

一种并行自动化测试方法A Parallel Automated Testing Method

技术领域technical field

本发明涉及自动化技术领域,更具体地说,涉及一种并行自动化测试方法。The invention relates to the technical field of automation, more specifically, to a parallel automatic testing method.

背景技术Background technique

随着开发模式的变革,如何快速连续的交付产品对于开发和测试团队都成为一个很大的挑战。对于测试人员来说,如何在有限的测试资源和测试时间之内保证产品质量成为一个至关重要的问题。With the transformation of the development model, how to deliver products quickly and continuously has become a big challenge for both the development and testing teams. For testers, how to ensure product quality within limited testing resources and testing time has become a crucial issue.

为了缩短测试时间,往往采用并行自动化测试方法,即令多个testsuite(测试套件)同时进行测试。然而传统的并行自动化测试,总体运行时间的长短取决于需要最长时间的testsuite,即在多个testsuite同时进行测试时,只有全部testsuite运行完成后才能完成此次测试,这会造成一定的时间浪费。且,为每个testsuite分配的测试资源取决于需要最大测试资源的testsuite,即在多个testsuite同时进行测试时,为每个testsuite分配的测试资源是相同的,为了保证全部testsuite均可以正常运行,因此,需要分配给每个testsuite与需要最大测试资源的testsuite所需的测试资源相同的测试资源,这会造成一定的测试资源的浪费。In order to shorten the test time, a parallel automated test method is often used, that is, multiple testsuites (test suites) are tested at the same time. However, in traditional parallel automated testing, the overall running time depends on the testsuite that takes the longest time. That is, when multiple testsuites are testing at the same time, the test can only be completed after all the testsuites are running, which will cause a certain amount of time waste. . Moreover, the test resources allocated to each testsuite depend on the testsuite that requires the largest test resources. That is, when multiple testsuites are tested at the same time, the test resources allocated to each testsuite are the same. In order to ensure that all testsuites can run normally, Therefore, it is necessary to allocate to each testsuite the same test resources as the testsuite that requires the largest test resources, which will cause a certain waste of test resources.

综上所述,现有技术中的并行自动化测试方法,存在一定程度上浪费时间及浪费测试资源的问题。To sum up, the parallel automated testing methods in the prior art have problems of wasting time and testing resources to a certain extent.

发明内容Contents of the invention

本发明的目的是提供一种并行自动化测试方法,以解决现有技术中存在的一定程度上浪费时间及浪费测试资源的问题。The purpose of the present invention is to provide a parallel automatic testing method to solve the problems of wasting time and testing resources to a certain extent in the prior art.

为了实现上述目的,本发明提供如下技术方案:In order to achieve the above object, the present invention provides the following technical solutions:

一种并行自动化测试方法,包括:A parallel automated testing method comprising:

客户端发送测试资源请求至服务端,其中,所述客户端在预先搭建的RobotFramework环境下工作,所述服务端在预先搭建的staf环境下工作;The client sends a test resource request to the server, wherein the client works in a pre-built RobotFramework environment, and the server works in a pre-built staf environment;

所述服务端判断是否存在满足所述测试资源请求所需的测试资源的空闲测试资源,如果是,则确定该空闲测试资源中与所述测试资源请求对应的测试资源为目标测试资源,确定所述客户端中预先获取的与所述测试资源请求对应的测试用例为目标测试用例,并利用所述目标测试资源对所述目标测试用例进行测试。The server determines whether there is an idle test resource that satisfies the test resource required by the test resource request, and if so, determines that the test resource corresponding to the test resource request in the idle test resource is the target test resource, and determines the The test case corresponding to the test resource request obtained in advance in the client is a target test case, and the target test case is tested by using the target test resource.

优选的,还包括:Preferably, it also includes:

如果所述服务端判断出不存在满足所述测试资源请求所需的测试资源的空闲测试资源,则返回等待指令至所述客户端。If the server determines that there is no idle test resource that satisfies the test resource request, it returns a waiting instruction to the client.

优选的,还包括:Preferably, it also includes:

在所述服务端判断出不存在满足所述测试资源请求所需的测试资源的空闲测试资源的时刻之后的预设时间段内,如果出现满足所述测试资源请求所需的测试资源的空闲测试资源,则确定该空闲测试资源为目标测试资源。Within a preset period of time after the server determines that there is no idle test resource that satisfies the test resource request, if there is an idle test resource that satisfies the test resource request resource, the idle test resource is determined as the target test resource.

优选的,还包括:Preferably, it also includes:

所述服务端利用所述目标测试资源对所述目标测试用例完成测试之后,将所述目标测试资源进行释放,并确定所述目标测试资源为空闲测试资源。After the server uses the target test resource to test the target test case, it releases the target test resource and determines that the target test resource is an idle test resource.

优选的,还包括:Preferably, it also includes:

当所述服务端同时接收到多个客户端发送的测试资源请求时,依据预先设置的所述多个客户端的优先级对所述多个客户端发送的测试资源请求进行处理。When the server simultaneously receives the test resource requests sent by multiple clients, it processes the test resource requests sent by the multiple clients according to the preset priorities of the multiple clients.

优选的,还包括:Preferably, it also includes:

所述服务端利用所述目标测试资源对所述目标测试用例完成测试之后,按照预先设置的报告格式生成测试报告。After the server uses the target test resources to test the target test case, it generates a test report according to a preset report format.

优选的,所述客户端的测试用例的预先获取过程包括:Preferably, the pre-acquisition process of the test case of the client includes:

所述客户端获取用户利用RobotFramework环境下的ride工具编写的测试用例并存储。The client obtains and stores the test case written by the user using the ride tool under the RobotFramework environment.

优选的,还包括:Preferably, it also includes:

所述服务端获取所述目标测试用例,并将所述目标测试用例发送至其他客户端。The server obtains the target test case, and sends the target test case to other clients.

本发明提供的一种并行自动化测试方法,包括:客户端发送测试资源请求至服务端,其中,客户端在预先搭建的RobotFramework环境下工作,服务端在预先搭建的staf环境下工作;服务端判断是否存在满足测试资源请求所需的测试资源的空闲测试资源,如果是,则确定该空闲测试资源中与测试资源请求对应的测试资源为目标测试资源,确定客户端中预先获取的与测试资源请求对应的测试用例为目标测试用例,并利用目标测试资源对目标测试用例进行测试。与现有技术相比,本申请公开的上述技术特征中,基于roborframework环境及staf环境完成并行自动化测试,由于roborframework较强的语言整合能力及staf较好的自发性,能够快速高效的完成对测试用例的测试。同时,无需对多个测试用例分配相同的测试资源,而是利用空闲测试资源中与测试用例对应的测试资源对其进行测试,避免了测试资源的浪费,且,由此实现多个测试用例的测试时并不需同时完成,从而避免了背景技术中提到的浪费时间的情况,即,本申请提供的一种并行自动化测试方法能够避免测试资源及测试时间的浪费,进而高效快速的完成测试任务。A parallel automated testing method provided by the present invention includes: the client sends a test resource request to the server, wherein the client works in a pre-built RobotFramework environment, and the server works in a pre-built staf environment; the server judges Whether there is an idle test resource that satisfies the test resource required by the test resource request, if yes, then determine that the test resource corresponding to the test resource request in the idle test resource is the target test resource, and determine the test resource that is pre-acquired in the client and the test resource request The corresponding test case is a target test case, and the target test case is tested using the target test resources. Compared with the prior art, in the above-mentioned technical features disclosed in this application, parallel automated testing is completed based on the roborframework environment and the staf environment. Due to the strong language integration capability of roborframework and the better spontaneity of staf, the test can be completed quickly and efficiently Use case testing. At the same time, there is no need to allocate the same test resources to multiple test cases, but to use the test resources corresponding to the test cases in the idle test resources to test them, avoiding the waste of test resources, and thus realizing the integration of multiple test cases The test does not need to be completed at the same time, thereby avoiding the time-wasting situation mentioned in the background technology, that is, a parallel automated test method provided by the application can avoid the waste of test resources and test time, and then complete the test efficiently and quickly Task.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.

图1为本发明实施例提供的一种并行自动化测试方法的流程图。FIG. 1 is a flowchart of a parallel automated testing method provided by an embodiment of the present invention.

具体实施方式detailed description

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

请参阅图1,其示出了本发明实施例提供的一种并行自动化测试方法的流程图,可以包括以下步骤:Please refer to FIG. 1, which shows a flowchart of a parallel automated testing method provided by an embodiment of the present invention, which may include the following steps:

S11:客户端发送测试资源请求至服务端,其中,客户端在预先搭建的RobotFramework环境下工作,服务端在预先搭建的staf环境下工作。S11: The client sends a test resource request to the server, wherein the client works in the pre-built RobotFramework environment, and the server works in the pre-built staf environment.

需要说明的是,staf(SoftwareTestAutomationFramework,软件测试自动化框架)是开源、跨平台、支持多语言并且基于可重用的组件来构建的自动化测试框架,它封装了不同平台和不同语言间通信的复杂性,提供了消息、互斥、同步、日志等可复用的服务,同时其具有较好的自发性,适用于自动化测试,能够使用户在此基础上方便快速地构建自动化测试解决方案。而RobotFramework(机器人框架)是一款功能自动化测试框架,具备良好的可扩展性,支持关键字驱动,其也具有较强的语言整合能力,可以同时测试多种类型的客户端或者接口,进行分布式测试执行。客户端在RobotFramework环境下完成与并行自动化测试相关的工作,服务端在staf环境下完成与并行自动化测试相关的工作。It should be noted that staf (SoftwareTestAutomationFramework, software test automation framework) is an open source, cross-platform, multi-language and automated testing framework based on reusable components. It encapsulates the complexity of communication between different platforms and different languages. It provides reusable services such as messages, mutual exclusion, synchronization, and logs. At the same time, it has good spontaneity and is suitable for automated testing. It enables users to conveniently and quickly build automated testing solutions on this basis. The RobotFramework (robot framework) is a functional automation testing framework, which has good scalability and supports keyword-driven. It also has strong language integration capabilities and can test multiple types of clients or interfaces at the same time for distribution. type test execution. The client completes the work related to parallel automated testing in the RobotFramework environment, and the server completes the work related to parallel automated testing in the staf environment.

S12:服务端判断是否存在满足测试资源请求所需的测试资源的空闲测试资源,如果是,则执行步骤S13,如果否,则执行步骤S14。S12: The server judges whether there are idle test resources satisfying the test resources required by the test resource request, if yes, execute step S13, and if no, execute step S14.

需要说明的是,满足测试资源请求所需的测试资源的空闲测试资源,即空闲测试资源大于测试资源请求所需的测试资源。而测试资源请求所需的测试资源的大小需求可以携带于测试资源请求中。It should be noted that the idle test resources of the test resources required to satisfy the test resource request, that is, the idle test resources are greater than the test resources required by the test resource request. The size requirements of the test resources required by the test resource request may be carried in the test resource request.

S13:确定该空闲测试资源中与测试资源请求对应的测试资源为目标测试资源,确定客户端中预先获取的与测试资源请求对应的测试用例为目标测试用例,并利用目标测试资源对目标测试用例进行测试。S13: Determine the test resource corresponding to the test resource request in the idle test resource as the target test resource, determine the test case corresponding to the test resource request obtained in advance in the client as the target test case, and use the target test resource to test the target test case carry out testing.

其中,空闲测试资源中与测试资源请求对应的测试资源即为与测试资源请求对应的测试用例所需使用的测试资源大小一致的空闲测试资源,如果空闲测试资源不足以供测试用例的测试,可以直接暂停对测试资源请求的处理。Among them, the test resource corresponding to the test resource request in the idle test resource is the idle test resource with the same size as the test resource required by the test case corresponding to the test resource request. If the idle test resource is not enough for the test of the test case, you can Immediately suspends processing of test resource requests.

具体来说,利用目标测试资源对目标测试用例进行测试实际为对目标测试端的测试,目标测试用例中包含有对目标测试端的测试内容,在执行目标测试用例的过程中,可对目标测试端进行访问,以完成测试。而在进行测试之前,还可以判断目标测试端是否准备就绪(即其待测系统是否安装完毕),如果是,再进行测试,否则,则等待目标测试端准备就绪后再进行测试。Specifically, using the target test resources to test the target test case is actually the test of the target test end. The target test case contains the test content of the target test end. During the execution of the target test case, the target test end can be Visit to complete the test. Before testing, it is also possible to judge whether the target test terminal is ready (that is, whether the system to be tested is installed), and if so, test again, otherwise, wait for the target test terminal to be ready before testing.

S14:暂停对测试资源请求的处理。S14: Suspend the processing of the test resource request.

由于不存在满足测试资源请求所需的测试资源的空闲测试资源,暂停对测试资源请求的处理,等待下一步的处理。Since there is no idle test resource satisfying the test resource required by the test resource request, the processing of the test resource request is suspended, waiting for the next step of processing.

本申请公开的上述技术特征中,基于roborframework环境及staf环境完成并行自动化测试,由于roborframework较强的语言整合能力及staf较好的自发性,能够快速高效的完成对测试用例的测试。同时,无需对多个测试用例分配相同的测试资源,而是利用空闲测试资源中与测试用例对应的测试资源对其进行测试,避免了测试资源的浪费,且,由此实现多个测试用例的测试时并不需同时完成,从而避免了背景技术中提到的浪费时间的情况,即,本申请提供的一种并行自动化测试方法能够避免测试资源及测试时间的浪费,进而高效快速的完成测试任务。Among the above-mentioned technical features disclosed in this application, the parallel automated testing is completed based on the roborframework environment and the staf environment. Due to the strong language integration capability of roborframework and the good spontaneity of staf, the testing of test cases can be completed quickly and efficiently. At the same time, there is no need to allocate the same test resources to multiple test cases, but to use the test resources corresponding to the test cases in the idle test resources to test them, avoiding the waste of test resources, and thus realizing the integration of multiple test cases The test does not need to be completed at the same time, thereby avoiding the time-wasting situation mentioned in the background technology, that is, a parallel automated test method provided by the application can avoid the waste of test resources and test time, and then complete the test efficiently and quickly Task.

需要说明的是,为了实现本发明实施例提供的一种并行自动化测试方法,需要预先对staf环境及roborframework环境进行搭建。具体来说:It should be noted that, in order to implement a parallel automated testing method provided by the embodiment of the present invention, it is necessary to build a staf environment and a roborframework environment in advance. Specifically:

客户端可以为windows平台,作为测试环境的监控端和控制端,在客户端的windows平台安装robotframework环境后,需依赖python2.7,导入Selenium2Library、OperatingSystem、SSHLibrary、String、keywork.txt自定义库等库,以通过上述库完成测试用例的编写。具体来说,客户端的测试用例的预先获取过程可以包括:客户端获取用户利用RobotFramework环境下的ride工具编写的测试用例并存储。即,在客户端的roborframework环境创建完成后,用户运用ride工具编写测试用例,而测试用例可以包括:ltpcom、ltpfs、ltpmm、ltpfs_bind、ltpipc、ltpsched、ltpfsx、ltpsys、ltpfs_reaonly、ltpdio、ltpio、ltpio_cd、ltpnetwork。其功能分别是实现了对ltp(LinuxTestProject,Linux测试项目)测试在文件系统、进程管理、内存管理、IO功能、网络功能方面的自动化测试。The client can be a windows platform, as the monitor and control terminal of the test environment. After installing the robotframework environment on the windows platform of the client, it needs to rely on python2.7 and import Selenium2Library, OperatingSystem, SSHLibrary, String, keywork.txt custom library and other libraries , to complete the writing of test cases through the above library. Specifically, the pre-acquisition process of the test case of the client may include: the client obtains and stores the test case written by the user using the ride tool in the RobotFramework environment. That is, after the client's roborframework environment is created, the user uses the ride tool to write test cases, and the test cases can include: ltpcom, ltpfs, ltpmm, ltpfs_bind, ltpipc, ltpsched, ltpfsx, ltpsys, ltpfs_reaonly, ltpdio, ltpio, ltpio_cd, ltpnetwork . Its functions are to realize the automated testing of the ltp (LinuxTestProject, Linux test project) test in terms of file system, process management, memory management, IO function, and network function.

而服务端用来管理测试资源的请求和释放,其staf环境的搭建主要可以包括:服务端安装编译ltp20150422版本,并对安装程序进行封装;读取staf的xml配置文件,通过资源池服务,把线程池的线程数做成可配置,进而能够使得服务端根据测试资源的数量来灵活控制并行自动化测试的线程数,即使得服务端实现测试资源的管理及释放。The server is used to manage the request and release of test resources. The establishment of the staf environment mainly includes: installing and compiling the ltp20150422 version on the server, and packaging the installation program; reading the xml configuration file of staf, and using the resource pool service to The number of threads in the thread pool is configurable, so that the server can flexibly control the number of threads for parallel automated testing according to the number of test resources, that is, the server can manage and release test resources.

上述实施例提供的一种并行自动化测试方法中,还可以包括:In the parallel automated testing method provided by the above-mentioned embodiment, it may also include:

如果服务端判断出不存在满足测试资源请求所需的测试资源的空闲测试资源,以通知客户端暂时不存在能够对目标测试用例进行测试的空闲资源,方便客户端获知服务端对于测试资源请求的处理进度。If the server determines that there are no idle test resources that satisfy the test resource request, it will notify the client that there is no idle resource that can test the target test case, so that the client can know the server's response to the test resource request. Processing progress.

同时,服务端将测试资源请求暂时存储在缓存中,在服务端判断出不存在满足测试资源请求所需的测试资源的空闲测试资源的时刻之后的预设时间段内,如果出现满足测试资源请求所需的测试资源的空闲测试资源,则确定该空闲测试资源为目标测试资源。如果在预设时间段内,未出现满足测试资源请求所需的测试资源的空闲测试资源,则停止对该测试资源请求的处理,以避免对其他测试资源请求及服务端的性能造成影响,并将处理失败的消息发送至客户端,以方便客户端及时对处理失败的测试资源请求对应的测试用例进行其他处理。其中,预设时间段可以根据实际需要进行设定。At the same time, the server temporarily stores the test resource request in the cache, and within a preset time period after the server determines that there is no idle test resource that satisfies the test resource request. If there is an idle test resource of the required test resource, the idle test resource is determined as the target test resource. If within the preset time period, there is no idle test resource that satisfies the test resource required by the test resource request, stop processing the test resource request to avoid impacting other test resource requests and server performance, and The failed processing message is sent to the client, so that the client can perform other processing on the test case corresponding to the failed test resource request in a timely manner. Wherein, the preset time period can be set according to actual needs.

通过上述步骤,不仅保证了客户端能够及时获知服务端对于测试资源请求的处理状态,还能够在不影响服务端的性能的前提下对测试资源请求进行处理,保证了并行自动化测试的实现。Through the above steps, it is not only ensured that the client can know the processing status of the test resource request by the server in a timely manner, but also can process the test resource request without affecting the performance of the server, ensuring the realization of parallel automated testing.

另外,服务端利用目标测试资源对目标测试用例完成测试之后,还可以按照预先设置的报告格式生成测试报告。In addition, after the server uses the target test resource to test the target test case, it can also generate a test report according to a preset report format.

具体来说,测试报告可以为web测试报告。报告格式可以根据实际需要进行预先设置,具体可以是通过用于限定报告格式的脚本来实现。从而,与现有技术中Linux的传统测试报告格式不统一,界面不友好不同,本申请中测试报告为使用统一报告格式的界面友好的测试报告,从而提高了测试报告的可读性,使得测试结果清晰了然,便于测试和研发人员更好的定位、解决问题。而测试报告的格式可以是html格式,在测试用例的测试均完成之后,还可以收集每个测试用例对应的测试报告,形成统一的总测试报告,供测试及研发人员查询。Specifically, the test report can be a web test report. The report format can be preset according to actual needs, specifically, it can be realized through a script used to define the report format. Thereby, unlike the traditional test report format of Linux in the prior art, which is not uniform and has an unfriendly interface, the test report in this application is an interface-friendly test report using a unified report format, thereby improving the readability of the test report and making the test The results are clear and clear, which is convenient for testers and R&D personnel to better locate and solve problems. The format of the test report can be in html format. After the tests of the test cases are completed, the test reports corresponding to each test case can be collected to form a unified overall test report for query by test and R&D personnel.

上述实施例提供的一种并行自动化测试方法中,还可以包括:In the parallel automated testing method provided by the above-mentioned embodiment, it may also include:

服务端利用目标测试资源对目标测试用例完成测试之后,将目标测试资源进行释放,并确定目标测试资源为空闲测试资源。After the server uses the target test resource to test the target test case, it releases the target test resource and determines that the target test resource is an idle test resource.

在完成对目标测试用例的测试后,将目标测试资源进行释放,能够保证有足够的空闲测试资源等待对其他测试用例的处理,避免在目标测试用例完成测试之后还对目标测试资源进行占有,进而由于空闲测试资源的缺乏导致并行自动化测试的速度降低的情况发生。After the test of the target test case is completed, the target test resource is released, which can ensure that there are enough free test resources waiting for the processing of other test cases, avoiding the possession of the target test resource after the target test case completes the test, and then The slowdown of parallel automated tests occurs due to the lack of idle test resources.

上述实施例提供的一种并行自动化测试方法中,还可以包括:In the parallel automated testing method provided by the above-mentioned embodiment, it may also include:

当服务端同时接收到多个客户端发送的测试资源请求时,依据预先设置的多个客户端的优先级对多个客户端发送的测试资源请求进行处理。When the server receives the test resource requests sent by multiple clients at the same time, it processes the test resource requests sent by the multiple clients according to the preset priorities of the multiple clients.

具体来说,优先处理优先级较高的客户端发送的测试资源请求,当然,如果空闲测试资源充足的情况下,也可以同时对多个测试资源请求进行处理,从而在保证优先级高的客户端发送的测试资源请求优先被处理的同时,进一步提高了并行自动化测试的速度。Specifically, the test resource requests sent by clients with higher priority are prioritized. Of course, if there are sufficient idle test resources, multiple test resource requests can be processed at the same time, so as to ensure that clients with high priority While the test resource requests sent by the terminal are processed first, the speed of parallel automated testing is further improved.

另外,服务端获取目标测试用例后,还可以将目标测试用例发送至其他的客户端。In addition, after the server obtains the target test case, it can also send the target test case to other clients.

其他客户端在接收到目标测试用例后,当需要对于目标测试用例对应的项目进行测试时,仅需对目标测试用例中的个别参数或属性进行修改,即可得到所需的测试用例。由此,减少了测试及研发人员的工作量,降低了人工成本。After other clients receive the target test case, when they need to test the item corresponding to the target test case, they only need to modify individual parameters or attributes in the target test case to obtain the required test case. As a result, the workload of testing and R&D personnel is reduced, and labor costs are reduced.

以下为具体实施时可以作为对客户端的相关配置的语句:The following are statements that can be used as relevant configurations for the client during specific implementation:

配置相关参数:Configure related parameters:

测试用例相关语句:Test case related statements:

测试过程相关语句及测试报告的整合语句:Statements related to the test process and integrated statements of the test report:

对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1.一种并行自动化测试方法,其特征在于,包括:1. A parallel automated testing method, characterized in that, comprising: 客户端发送测试资源请求至服务端,其中,所述客户端在预先搭建的RobotFramework环境下工作,所述服务端在预先搭建的staf环境下工作;The client sends a test resource request to the server, wherein the client works in a pre-built RobotFramework environment, and the server works in a pre-built staf environment; 所述服务端判断是否存在满足所述测试资源请求所需的测试资源的空闲测试资源,如果是,则确定该空闲测试资源中与所述测试资源请求对应的测试资源为目标测试资源,确定所述客户端中预先获取的与所述测试资源请求对应的测试用例为目标测试用例,并利用所述目标测试资源对所述目标测试用例进行测试。The server determines whether there is an idle test resource that satisfies the test resource required by the test resource request, and if so, determines that the test resource corresponding to the test resource request in the idle test resource is the target test resource, and determines the The test case corresponding to the test resource request obtained in advance in the client is a target test case, and the target test case is tested by using the target test resource. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method according to claim 1, further comprising: 如果所述服务端判断出不存在满足所述测试资源请求所需的测试资源的空闲测试资源,则返回等待指令至所述客户端。If the server determines that there is no idle test resource that satisfies the test resource request, it returns a waiting instruction to the client. 3.根据权利要求2所述的方法,其特征在于,还包括:3. The method according to claim 2, further comprising: 在所述服务端判断出不存在满足所述测试资源请求所需的测试资源的空闲测试资源的时刻之后的预设时间段内,如果出现满足所述测试资源请求所需的测试资源的空闲测试资源,则确定该空闲测试资源为目标测试资源。Within a preset period of time after the server determines that there is no idle test resource that satisfies the test resource request, if there is an idle test resource that satisfies the test resource request resource, the idle test resource is determined as the target test resource. 4.根据权利要求1所述的方法,其特征在于,还包括:4. The method according to claim 1, further comprising: 所述服务端利用所述目标测试资源对所述目标测试用例完成测试之后,将所述目标测试资源进行释放,并确定所述目标测试资源为空闲测试资源。After the server uses the target test resource to test the target test case, it releases the target test resource and determines that the target test resource is an idle test resource. 5.根据权利要求1所述的方法,其特征在于,还包括:5. The method according to claim 1, further comprising: 当所述服务端同时接收到多个客户端发送的测试资源请求时,依据预先设置的所述多个客户端的优先级对所述多个客户端发送的测试资源请求进行处理。When the server simultaneously receives the test resource requests sent by multiple clients, it processes the test resource requests sent by the multiple clients according to the preset priorities of the multiple clients. 6.根据权利要求1所述的方法,其特征在于,还包括:6. The method according to claim 1, further comprising: 所述服务端利用所述目标测试资源对所述目标测试用例完成测试之后,按照预先设置的报告格式生成测试报告。After the server uses the target test resources to test the target test case, it generates a test report according to a preset report format. 7.根据权利要求6所述的方法,其特征在于,所述客户端的测试用例的预先获取过程包括:7. The method according to claim 6, wherein the pre-acquisition process of the test case of the client comprises: 所述客户端获取用户利用RobotFramework环境下的ride工具编写的测试用例并存储。The client obtains and stores the test case written by the user using the ride tool under the RobotFramework environment. 8.根据权利要求1至7任一项所述的方法,其特征在于,还包括:8. The method according to any one of claims 1 to 7, further comprising: 所述服务端获取所述目标测试用例,并将所述目标测试用例发送至其他客户端。The server obtains the target test case, and sends the target test case to other clients.
CN201510760943.9A 2015-11-10 2015-11-10 A kind of parallel automated testing method Pending CN105224464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510760943.9A CN105224464A (en) 2015-11-10 2015-11-10 A kind of parallel automated testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510760943.9A CN105224464A (en) 2015-11-10 2015-11-10 A kind of parallel automated testing method

Publications (1)

Publication Number Publication Date
CN105224464A true CN105224464A (en) 2016-01-06

Family

ID=54993449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510760943.9A Pending CN105224464A (en) 2015-11-10 2015-11-10 A kind of parallel automated testing method

Country Status (1)

Country Link
CN (1) CN105224464A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598841A (en) * 2016-11-07 2017-04-26 上海斐讯数据通信技术有限公司 A self-installation method and system for an automated test framework
CN106713484A (en) * 2017-01-10 2017-05-24 微梦创科网络科技(中国)有限公司 Performance pressure measurement implementation method, system and server
CN107179985A (en) * 2016-03-09 2017-09-19 阿里巴巴集团控股有限公司 Execution method and apparatus for automating use-case
CN107396392A (en) * 2017-07-26 2017-11-24 深圳市共进电子股份有限公司 Radio-frequency indicator testing method, device, equipment and the storage medium of WAP
CN108667539A (en) * 2017-03-28 2018-10-16 北京小米移动软件有限公司 For the frequency range test method and device of screened room, electronic equipment
CN109660427A (en) * 2018-12-14 2019-04-19 福建星网智慧科技股份有限公司 A kind of virtual terminal automated testing method of video conferencing system
CN109669871A (en) * 2018-12-24 2019-04-23 枫国宏利信息科技服务(成都)有限公司 A method of realizing Oracle Form automatic test
CN111984512A (en) * 2020-08-12 2020-11-24 苏州浪潮智能科技有限公司 Storage system resource competition simulation test method, system, terminal and storage medium
CN112634887A (en) * 2020-12-08 2021-04-09 北京梧桐车联科技有限责任公司 Voice mode control method, device and system
CN113260981A (en) * 2018-12-04 2021-08-13 美光科技公司 Allocating test resources to perform testing of memory components
CN114647593A (en) * 2022-04-30 2022-06-21 苏州浪潮智能科技有限公司 Automatic storage testing method and device capable of dynamically adjusting resources
CN117421234A (en) * 2023-11-03 2024-01-19 天讯瑞达通信技术有限公司 Multi-platform multi-concurrency automatic threading testing system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020131430A1 (en) * 1999-07-14 2002-09-19 Jan Lindquist Combining narrowband applications with broadband transport
CN104702664A (en) * 2014-12-29 2015-06-10 惠州Tcl移动通信有限公司 Method and system for controlling task server
CN104915288A (en) * 2014-03-13 2015-09-16 阿里巴巴集团控股有限公司 Testing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020131430A1 (en) * 1999-07-14 2002-09-19 Jan Lindquist Combining narrowband applications with broadband transport
CN104915288A (en) * 2014-03-13 2015-09-16 阿里巴巴集团控股有限公司 Testing method and device
CN104702664A (en) * 2014-12-29 2015-06-10 惠州Tcl移动通信有限公司 Method and system for controlling task server

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179985A (en) * 2016-03-09 2017-09-19 阿里巴巴集团控股有限公司 Execution method and apparatus for automating use-case
CN106598841A (en) * 2016-11-07 2017-04-26 上海斐讯数据通信技术有限公司 A self-installation method and system for an automated test framework
CN106713484A (en) * 2017-01-10 2017-05-24 微梦创科网络科技(中国)有限公司 Performance pressure measurement implementation method, system and server
CN108667539A (en) * 2017-03-28 2018-10-16 北京小米移动软件有限公司 For the frequency range test method and device of screened room, electronic equipment
CN108667539B (en) * 2017-03-28 2021-07-23 北京小米移动软件有限公司 Frequency band testing method and device for shielding room and electronic equipment
CN107396392B (en) * 2017-07-26 2020-09-08 深圳市共进电子股份有限公司 Radio frequency index testing method, device, equipment and storage medium of wireless access point
CN107396392A (en) * 2017-07-26 2017-11-24 深圳市共进电子股份有限公司 Radio-frequency indicator testing method, device, equipment and the storage medium of WAP
CN113260981A (en) * 2018-12-04 2021-08-13 美光科技公司 Allocating test resources to perform testing of memory components
CN109660427A (en) * 2018-12-14 2019-04-19 福建星网智慧科技股份有限公司 A kind of virtual terminal automated testing method of video conferencing system
CN109669871B (en) * 2018-12-24 2021-05-18 枫国宏利信息科技服务(成都)有限公司 A Method of Realizing Oracle Form Automated Testing
CN109669871A (en) * 2018-12-24 2019-04-23 枫国宏利信息科技服务(成都)有限公司 A method of realizing Oracle Form automatic test
CN111984512A (en) * 2020-08-12 2020-11-24 苏州浪潮智能科技有限公司 Storage system resource competition simulation test method, system, terminal and storage medium
CN111984512B (en) * 2020-08-12 2023-01-10 苏州浪潮智能科技有限公司 Storage system resource competition simulation test method, system, terminal and storage medium
CN112634887A (en) * 2020-12-08 2021-04-09 北京梧桐车联科技有限责任公司 Voice mode control method, device and system
CN112634887B (en) * 2020-12-08 2024-01-23 北京梧桐车联科技有限责任公司 Voice mode control method, device and system
CN114647593A (en) * 2022-04-30 2022-06-21 苏州浪潮智能科技有限公司 Automatic storage testing method and device capable of dynamically adjusting resources
CN114647593B (en) * 2022-04-30 2024-10-22 苏州浪潮智能科技有限公司 A storage automation testing method and device capable of dynamically adjusting resources
CN117421234A (en) * 2023-11-03 2024-01-19 天讯瑞达通信技术有限公司 Multi-platform multi-concurrency automatic threading testing system

Similar Documents

Publication Publication Date Title
CN105224464A (en) A kind of parallel automated testing method
US7730183B2 (en) System and method for generating virtual networks
CN103873534B (en) A kind of application cluster moving method and device
CN103024022B (en) A kind of managing and control system of virtual machine application service and method
EP3742293A1 (en) Event driving method and device
CN103645957B (en) A kind of resources of virtual machine management-control method and device
CN107302475A (en) The method of testing and device of a kind of Based on Distributed storage cluster
CN107807815B (en) Method and device for processing tasks in distributed mode
CN103064742A (en) Automatic deployment system and method of hadoop cluster
JP6045134B2 (en) Parallel workload simulation for application performance testing
CN107534571A (en) Manage virtual network function
CN106484623A (en) A kind of method of software test, apparatus and system
US10789111B2 (en) Message oriented middleware with integrated rules engine
CN106933709A (en) A kind of method of testing and device
CN105279036A (en) Inter-process communication method and device and electronic equipment
CN116541134B (en) Deployment method and device for containers in multi-architecture clusters
CN104750554B (en) The method and apparatus of Data Migration between a kind of virtual machine
CN108121595A (en) A kind of Docker containers multi-process management method and system
CN107479984A (en) Message based distributed space data processing system
WO2024012003A9 (en) Data processing method and apparatus, and device, storage medium and program product
CN116820908A (en) Locust-based performance testing methods, devices, equipment and media
CN106897147A (en) A kind of application container engine container resource regulating method and device
Tang et al. Application centric lifecycle framework in cloud
CN112231231B (en) Cloud service debugging method, system and device
WO2024174904A1 (en) Management migration method and apparatus for container instance, and electronic device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160106