WO2016119398A1 - Method, apparatus and system for detecting suspension and runaway faults of tested device - Google Patents

Method, apparatus and system for detecting suspension and runaway faults of tested device Download PDF

Info

Publication number
WO2016119398A1
WO2016119398A1 PCT/CN2015/083108 CN2015083108W WO2016119398A1 WO 2016119398 A1 WO2016119398 A1 WO 2016119398A1 CN 2015083108 W CN2015083108 W CN 2015083108W WO 2016119398 A1 WO2016119398 A1 WO 2016119398A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
tested
fault
device under
under test
Prior art date
Application number
PCT/CN2015/083108
Other languages
French (fr)
Chinese (zh)
Inventor
尹永
明义波
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016119398A1 publication Critical patent/WO2016119398A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present invention relates to the field of data communication technologies, and in particular, to a method, device and system for detecting a hang-up failure of a device under test.
  • Suspending is a concept in the operating system that refers to the operating system suspending execution of a process.
  • One of the reasons for the hang is the end user's request: when the end user finds a suspicious problem while his program is running, he wants to pause to stop his program. That is, the executing process is suspended; if the user process is in the ready state and not executed at this time, the process does not accept the scheduling for the user to study its execution or modify the program. We call this quiescent state a suspend state.
  • Running away is a concept in a computer program.
  • PC program counter
  • Suspending and running are the higher priority faults in the automated test. If the fault occurs on the device under test, it will affect the normal release of the program version. However, the existing automated test system and method determine the success or failure of the script test by the return value of the script, generate the overall test success and failure result according to the return value of the script, generate a test log in the test, and then find the specific test problem by viewing the log. However, the hang-up runaway fault is not distinguished from other test faults, resulting in the discovery of a hang-up runaway fault at a point in time after the automated test is completed.
  • Another automated test system proposes a database management method for logs. Although the efficiency of log management is improved, the processing of test failures including suspension of runaway faults is still not solved after suspending and running faults after the test is completed. Fast processing method.
  • the technical problem to be solved by the embodiments of the present invention is to provide a method, a device and a system for detecting a running failure of a device under test, which can check and quickly process the suspension and runaway faults of the device under test.
  • the embodiment of the present invention adopts the following technical solutions:
  • a method for detecting a running failure of a device under test includes: obtaining a test plan and a test resource configured for the device under test; and parsing the test plan to obtain a test time and to be tested The product and the script to be tested; when the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
  • the step of suspending the running fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the step of obtaining the detection result includes: loading the product to be tested according to the acquired product. a corresponding test script to be tested; deploying the product to be tested according to the test resource to the configured plurality of devices under test, and acquiring an available device under test, and connecting the available device under test; Performing a test script to be tested on the test device; after any test to be tested completes the test, generating a test run log, and performing a pending runaway fault detection on the product to be tested by the device under test, generating a hang-up run Fault log.
  • the generating the hang-up flight fault log further includes: starting a socket service; when there is a hang-up flight failure, sending a fault detection email to the fault owner through the socket service.
  • the step of sending a fault detection email to the fault owner through the socket service when there is a pending runaway fault includes: obtaining a key segment of the fault information from the suspended runaway fault log, and matching according to the key segment The email address of the corresponding fault owner; the fault detection email is sent to the fault owner through the socket service.
  • the method further includes: retaining the operating environment of the device under test when the pending runaway fault occurs, and the measured device is tested.
  • the device is deleted from the test resource; another available device under test is obtained from the test resource, and the device under test is connected; the script to be tested is executed on another available device under test; After any of the to-be-tested scripts completes the test, the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
  • the obtaining the pending runaway fault detection result further includes: when there is no pending runaway fault, executing another script to be tested on the device under test; and after the test to be tested completes the test, passing the device under test Suspending and running fault detection of the product to be tested.
  • a detecting device for suspending a running fault of a device under test comprising: an obtaining module configured to acquire a test plan and a test resource configured for the device under test; and an analysis module, setting Obtaining test time, products to be tested, and scripts to be tested for parsing the test plan; fault detection module, When the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
  • the fault detection module includes: a loading unit, configured to load a plurality of corresponding scripts to be tested according to the obtained product to be tested; and the connection unit is configured to deploy the product to be tested to the configured multiple according to the test resource.
  • a loading unit configured to load a plurality of corresponding scripts to be tested according to the obtained product to be tested
  • the connection unit is configured to deploy the product to be tested to the configured multiple according to the test resource.
  • On the device and obtain an available device under test, and connect the available device under test; an execution unit, configured to execute a script to be tested on the available device under test; After the test is completed, the test run log is generated, and the test device is hanged and the runaway fault detection is performed by the device under test, and the hanged runaway fault log is generated.
  • the fault detection module further includes: a startup unit configured to start a socket service; and a mail sending unit configured to send a fault detection email to the fault owner through the socket service when there is a pending runaway fault.
  • the mail sending unit is configured to: obtain a key segment of the fault information from the suspended runaway fault log, and match the email address of the corresponding fault owner according to the key segment; and the fault responsible person through the socket service Send a fault detection email.
  • the fault detection module further includes: a first processing unit, configured to: retain an operating environment of the device under test when the suspended runaway fault occurs, and use the device under test from the test resource Deleting; obtaining another available device under test from the test resource, and connecting the device under test; executing the to-be-tested script on another available device under test; when any of the to-be-tested scripts After the test is completed, the product to be tested is tested for suspension runaway fault by another available device under test.
  • a first processing unit configured to: retain an operating environment of the device under test when the suspended runaway fault occurs, and use the device under test from the test resource Deleting; obtaining another available device under test from the test resource, and connecting the device under test; executing the to-be-tested script on another available device under test; when any of the to-be-tested scripts After the test is completed, the product to be tested is tested for suspension runaway fault by another available device under test.
  • the fault detection module further includes: a second processing unit, configured to: execute another script to be tested on the device under test when there is no pending runaway fault; and when the script to be tested completes the test The hang-up flight fault detection is performed on the product to be tested by the device under test.
  • a detection system for a test device to suspend a runaway fault comprising a plurality of products to be tested, a plurality of devices to be tested, and the device to be tested hangs and runs as described above. Flying fault detection device.
  • the detecting device of the device under test in the embodiment of the present invention suspends the detection method of the running fault, firstly obtaining the test plan and the test resource configured for the device under test; and then parsing the test plan and obtaining the test time therefrom The product to be tested and the script to be tested; finally, after the preset test time is reached, the running fault is suspended according to the product to be tested, the script to be tested and the test resource, and the test result is obtained.
  • the detecting device of the device under test in the embodiment of the present invention suspends the running fault detection method, and has the pending running check function in the test operation, and can find the suspended running fault of the tested device in advance, instead of merely relying on
  • the script return value generates the result of the test success and failure and is manually viewed according to the log after the test is completed, and can monitor in real time whether the tested device tested by the test script generates a pending runaway fault.
  • the output is timely, which achieves the effect of quickly notifying the fast-running and escaping flight failure, greatly delaying the fault location and solving the time point, improving the automation test efficiency, accelerating the product failure convergence speed, and providing timely release of the product. Better protection.
  • FIG. 1 is a flow chart showing a method for detecting a running failure of a device under test according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a device for detecting a running failure of a device under test according to an embodiment of the present invention
  • FIG. 3 is a schematic structural view of a fault detecting module
  • FIG. 4 is a schematic diagram showing an application flow of a detection system for a running failure of a device under test according to an embodiment of the present invention.
  • a method for detecting a running failure of a device under test first obtaining a test plan and a test resource configured for the device under test; and then parsing the test plan to obtain a test time and waiting for Testing the product and the script to be tested; finally, when the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
  • the method includes:
  • Step S11 Obtain a test plan and test resources configured for the device under test.
  • the test device of the embodiment of the present invention suspends the detection method of the runaway fault.
  • the test plan and the test resource need to be configured for the device under test, where the test plan carries the test time, the product to be tested, and the test Test script, the test resource carries the usage of multiple devices under test.
  • the method of the embodiment of the invention detects the hanging and running fault of the product to be tested by detecting the device under test.
  • Step S13 Parse the test plan to obtain a test time, a product to be tested, and a script to be tested.
  • the test time is the startup time of the set automated test.
  • the product to be tested refers to a product group with similar functions and certain differences. Such products can share the same set of common script libraries, and at the same time, due to certain differences in functions. There is also a script library that is only suitable for testing its own products.
  • Step S15 When the current time reaches the acquired test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
  • the obtained detection result is an overall result display after the detection method of the hang-up failure detection of the device under test according to the embodiment of the present invention is completed, and is used for announcing the overall test situation of the current detection.
  • the output detection result includes a fault condition that occurs when each device under test detects the product to be tested by using multiple scripts, that is, from the output of the detection result, it is possible to clearly understand where each device under test is located. What happened after a script was tested.
  • the obtained test result can also be outputted in the form of an excel table.
  • the method of the embodiment of the present invention is not limited to such an output mode.
  • step S15 includes:
  • test run log is generated, and the test device is hanged and the runaway fault detection is performed by the device under test, and the hanged runaway fault log is generated.
  • the generated hang-up flight fault log can be used as the detection result obtained after the hang-up flight fault detection. By suspending the running fault log, you can clearly understand the specific situation of the pending runaway fault, and thus help to eliminate the subsequent faults.
  • the test to be tested may be selected by selecting a corresponding test script to be tested, wherein the test script provides a storage path that needs to be loaded, and is to be tested. Scripts can also be added, deleted, and modified.
  • the method further includes:
  • the fault detection mail is sent to the fault owner through the socket service.
  • the fault detection email is sent to the fault owner through the opened socket service.
  • the socket service includes a server socket and a client socket, and defines a socket request callback function when the socket is started. The function is called after receiving the socket request, and performs a mail sending function. After the socket service is started, it will wait for a socket request including the information of the hang-up flight failure and the fault owner's email address, and the socket service only needs to be started once to serve multiple fault detection processes at the same time.
  • the step of sending the fault detection email to the fault owner through the socket service includes:
  • the fault detection mail is sent to the fault owner through the socket socket service.
  • the hanging and running fault detection is performed, and finally the complete diary record and the pending running of the script test are generated.
  • the special log records generated by the flight faults distinguish the pending runaway faults from other test faults, which enables a clearer understanding of the occurrence of the pending runaway faults and timely processing.
  • the email address of the matching fault owner may be queried from the database of the fault owner. Then, after the suspension flight failure information and the fault responsible person email address are organized, the related information is sent from the client socket to the server socket; after receiving the client socket request, the server socket calls the callback function, and the callback function is in the service.
  • the terminal sends the fault information to the fault responsible person's email address through the Simple Mail Transfer Protocol (SMTP) service, and the corresponding fault owner logs in to the email address to receive the corresponding pending runaway fault detection email, and then processes the fault in time.
  • SMTP Simple Mail Transfer Protocol
  • the step of sending the fault detection email to the fault owner through the socket socket service further includes:
  • the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
  • the hang-up flight fault is a higher-priority fault in the automatic test, if such a fault occurs, after the fault detection mail is sent, the hang-up flight fault detection method of the device under test according to the embodiment of the present invention needs to be retained.
  • the method further includes:
  • test device After the test to be tested completes the test, the test device is suspended for running fault detection by the device under test.
  • each type of product to be tested corresponds to multiple scripts to be tested, if a test to be tested does not have a pending runaway failure after the test is completed, the next test to be tested needs to be continued until When the device under test has a pending runaway failure, the test of the subsequent test script is stopped, and the operating environment of the device under test is retained when the fault occurs.
  • the device 200 includes:
  • the obtaining module 201 is configured to obtain a test plan and a test resource configured for the device under test;
  • the parsing module 203 is configured to parse the test plan to obtain a test time, a product to be tested, and a script to be tested;
  • the fault detection module 205 is configured to perform a pending runoff fault detection according to the to-be-tested product, the to-be-tested script, and the test resource when the current time reaches the acquired test time, and obtain the detection result.
  • the fault detection module 205 includes:
  • the loading unit 2051 is configured to load a plurality of corresponding scripts to be tested according to the obtained product to be tested;
  • the connecting unit 2052 is configured to deploy the product to be tested to the configured plurality of devices under test according to the test resource, and obtain an available device under test, and connect the available device under test;
  • the executing unit 2053 is configured to execute a script to be tested on the available device under test
  • the obtaining unit 2054 is configured to generate a test running log after the test of the script to be tested is completed, and perform a pending runaway fault detection on the to-be-tested product by the device under test to generate a suspended running fault log.
  • the fault detection module 205 further includes:
  • the booting unit 2057 is configured to start a socket socket service
  • the mail sending unit 2058 is configured to send a fault detection mail to the fault owner through the socket socket service when there is a pending runaway fault.
  • the mail sending unit 2058 is further configured to:
  • the fault detection mail is sent to the fault owner through the socket socket service.
  • the fault detection module 205 further includes:
  • the first processing unit 2059 is configured to:
  • the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
  • the fault detection module 205 further includes:
  • the second processing unit 2056 is configured to:
  • test device After the test to be tested completes the test, the test device is suspended for running fault detection by the device under test.
  • a detection system for a test device to suspend a runaway fault comprising a plurality of products to be tested, a plurality of devices to be tested, and the device to be tested hangs and runs as described above. Flying fault detection device.
  • the same type or the same product to be tested is configured on multiple devices to be tested, that is, multiple threads are used for concurrent test.
  • Device and load scripts on multiple devices under test are used to suspend the detection system of the runaway fault, and the fault detection of the suspension runaway is performed.
  • the test plan and test resources are configured for the device under test, the test plan is parsed, the test time, the product to be tested, and the script to be tested are obtained. Further, it is determined whether the current time is the acquired test time. If not, the process continues; if yes, the storage path of the plurality of scripts to be tested is loaded. After the script is loaded, the product to be tested is deployed to the configured multiple devices under test according to the test resource, and an available device under test is obtained, and the available device under test is connected. After the connection is completed, one of the plurality of scripts to be tested is executed, and then it is judged whether the execution of the script is completed. If not, the execution of the script is waited for; if yes, the suspension run detection is performed.
  • a pending runaway fault log is generated, and then the socket service is started, and the key segment of the fault information is obtained from the fault log, and the corresponding fault responsible person email address is matched, and the fault detection is sent to the fault owner.
  • the mail then retains the operating environment of the device under test that has a pending runaway failure, and goes out of the test resource, and finally obtains the next available device under test to continue testing.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • the hang-up flight failure of the device under test can be found in advance, instead of merely generating the test success and failure according to the script return value.
  • the result is manually viewed according to the log after the test is completed, and the device under test tested by the test script can be monitored in real time for a pending runaway failure. After obtaining the detection result, the output is timely, which achieves the effect of quickly notifying the fast-running and escaping flight failure, greatly delaying the fault location and solving the time point, improving the automation test efficiency, accelerating the product failure convergence speed, and providing timely release of the product. Better protection.

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

Disclosed are a method, apparatus and system for detecting suspension and runaway faults of a tested device. The method comprises: acquiring a test plan and a test resource configured for a tested device (S11); parsing the test plan to acquire a test time, a product to be tested and a script to be tested (S13); and when a current time reaches the acquired test time, according to the product to be tested, the script to be tested and the test resource, detecting suspension and runaway faults, and obtaining a detection result (S15). In this solution, whether a tested device tested by a test script has suspension and runaway faults can be monitored in real time, and a related log is independently generated, thereby achieving the effect of quick announcement and quick treatment of the suspension and runaway faults, greatly bringing forward a fault locating and solving time point, improving the automatic test efficiency, quickening a product fault convergence velocity, and providing a good guarantee for timely product release.

Description

一种被测设备挂起跑飞故障的检测方法、装置及系统Method, device and system for detecting running fault of test equipment 技术领域Technical field
本发明涉及数据通信技术领域,尤其涉及一种被测设备挂起跑飞故障的检测方法、装置及系统。The present invention relates to the field of data communication technologies, and in particular, to a method, device and system for detecting a hang-up failure of a device under test.
背景技术Background technique
挂起是操作系统中的概念,是指操作系统将某个进程暂停执行。引起挂起的其中一个原因是终端用户的请求:当终端用户在自己的程序运行期间发现有可疑问题时,希望暂停使自己的程序静止下来。亦即,使正在执行的进程暂停执行;若此时用户进程正处于就绪状态而未执行,则该进程暂不接受调度,以便用户研究其执行情况或对程序进行修改。我们把这种静止状态称为挂起状态。Suspending is a concept in the operating system that refers to the operating system suspending execution of a process. One of the reasons for the hang is the end user's request: when the end user finds a suspicious problem while his program is running, he wants to pause to stop his program. That is, the executing process is suspended; if the user process is in the ready state and not executed at this time, the process does not accept the scheduling for the user to study its execution or modify the program. We call this quiescent state a suspend state.
跑飞是计算机程序中的概念,是指系统受到某种干扰后,程序计数器(PC)的值偏离了给定的唯一变化历程,导致程序运行偏离正常的运行路径。程序跑飞因素及后果往往是不可预计的。在很多情况下,程序跑飞后系统会进入死循环而导致死机。Running away is a concept in a computer program. When the system is subjected to some kind of interference, the value of the program counter (PC) deviates from the given unique change history, causing the program to run away from the normal running path. The factors and consequences of running the program are often unpredictable. In many cases, after the program runs, the system will enter an infinite loop and cause a crash.
挂起和跑飞是自动化测试中优先级较高的故障,被测设备出现此类故障若不能快速解决,会影响程序版本的正常发布。然而,现有提出的自动化测试系统和方法通过脚本返回值判断脚本测试成功与否,依据脚本返回值生成整体测试成功和失败结果,并在测试中生成测试日志,然后通过查看日志发现具体测试问题,但是并没有把挂起跑飞故障和其他测试故障区分开,导致发现挂起跑飞故障的时间点在自动化测试全部完成之后,这样有滞后缺点。Suspending and running are the higher priority faults in the automated test. If the fault occurs on the device under test, it will affect the normal release of the program version. However, the existing automated test system and method determine the success or failure of the script test by the return value of the script, generate the overall test success and failure result according to the return value of the script, generate a test log in the test, and then find the specific test problem by viewing the log. However, the hang-up runaway fault is not distinguished from other test faults, resulting in the discovery of a hang-up runaway fault at a point in time after the automated test is completed.
此外,另外一种自动化测试系统提出了日志的数据库管理方法,虽然日志管理效率提高,但是对测试故障包括挂起跑飞故障的处理仍然在测试完成之后,仍没有提出对挂起和跑飞故障的快速处理方法。In addition, another automated test system proposes a database management method for logs. Although the efficiency of log management is improved, the processing of test failures including suspension of runaway faults is still not solved after suspending and running faults after the test is completed. Fast processing method.
可见,目前的自动化测试系统和方法在被测设备这类挂起和跑飞故障的快速处理方面,并没有提出相关的解决方案。It can be seen that the current automated test systems and methods do not propose related solutions in the rapid processing of suspension and runaway faults of the device under test.
发明内容Summary of the invention
本发明实施例要解决的技术问题是提供一种被测设备挂起跑飞故障的检测方法、装置及系统,能够检查并快速处理被测设备的挂起和跑飞故障。 The technical problem to be solved by the embodiments of the present invention is to provide a method, a device and a system for detecting a running failure of a device under test, which can check and quickly process the suspension and runaway faults of the device under test.
为了解决上述技术问题,本发明实施例采用如下技术方案:In order to solve the above technical problem, the embodiment of the present invention adopts the following technical solutions:
依据本发明实施例的一个方面,提供了一种被测设备挂起跑飞故障的检测方法,包括:获取为被测设备配置的测试计划和测试资源;解析所述测试计划获取测试时间、待测试产品及待测试脚本;当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。According to an aspect of the embodiments of the present invention, a method for detecting a running failure of a device under test includes: obtaining a test plan and a test resource configured for the device under test; and parsing the test plan to obtain a test time and to be tested The product and the script to be tested; when the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
其中,当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果的步骤包括:根据获取的所述待测试产品加载多个相应的待测试脚本;根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接所述可用的被测设备;在所述可用的被测设备上执行一所述待测试脚本;当任一所述待测试脚本完成测试后,生成测试运行日志,并通过被测设备对所述待测试产品进行挂起跑飞故障检测,生成挂起跑飞故障日志。When the current time reaches the obtained test time, the step of suspending the running fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the step of obtaining the detection result includes: loading the product to be tested according to the acquired product. a corresponding test script to be tested; deploying the product to be tested according to the test resource to the configured plurality of devices under test, and acquiring an available device under test, and connecting the available device under test; Performing a test script to be tested on the test device; after any test to be tested completes the test, generating a test run log, and performing a pending runaway fault detection on the product to be tested by the device under test, generating a hang-up run Fault log.
其中,生成挂起跑飞故障日志后还包括:启动套接字(socket)服务;当存在挂起跑飞故障时,通过socket服务向故障责任人发送故障检测邮件。The generating the hang-up flight fault log further includes: starting a socket service; when there is a hang-up flight failure, sending a fault detection email to the fault owner through the socket service.
其中,当存在挂起跑飞故障时,通过socket服务向故障责任人发送故障检测邮件的步骤包括:从所述挂起跑飞故障日志中获取故障信息的关键字段,并根据所述关键字段匹配相应故障责任人的邮箱地址;通过socket服务向故障责任人发送故障检测邮件。The step of sending a fault detection email to the fault owner through the socket service when there is a pending runaway fault includes: obtaining a key segment of the fault information from the suspended runaway fault log, and matching according to the key segment The email address of the corresponding fault owner; the fault detection email is sent to the fault owner through the socket service.
其中,当存在挂起跑飞故障时,通过socket服务向故障责任人发送故障检测邮件的步骤之后还包括:保留发生挂起跑飞故障时,所述被测设备的运行环境,并将所述被测设备从所述测试资源中删除;从所述测试资源中获取另一个可用的被测设备,并连接所述被测设备;在获取的另一个可用被测设备上执行所述待测试脚本;当任一所述待测试脚本完成测试后,通过获取的另一个可用被测设备对所述待测试产品进行挂起跑飞故障检测。After the step of sending the fault detection mail to the fault owner through the socket service, the method further includes: retaining the operating environment of the device under test when the pending runaway fault occurs, and the measured device is tested. The device is deleted from the test resource; another available device under test is obtained from the test resource, and the device under test is connected; the script to be tested is executed on another available device under test; After any of the to-be-tested scripts completes the test, the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
其中,获取挂起跑飞故障检测结果后还包括:当不存在挂起跑飞故障时,在所述被测设备上执行另一个待测试脚本;当所述待测试脚本完成测试后,通过被测设备对所述待测试产品进行挂起跑飞故障检测。The obtaining the pending runaway fault detection result further includes: when there is no pending runaway fault, executing another script to be tested on the device under test; and after the test to be tested completes the test, passing the device under test Suspending and running fault detection of the product to be tested.
依据本发明实施例的另一个方面,还提供了一种被测设备挂起跑飞故障的检测装置,包括:获取模块,设置为获取为被测设备配置的测试计划和测试资源;解析模块,设置为解析所述测试计划获取测试时间、待测试产品及待测试脚本;故障检测模块, 设置为当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。According to another aspect of the embodiments of the present invention, there is also provided a detecting device for suspending a running fault of a device under test, comprising: an obtaining module configured to acquire a test plan and a test resource configured for the device under test; and an analysis module, setting Obtaining test time, products to be tested, and scripts to be tested for parsing the test plan; fault detection module, When the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
其中,所述故障检测模块包括:加载单元,设置为根据获取的所述待测试产品加载多个相应的待测试脚本;连接单元,设置为根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接所述可用的被测设备;执行单元,设置为在所述可用的被测设备上执行一所述待测试脚本;获取单元,设置为当任一所述待测试脚本完成测试后,生成测试运行日志,并通过被测设备对所述待测试产品进行挂起跑飞故障检测,生成挂起跑飞故障日志。The fault detection module includes: a loading unit, configured to load a plurality of corresponding scripts to be tested according to the obtained product to be tested; and the connection unit is configured to deploy the product to be tested to the configured multiple according to the test resource. On the device, and obtain an available device under test, and connect the available device under test; an execution unit, configured to execute a script to be tested on the available device under test; After the test is completed, the test run log is generated, and the test device is hanged and the runaway fault detection is performed by the device under test, and the hanged runaway fault log is generated.
其中,所述故障检测模块还包括:启动单元,设置为启动socket服务;邮件发送单元,设置为当存在挂起跑飞故障时,通过socket服务向故障责任人发送故障检测邮件。The fault detection module further includes: a startup unit configured to start a socket service; and a mail sending unit configured to send a fault detection email to the fault owner through the socket service when there is a pending runaway fault.
其中,所述邮件发送单元设置为:从所述挂起跑飞故障日志中获取故障信息的关键字段,并根据所述关键字段匹配相应故障责任人的邮箱地址;通过socket服务向故障责任人发送故障检测邮件。The mail sending unit is configured to: obtain a key segment of the fault information from the suspended runaway fault log, and match the email address of the corresponding fault owner according to the key segment; and the fault responsible person through the socket service Send a fault detection email.
其中,所述故障检测模块还包括:第一处理单元,设置为:保留发生所述挂起跑飞故障时,所述被测设备的运行环境,并将所述被测设备从所述测试资源中删除;从所述测试资源中获取另一个可用的被测设备,并连接所述被测设备;在获取的另一个可用被测设备上执行所述待测试脚本;当任一所述待测试脚本完成测试后,通过获取的另一个可用被测设备对所述待测试产品进行挂起跑飞故障检测。The fault detection module further includes: a first processing unit, configured to: retain an operating environment of the device under test when the suspended runaway fault occurs, and use the device under test from the test resource Deleting; obtaining another available device under test from the test resource, and connecting the device under test; executing the to-be-tested script on another available device under test; when any of the to-be-tested scripts After the test is completed, the product to be tested is tested for suspension runaway fault by another available device under test.
其中,所述故障检测模块还包括:第二处理单元,设置为:当不存在挂起跑飞故障时,在所述被测设备上执行另一个待测试脚本;当所述待测试脚本完成测试后,通过被测设备对所述待测试产品进行挂起跑飞故障检测。The fault detection module further includes: a second processing unit, configured to: execute another script to be tested on the device under test when there is no pending runaway fault; and when the script to be tested completes the test The hang-up flight fault detection is performed on the product to be tested by the device under test.
依据本发明实施例的另一个方面,还提供了一种被测设备挂起跑飞故障的检测系统,包括多个待测试产品、多个被检测设备,还包括上述所述的被测设备挂起跑飞故障的检测装置。According to another aspect of the embodiments of the present invention, there is also provided a detection system for a test device to suspend a runaway fault, comprising a plurality of products to be tested, a plurality of devices to be tested, and the device to be tested hangs and runs as described above. Flying fault detection device.
本发明实施例的有益效果是:本发明实施例的被测设备挂起跑飞故障的检测方法,首先获取为被测设备配置的测试计划和测试资源;接着,解析该测试计划,从中获取测试时间、待测试产品及待测试脚本;最后,当到达预设的测试时间后,根据待测试产品、待测试脚本及测试资源进行挂起跑飞故障,获取检测结果。 The beneficial effects of the embodiment of the present invention are: the detecting device of the device under test in the embodiment of the present invention suspends the detection method of the running fault, firstly obtaining the test plan and the test resource configured for the device under test; and then parsing the test plan and obtaining the test time therefrom The product to be tested and the script to be tested; finally, after the preset test time is reached, the running fault is suspended according to the product to be tested, the script to be tested and the test resource, and the test result is obtained.
与相关技术相比,本发明实施例的被测设备挂起跑飞故障的检测方法,由于具有测试运行中的挂起跑飞检查功能,能够提前发现被测设备的挂起跑飞故障,而不是仅仅依据脚本返回值生成测试成功和失败的结果并在测试完成后依据日志人工查看,且能够实时监控测试脚本所测试的被测设备是否产生挂起跑飞故障。在获取检测结果后及时输出,达到了快速通告快速处理挂起跑飞故障的效果,大大提前了故障定位和解决时间点,提高了自动化测试效率,加快了产品故障收敛速度,为产品及时发布提供了更好的保障。Compared with the related art, the detecting device of the device under test in the embodiment of the present invention suspends the running fault detection method, and has the pending running check function in the test operation, and can find the suspended running fault of the tested device in advance, instead of merely relying on The script return value generates the result of the test success and failure and is manually viewed according to the log after the test is completed, and can monitor in real time whether the tested device tested by the test script generates a pending runaway fault. After obtaining the detection result, the output is timely, which achieves the effect of quickly notifying the fast-running and escaping flight failure, greatly delaying the fault location and solving the time point, improving the automation test efficiency, accelerating the product failure convergence speed, and providing timely release of the product. Better protection.
附图说明DRAWINGS
图1表示本发明实施例的被测设备挂起跑飞故障的检测方法流程示意图;1 is a flow chart showing a method for detecting a running failure of a device under test according to an embodiment of the present invention;
图2表示本发明实施例的被测设备挂起跑飞故障的检测装置结构示意图;2 is a schematic structural diagram of a device for detecting a running failure of a device under test according to an embodiment of the present invention;
图3表示故障检测模块的结构示意图;3 is a schematic structural view of a fault detecting module;
图4表示本发明实施例的被测设备挂起跑飞故障的检测系统的应用流程示意图。FIG. 4 is a schematic diagram showing an application flow of a detection system for a running failure of a device under test according to an embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
实施例一Embodiment 1
依据本发明实施例的一个方面,提供了一种被测设备挂起跑飞故障的检测方法,首先获取为被测设备配置的测试计划和测试资源;接着,解析所述测试计划获取测试时间、待测试产品及待测试脚本;最后,当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。According to an aspect of the embodiments of the present invention, a method for detecting a running failure of a device under test is provided, first obtaining a test plan and a test resource configured for the device under test; and then parsing the test plan to obtain a test time and waiting for Testing the product and the script to be tested; finally, when the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
如图1所示,该方法包括:As shown in Figure 1, the method includes:
步骤S11、获取为被测设备配置的测试计划和测试资源。Step S11: Obtain a test plan and test resources configured for the device under test.
本发明实施例的被测设备挂起跑飞故障的检测方法,在进行测试之前,需要为被测设备配置测试计划和测试资源,其中测试计划中携带有测试时间、待测试产品及待 测试脚本,测试资源中携带有多个被测设备的使用情况。本发明实施例的方法是通过对被测设备进行检测,来实现对待测产品挂起跑飞故障的检测。The test device of the embodiment of the present invention suspends the detection method of the runaway fault. Before the test, the test plan and the test resource need to be configured for the device under test, where the test plan carries the test time, the product to be tested, and the test Test script, the test resource carries the usage of multiple devices under test. The method of the embodiment of the invention detects the hanging and running fault of the product to be tested by detecting the device under test.
步骤S13、解析所述测试计划获取测试时间、待测试产品及待测试脚本。Step S13: Parse the test plan to obtain a test time, a product to be tested, and a script to be tested.
其中,测试时间为设定的自动化测试的启动时间,待测试产品是指功能类似同时又有一定差异的产品群,此类产品可共享使用同一套通用脚本库,同时由于在功能上有一定差异,又存在一套只适用于自身产品测试的脚本库。The test time is the startup time of the set automated test. The product to be tested refers to a product group with similar functions and certain differences. Such products can share the same set of common script libraries, and at the same time, due to certain differences in functions. There is also a script library that is only suitable for testing its own products.
步骤S15、当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。Step S15: When the current time reaches the acquired test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
其中,获取的检测结果为本发明实施例的被测设备挂起跑飞故障的检测方法完成检测之后的总体结果展示,用于通告本次检测的整体测试情况。具体地,输出的检测结果包括每一个被测设备在通过多个脚本对待测试产品进行检测时,所发生的故障情况,即从输出的该检测结果中可以清晰的了解每一个被测设备在哪一个脚本测试后,发生了哪些故障。The obtained detection result is an overall result display after the detection method of the hang-up failure detection of the device under test according to the embodiment of the present invention is completed, and is used for announcing the overall test situation of the current detection. Specifically, the output detection result includes a fault condition that occurs when each device under test detects the product to be tested by using multiple scripts, that is, from the output of the detection result, it is possible to clearly understand where each device under test is located. What happened after a script was tested.
此外,获取的测试结果还可以excel表格的形式输出,当然,可以理解的是,本发明实施例的方法中,并不限于此种输出方式。In addition, the obtained test result can also be outputted in the form of an excel table. Of course, it can be understood that the method of the embodiment of the present invention is not limited to such an output mode.
可选地,步骤S15包括:Optionally, step S15 includes:
根据获取的所述待测试产品加载多个相应的待测试脚本;Loading a plurality of corresponding scripts to be tested according to the obtained product to be tested;
根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接所述可用的被测设备;Deploying the product to be tested to the configured plurality of devices under test according to the test resource, and acquiring an available device under test, and connecting the available device under test;
在所述可用的被测设备上执行一所述待测试脚本;Performing a test script to be tested on the available device under test;
当任一所述待测试脚本完成测试后,生成测试运行日志,并通过被测设备对所述待测试产品进行挂起跑飞故障检测,生成挂起跑飞故障日志。After the test is completed, the test run log is generated, and the test device is hanged and the runaway fault detection is performed by the device under test, and the hanged runaway fault log is generated.
其中生成的挂起跑飞故障日志即可作为挂起跑飞故障检测后,获取的检测结果。通过挂起跑飞故障日志,可以清楚的了解发生挂起跑飞故障的具体情况,进而有助于后续故障的排除。 The generated hang-up flight fault log can be used as the detection result obtained after the hang-up flight fault detection. By suspending the running fault log, you can clearly understand the specific situation of the pending runaway fault, and thus help to eliminate the subsequent faults.
本发明实施例的被测设备挂起跑飞故障的检测方法中,可通过配置待测试产品选择相应的待测试脚本进行测试,其中,待测试脚本提供需要被加载脚本的存放路径,且对于待测试脚本,也可进行相应的新增、删除和修改等操作。In the method for detecting a running fault of the device under test according to the embodiment of the present invention, the test to be tested may be selected by selecting a corresponding test script to be tested, wherein the test script provides a storage path that needs to be loaded, and is to be tested. Scripts can also be added, deleted, and modified.
可选地,获取挂起跑飞故障检测结果后还包括:Optionally, after obtaining the suspended running fault detection result, the method further includes:
启动socket服务;Start the socket service;
当存在挂起跑飞故障时,通过socket服务向故障责任人发送故障检测邮件。When there is a pending runaway failure, the fault detection mail is sent to the fault owner through the socket service.
本发明实施例的被测设备挂起跑飞故障的检测方法中,当检测到存在挂起跑飞故障时,通过开启的socket服务向故障责任人发送故障检测邮件。其中,socket服务包括服务端socket和客户端socket,且在启动socket时定义了socket请求回调函数,该函数在收到socket请求后被调用,执行发送邮件功能。该socket服务开启后,会等待包含挂起跑飞故障和故障责任人邮箱地址信息的socket请求,而且该socket服务只需启动一次,就可同时为多个故障检测过程进行服务。In the method for detecting a runaway fault of the device under test according to the embodiment of the present invention, when it is detected that there is a pending runaway fault, the fault detection email is sent to the fault owner through the opened socket service. The socket service includes a server socket and a client socket, and defines a socket request callback function when the socket is started. The function is called after receiving the socket request, and performs a mail sending function. After the socket service is started, it will wait for a socket request including the information of the hang-up flight failure and the fault owner's email address, and the socket service only needs to be started once to serve multiple fault detection processes at the same time.
可选地,当存在挂起跑飞故障时,通过socket服务向故障责任人发送故障检测邮件的步骤包括:Optionally, when there is a pending runaway fault, the step of sending the fault detection email to the fault owner through the socket service includes:
从所述挂起跑飞故障日志中获取故障信息的关键字段,并根据所述关键字段匹配相应故障责任人的邮箱地址;Obtaining a key field of the fault information from the suspended runaway fault log, and matching the email address of the corresponding fault owner according to the key segment;
通过套接字socket服务向故障责任人发送故障检测邮件。The fault detection mail is sent to the fault owner through the socket socket service.
由此可知,本发明实施例的被测设备挂起跑飞故障的检测方法中,在每一个脚本测试完成后,会进行挂起跑飞故障检测,且最后生成了脚本测试的完整日记记录和挂起跑飞故障所产生的特殊日志记录,将挂起跑飞故障和其他测试故障区分开,能够更加清晰的了解挂起跑飞故障的发生,并及时做出处理。Therefore, in the detecting method for the running fault of the device under test according to the embodiment of the present invention, after each script test is completed, the hanging and running fault detection is performed, and finally the complete diary record and the pending running of the script test are generated. The special log records generated by the flight faults distinguish the pending runaway faults from other test faults, which enables a clearer understanding of the occurrence of the pending runaway faults and timely processing.
其中,在发送故障检测邮件过程中,获取故障信息的关键字段后,可从故障负责人数据库中查询到相匹配的故障责任人的邮箱地址。接着,将挂起跑飞故障信息和故障责任人邮箱地址组织好后,将相关信息由客户端socket发送至服务端socket;服务端socket接收到客户端socket请求后,调用回调函数,回调函数在服务端通过简单邮件传输协议(SMTP)服务将故障信息发送至故障责任人邮箱地址,而相应的故障责任人登录邮箱地址即可接收到相应的挂起跑飞故障检测邮件,进而及时对故障进行处理。 In the process of sending the fault detection email, after obtaining the key segment of the fault information, the email address of the matching fault owner may be queried from the database of the fault owner. Then, after the suspension flight failure information and the fault responsible person email address are organized, the related information is sent from the client socket to the server socket; after receiving the client socket request, the server socket calls the callback function, and the callback function is in the service. The terminal sends the fault information to the fault responsible person's email address through the Simple Mail Transfer Protocol (SMTP) service, and the corresponding fault owner logs in to the email address to receive the corresponding pending runaway fault detection email, and then processes the fault in time.
可选地,当存在挂起跑飞故障时,通过套接字socket服务向故障责任人发送故障检测邮件的步骤之后还包括:Optionally, when there is a pending runaway fault, the step of sending the fault detection email to the fault owner through the socket socket service further includes:
保留发生挂起跑飞故障时,所述被测设备的运行环境,并将所述被测设备从所述测试资源中删除;Retaining an operating environment of the device under test when a pending runaway failure occurs, and deleting the device under test from the test resource;
从所述测试资源中获取另一个可用的被测设备,并连接所述被测设备;Obtaining another available device under test from the test resource, and connecting the device under test;
在获取的另一个可用被测设备上执行所述待测试脚本;Executing the to-be-tested script on another available device under test;
当任一所述待测试脚本完成测试后,通过获取的另一个可用被测设备对所述待测试产品进行挂起跑飞故障检测。After any of the to-be-tested scripts completes the test, the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
由于挂起跑飞故障是自动化测试中优先级较高的故障,所以若出现此类故障,在故障检测邮件发送完成之后,本发明实施例的被测设备的挂起跑飞故障检测方法中,需要保留被测设备发生故障时的运行环境,便于故障责任人连接设备定位故障。此外,还需要将发生故障的被测设备从测试资源中删除,便于对下一个可用的被测设备进行检测。Since the hang-up flight fault is a higher-priority fault in the automatic test, if such a fault occurs, after the fault detection mail is sent, the hang-up flight fault detection method of the device under test according to the embodiment of the present invention needs to be retained. The operating environment when the device under test fails, which is convenient for the fault owner to connect to the device to locate the fault. In addition, it is necessary to remove the faulty device under test from the test resources, so as to facilitate the detection of the next available device under test.
可选地,获取挂起跑飞故障检测结果后还包括:Optionally, after obtaining the suspended running fault detection result, the method further includes:
当不存在挂起跑飞故障时,在所述被测设备上执行另一个待测试脚本;When there is no pending runaway fault, another script to be tested is executed on the device under test;
当所述待测试脚本完成测试后,通过被测设备对所述待测试产品进行挂起跑飞故障检测。After the test to be tested completes the test, the test device is suspended for running fault detection by the device under test.
由于每一类型的待测试产品对应多个待测试脚本,所以若某个待测试脚本测试完成后,被测设备并未发生挂起跑飞故障,则需要继续对下一个待测试脚本进行测试,直到被测设备发生挂起跑飞故障时,停止对后续待测试脚本的测试,保留发生故障时,被测设备的运行环境。Since each type of product to be tested corresponds to multiple scripts to be tested, if a test to be tested does not have a pending runaway failure after the test is completed, the next test to be tested needs to be continued until When the device under test has a pending runaway failure, the test of the subsequent test script is stopped, and the operating environment of the device under test is retained when the fault occurs.
实施例二Embodiment 2
依据本发明实施例的另一方面,还提供了一种被测设备挂起跑飞故障的检测装置,如图2所示,该装置200包括:According to another aspect of the embodiments of the present invention, there is also provided a detecting device for suspending a running fault of a device under test. As shown in FIG. 2, the device 200 includes:
获取模块201,设置为获取为被测设备配置的测试计划和测试资源; The obtaining module 201 is configured to obtain a test plan and a test resource configured for the device under test;
解析模块203,设置为解析所述测试计划获取测试时间、待测试产品及待测试脚本;The parsing module 203 is configured to parse the test plan to obtain a test time, a product to be tested, and a script to be tested;
故障检测模块205,设置为当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。The fault detection module 205 is configured to perform a pending runoff fault detection according to the to-be-tested product, the to-be-tested script, and the test resource when the current time reaches the acquired test time, and obtain the detection result.
可选地,如图3所示,所述故障检测模块205包括:Optionally, as shown in FIG. 3, the fault detection module 205 includes:
加载单元2051,设置为根据获取的所述待测试产品加载多个相应的待测试脚本;The loading unit 2051 is configured to load a plurality of corresponding scripts to be tested according to the obtained product to be tested;
连接单元2052,设置为根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接所述可用的被测设备;The connecting unit 2052 is configured to deploy the product to be tested to the configured plurality of devices under test according to the test resource, and obtain an available device under test, and connect the available device under test;
执行单元2053,设置为在所述可用的被测设备上执行一所述待测试脚本;The executing unit 2053 is configured to execute a script to be tested on the available device under test;
获取单元2054,设置为当任一所述待测试脚本完成测试后,生成测试运行日志,并通过被测设备对所述待测试产品进行挂起跑飞故障检测,生成挂起跑飞故障日志。The obtaining unit 2054 is configured to generate a test running log after the test of the script to be tested is completed, and perform a pending runaway fault detection on the to-be-tested product by the device under test to generate a suspended running fault log.
可选地,如图3所示,所述故障检测模块205还包括:Optionally, as shown in FIG. 3, the fault detection module 205 further includes:
启动单元2057,设置为启动套接字socket服务;The booting unit 2057 is configured to start a socket socket service;
邮件发送单元2058,设置为当存在挂起跑飞故障时,通过套接字socket服务向故障责任人发送故障检测邮件。The mail sending unit 2058 is configured to send a fault detection mail to the fault owner through the socket socket service when there is a pending runaway fault.
可选地,所述邮件发送单元2058进一步设置为:Optionally, the mail sending unit 2058 is further configured to:
从所述挂起跑飞故障日志中获取故障信息的关键字段,并根据所述关键字段匹配相应故障责任人的邮箱地址;Obtaining a key field of the fault information from the suspended runaway fault log, and matching the email address of the corresponding fault owner according to the key segment;
通过套接字socket服务向故障责任人发送故障检测邮件。The fault detection mail is sent to the fault owner through the socket socket service.
可选地,如图3所示,所述故障检测模块205还包括:Optionally, as shown in FIG. 3, the fault detection module 205 further includes:
第一处理单元2059,设置为:The first processing unit 2059 is configured to:
保留发生所述挂起跑飞故障时,所述被测设备的运行环境,并将所述被测设备从所述测试资源中删除;Retaining an operating environment of the device under test when the suspended runaway fault occurs, and deleting the device under test from the test resource;
从所述测试资源中获取另一个可用的被测设备,并连接所述被测设备; Obtaining another available device under test from the test resource, and connecting the device under test;
在获取的另一个可用被测设备上执行所述待测试脚本;Executing the to-be-tested script on another available device under test;
当任一所述待测试脚本完成测试后,通过获取的另一个可用被测设备对所述待测试产品进行挂起跑飞故障检测。After any of the to-be-tested scripts completes the test, the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
可选地,如图3所示,所述故障检测模块205还包括:Optionally, as shown in FIG. 3, the fault detection module 205 further includes:
第二处理单元2056,设置为:The second processing unit 2056 is configured to:
当不存在挂起跑飞故障时,在所述被测设备上执行另一个待测试脚本;When there is no pending runaway fault, another script to be tested is executed on the device under test;
当所述待测试脚本完成测试后,通过被测设备对所述待测试产品进行挂起跑飞故障检测。After the test to be tested completes the test, the test device is suspended for running fault detection by the device under test.
实施例三Embodiment 3
依据本发明实施例的另一个方面,还提供了一种被测设备挂起跑飞故障的检测系统,包括多个待测试产品、多个被检测设备,还包括上述所述的被测设备挂起跑飞故障的检测装置。According to another aspect of the embodiments of the present invention, there is also provided a detection system for a test device to suspend a runaway fault, comprising a plurality of products to be tested, a plurality of devices to be tested, and the device to be tested hangs and runs as described above. Flying fault detection device.
当应用该被测设备挂起跑飞故障的检测系统,进行挂起跑飞故障检测时,在多个被测设备上均配置同一类型或同一种待测试产品,即使用多线程并发测试多个被测设备,并可在多个被测设备上同时加载运行脚本。When the device under test is used to suspend the detection system of the runaway fault, and the fault detection of the suspension runaway is performed, the same type or the same product to be tested is configured on multiple devices to be tested, that is, multiple threads are used for concurrent test. Device and load scripts on multiple devices under test.
可选地,如图4所示,为被测设备配置测试计划和测试资源,解析测试计划,获取测试时间、待测试产品及待测试脚本。进而判断当前时间是否为获取的测试时间,若否,则继续等待;若是,则加载多个待测试脚本的存放路径。脚本加载完成之后,根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接该可用的被测设备。连接完成后,执行多个待测试脚本中的一个脚本,接着判断该脚本是否执行完成,若否,则等待该脚本执行完成;若是,则进行挂起跑飞检测。Optionally, as shown in FIG. 4, the test plan and test resources are configured for the device under test, the test plan is parsed, the test time, the product to be tested, and the script to be tested are obtained. Further, it is determined whether the current time is the acquired test time. If not, the process continues; if yes, the storage path of the plurality of scripts to be tested is loaded. After the script is loaded, the product to be tested is deployed to the configured multiple devices under test according to the test resource, and an available device under test is obtained, and the available device under test is connected. After the connection is completed, one of the plurality of scripts to be tested is executed, and then it is judged whether the execution of the script is completed. If not, the execution of the script is waited for; if yes, the suspension run detection is performed.
若存在挂起跑飞故障,则生成挂起跑飞故障日志,然后启动socket服务,并从故障日志中获取故障信息的关键字段,并匹配相应的故障责任人邮箱地址,向故障责任人发送故障检测邮件,接着保留发生挂起跑飞故障的被测设备的运行环境,并将其从测试资源中出去,最后获取下一个可用的被测设备继续进行测试。If there is a pending runaway fault, a pending runaway fault log is generated, and then the socket service is started, and the key segment of the fault information is obtained from the fault log, and the corresponding fault responsible person email address is matched, and the fault detection is sent to the fault owner. The mail, then retains the operating environment of the device under test that has a pending runaway failure, and goes out of the test resource, and finally obtains the next available device under test to continue testing.
若并未发生挂起跑飞故障,则在该被测设备上执行下一个待测试脚本,当无可用被测设备或者所有脚本完成测试之后,可将最终获取的检测结果输出。 If the hang-up flight failure does not occur, execute the next test script on the device under test. After no test device is available or all the scripts are tested, the final test result can be output.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. Within the scope of protection of the invention.
工业实用性Industrial applicability
如上所述,通过上述实施例及优选实施方式,由于具有测试运行中的挂起跑飞检查功能,能够提前发现被测设备的挂起跑飞故障,而不是仅仅依据脚本返回值生成测试成功和失败的结果并在测试完成后依据日志人工查看,且能够实时监控测试脚本所测试的被测设备是否产生挂起跑飞故障。在获取检测结果后及时输出,达到了快速通告快速处理挂起跑飞故障的效果,大大提前了故障定位和解决时间点,提高了自动化测试效率,加快了产品故障收敛速度,为产品及时发布提供了更好的保障。 As described above, according to the above embodiment and the preferred embodiment, since the hang-up flight check function in the test operation is provided, the hang-up flight failure of the device under test can be found in advance, instead of merely generating the test success and failure according to the script return value. The result is manually viewed according to the log after the test is completed, and the device under test tested by the test script can be monitored in real time for a pending runaway failure. After obtaining the detection result, the output is timely, which achieves the effect of quickly notifying the fast-running and escaping flight failure, greatly delaying the fault location and solving the time point, improving the automation test efficiency, accelerating the product failure convergence speed, and providing timely release of the product. Better protection.

Claims (13)

  1. 一种被测设备挂起跑飞故障的检测方法,包括:A method for detecting a running failure of a device under test, comprising:
    获取为被测设备配置的测试计划和测试资源;Obtain test plans and test resources configured for the device under test;
    解析所述测试计划获取测试时间、待测试产品及待测试脚本;Parsing the test plan to obtain test time, products to be tested, and scripts to be tested;
    当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。When the current time reaches the obtained test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the detection result is obtained.
  2. 如权利要求1所述的方法,其中,当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果的步骤包括:The method of claim 1, wherein when the current time reaches the acquired test time, the hang-up flight fault detection is performed according to the product to be tested, the script to be tested, and the test resource, and the step of obtaining the detection result includes:
    根据获取的所述待测试产品加载多个相应的待测试脚本;Loading a plurality of corresponding scripts to be tested according to the obtained product to be tested;
    根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接所述可用的被测设备;Deploying the product to be tested to the configured plurality of devices under test according to the test resource, and acquiring an available device under test, and connecting the available device under test;
    在所述可用的被测设备上执行一所述待测试脚本;Performing a test script to be tested on the available device under test;
    当任一所述待测试脚本完成测试后,生成测试运行日志,并通过被测设备对所述待测试产品进行挂起跑飞故障检测,生成挂起跑飞故障日志。After the test is completed, the test run log is generated, and the test device is hanged and the runaway fault detection is performed by the device under test, and the hanged runaway fault log is generated.
  3. 如权利要求2所述的方法,其中,生成挂起跑飞故障日志后还包括:The method of claim 2, wherein the generating the pending runaway fault log further comprises:
    启动套接字socket服务;Start the socket socket service;
    当存在挂起跑飞故障时,通过套接字socket服务向故障责任人发送故障检测邮件。When there is a pending runaway failure, the fault detection mail is sent to the fault owner through the socket socket service.
  4. 如权利要求3所述的方法,其中,当存在挂起跑飞故障时,通过套接字socket服务向故障责任人发送故障检测邮件的步骤包括:The method of claim 3, wherein when there is a pending runaway fault, the step of transmitting the fault detection mail to the fault owner via the socket socket service comprises:
    从所述挂起跑飞故障日志中获取故障信息的关键字段,并根据所述关键字段匹配相应故障责任人的邮箱地址;Obtaining a key field of the fault information from the suspended runaway fault log, and matching the email address of the corresponding fault owner according to the key segment;
    通过套接字socket服务向故障责任人发送故障检测邮件。 The fault detection mail is sent to the fault owner through the socket socket service.
  5. 如权利要求3所述的方法,其中,当存在挂起跑飞故障时,通过套接字socket服务向故障责任人发送故障检测邮件的步骤之后还包括:The method of claim 3, wherein the step of transmitting the fault detection mail to the faulty person through the socket socket service after the step of suspending the runaway fault further comprises:
    保留发生挂起跑飞故障时,所述被测设备的运行环境,并将所述被测设备从所述测试资源中删除;Retaining an operating environment of the device under test when a pending runaway failure occurs, and deleting the device under test from the test resource;
    从所述测试资源中获取另一个可用的被测设备,并连接所述被测设备;Obtaining another available device under test from the test resource, and connecting the device under test;
    在获取的另一个可用被测设备上执行所述待测试脚本;Executing the to-be-tested script on another available device under test;
    当任一所述待测试脚本完成测试后,通过获取的另一个可用被测设备对所述待测试产品进行挂起跑飞故障检测。After any of the to-be-tested scripts completes the test, the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
  6. 如权利要求2所述的方法,其中,获取挂起跑飞故障检测结果后还包括:The method of claim 2, wherein the obtaining the pending runaway fault detection result further comprises:
    当不存在挂起跑飞故障时,在所述被测设备上执行另一个待测试脚本;When there is no pending runaway fault, another script to be tested is executed on the device under test;
    当所述待测试脚本完成测试后,通过被测设备对所述待测试产品进行挂起跑飞故障检测。After the test to be tested completes the test, the test device is suspended for running fault detection by the device under test.
  7. 一种被测设备挂起跑飞故障的检测装置,包括:A detecting device for suspending a running fault of a device under test, comprising:
    获取模块,设置为获取为被测设备配置的测试计划和测试资源;Obtaining a module, configured to obtain a test plan and test resources configured for the device under test;
    解析模块,设置为解析所述测试计划获取测试时间、待测试产品及待测试脚本;a parsing module configured to parse the test plan to obtain a test time, a product to be tested, and a script to be tested;
    故障检测模块,设置为当前时间到达所述获取的测试时间时,根据所述待测试产品、待测试脚本及测试资源进行挂起跑飞故障检测,获取检测结果。The fault detection module is configured to suspend the running fault detection according to the product to be tested, the script to be tested, and the test resource, and obtain the detection result when the current time reaches the obtained test time.
  8. 如权利要求7所述的装置,其中,所述故障检测模块包括:The apparatus of claim 7, wherein the fault detection module comprises:
    加载单元,设置为根据获取的所述待测试产品加载多个相应的待测试脚本;a loading unit, configured to load a plurality of corresponding test scripts according to the obtained product to be tested;
    连接单元,设置为根据测试资源将待测试产品部署至配置的多个被测设备上,且获取一可用的被测设备,并连接所述可用的被测设备;a connecting unit, configured to deploy the product to be tested according to the test resource to the configured plurality of devices under test, and obtain an available device under test, and connect the available device under test;
    执行单元,设置为在所述可用的被测设备上执行一所述待测试脚本;An execution unit, configured to execute a script to be tested on the available device under test;
    获取单元,设置为当任一所述待测试脚本完成测试后,生成测试运行日志,并通过被测设备对所述待测试产品进行挂起跑飞故障检测,生成挂起跑飞故障日志。The obtaining unit is configured to generate a test running log after the test of the script to be tested is completed, and perform a pending runaway fault detection on the product to be tested by the device under test to generate a suspended running fault log.
  9. 如权利要求8所述的装置,其中,所述故障检测模块还包括: The device of claim 8, wherein the fault detection module further comprises:
    启动单元,设置为启动套接字socket服务;The boot unit is set to start the socket socket service;
    邮件发送单元,设置为当存在挂起跑飞故障时,通过套接字socket服务向故障责任人发送故障检测邮件。The mail sending unit is configured to send a fault detection mail to the fault owner through the socket socket service when there is a pending runaway fault.
  10. 如权利要求9所述的装置,其中,所述邮件发送单元设置为:The apparatus of claim 9, wherein the mail transmitting unit is configured to:
    从所述挂起跑飞故障日志中获取故障信息的关键字段,并根据所述关键字段匹配相应故障责任人的邮箱地址;Obtaining a key field of the fault information from the suspended runaway fault log, and matching the email address of the corresponding fault owner according to the key segment;
    通过套接字socket服务向故障责任人发送故障检测邮件。The fault detection mail is sent to the fault owner through the socket socket service.
  11. 如权利要求9所述的装置,其中,所述故障检测模块还包括:The device of claim 9, wherein the fault detection module further comprises:
    第一处理单元,设置为:The first processing unit is set to:
    保留发生所述挂起跑飞故障时,所述被测设备的运行环境,并将所述被测设备从所述测试资源中删除;Retaining an operating environment of the device under test when the suspended runaway fault occurs, and deleting the device under test from the test resource;
    从所述测试资源中获取另一个可用的被测设备,并连接所述被测设备;Obtaining another available device under test from the test resource, and connecting the device under test;
    在获取的另一个可用被测设备上执行所述待测试脚本;Executing the to-be-tested script on another available device under test;
    当任一所述待测试脚本完成测试后,通过获取的另一个可用被测设备对所述待测试产品进行挂起跑飞故障检测。After any of the to-be-tested scripts completes the test, the run-to-be-tested fault detection is performed on the to-be-tested product by another available device under test.
  12. 如权利要求8所述的装置,其中,所述故障检测模块还包括:The device of claim 8, wherein the fault detection module further comprises:
    第二处理单元,设置为:The second processing unit is set to:
    当不存在挂起跑飞故障时,在所述被测设备上执行另一个待测试脚本;When there is no pending runaway fault, another script to be tested is executed on the device under test;
    当所述待测试脚本完成测试后,通过被测设备对所述待测试产品进行挂起跑飞故障检测。After the test to be tested completes the test, the test device is suspended for running fault detection by the device under test.
  13. 一种被测设备挂起跑飞故障的检测系统,包括多个待测试产品、多个被检测设备,还包括如权利要求7至12任意一项所述的被测设备挂起跑飞故障的检测装置。 A detecting system for suspending a running fault of a device under test, comprising a plurality of products to be tested, a plurality of devices to be tested, and a detecting device for suspending a running fault of the device under test according to any one of claims 7 to 12. .
PCT/CN2015/083108 2015-01-26 2015-07-01 Method, apparatus and system for detecting suspension and runaway faults of tested device WO2016119398A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510038550.7A CN105893236A (en) 2015-01-26 2015-01-26 Detection method, apparatus and system for suspend running-out fault of to-be-tested device
CN201510038550.7 2015-01-26

Publications (1)

Publication Number Publication Date
WO2016119398A1 true WO2016119398A1 (en) 2016-08-04

Family

ID=56542289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/083108 WO2016119398A1 (en) 2015-01-26 2015-07-01 Method, apparatus and system for detecting suspension and runaway faults of tested device

Country Status (2)

Country Link
CN (1) CN105893236A (en)
WO (1) WO2016119398A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174430A (en) * 2022-06-30 2022-10-11 中车青岛四方车辆研究所有限公司 Method and device for testing starting time of rail transit vehicle-mounted equipment
CN115312115A (en) * 2022-09-30 2022-11-08 芯天下技术股份有限公司 Method, device, equipment and medium for verifying suspend function of flash memory chip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101082877A (en) * 2006-05-30 2007-12-05 上海科泰世纪科技有限公司 Automatically testing interface of graphical user interface program and automatically testing method thereof
US20090024885A1 (en) * 2007-07-19 2009-01-22 Kabushiki Kaisha Toshiba Semiconductor integrated circuit and test system thereof
CN101599042A (en) * 2008-06-02 2009-12-09 松下电器产业株式会社 Program fleet detection method and equipment thereof
CN102955083A (en) * 2011-08-31 2013-03-06 北京中电华大电子设计有限责任公司 Interference resistance test method and device for power-on resetting circuit of central processing unit (CPU) chip

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120204153A1 (en) * 2011-02-04 2012-08-09 Disney Enterprises, Inc. Automated testing on multiple video game platforms
CN103092754A (en) * 2013-01-07 2013-05-08 上海斐讯数据通信技术有限公司 Automatic test method of long distance multi-device condition
CN103455416B (en) * 2013-07-18 2016-04-27 北京航空航天大学 A kind of method for testing pressure based on taking Android system intelligent device internal memory and CPU

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101082877A (en) * 2006-05-30 2007-12-05 上海科泰世纪科技有限公司 Automatically testing interface of graphical user interface program and automatically testing method thereof
US20090024885A1 (en) * 2007-07-19 2009-01-22 Kabushiki Kaisha Toshiba Semiconductor integrated circuit and test system thereof
CN101599042A (en) * 2008-06-02 2009-12-09 松下电器产业株式会社 Program fleet detection method and equipment thereof
CN102955083A (en) * 2011-08-31 2013-03-06 北京中电华大电子设计有限责任公司 Interference resistance test method and device for power-on resetting circuit of central processing unit (CPU) chip

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174430A (en) * 2022-06-30 2022-10-11 中车青岛四方车辆研究所有限公司 Method and device for testing starting time of rail transit vehicle-mounted equipment
CN115174430B (en) * 2022-06-30 2024-01-26 中车青岛四方车辆研究所有限公司 Method and device for testing starting time of track traffic vehicle-mounted equipment
CN115312115A (en) * 2022-09-30 2022-11-08 芯天下技术股份有限公司 Method, device, equipment and medium for verifying suspend function of flash memory chip
CN115312115B (en) * 2022-09-30 2022-12-13 芯天下技术股份有限公司 Method, device, equipment and medium for verifying suspend function of flash memory chip

Also Published As

Publication number Publication date
CN105893236A (en) 2016-08-24

Similar Documents

Publication Publication Date Title
US10152382B2 (en) Method and system for monitoring virtual machine cluster
CN108845954B (en) Pressure testing method, system and storage medium
JP5579650B2 (en) Apparatus and method for executing monitored process
US20150199264A1 (en) Computer program testing
WO2018095414A1 (en) Method and apparatus for detecting and recovering fault of virtual machine
CN107688502B (en) Inter-process communication method and device
US20060005085A1 (en) Platform for computer process monitoring
CN105678164B (en) Detect the method and device of Malware
US7941703B2 (en) Capturing machine state of unstable java program
WO2017016212A1 (en) Testing method and device for desktop cloud system
US11269705B2 (en) Method and apparatus for outputting information
US20070256082A1 (en) Monitoring and controlling applications executing in a computing node
CN108038039B (en) Method for recording log and micro-service system
CN105760240A (en) Distributed task processing method and device
US8938490B2 (en) System and method for accessing mainframe system automation from a process automation application
CN108399120B (en) Asynchronous message monitoring method and device
CN108108296B (en) Cloud testing method, server and client
US11055416B2 (en) Detecting vulnerabilities in applications during execution
CN110673993B (en) Fault injection method, platform and system
WO2019034095A1 (en) Software processing method and apparatus, electronic device and computer-readable storage medium
CN106790463A (en) The access method and system of Web configuration file heavy loads
WO2016119398A1 (en) Method, apparatus and system for detecting suspension and runaway faults of tested device
US9612935B2 (en) Enhanced resiliency testing by enabling state level control for request
CN110569140A (en) operation and maintenance method and device
US10795798B2 (en) Notification control method and information processing apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15879600

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15879600

Country of ref document: EP

Kind code of ref document: A1