WO2016188077A1 - 拷机测试方法及装置 - Google Patents

拷机测试方法及装置 Download PDF

Info

Publication number
WO2016188077A1
WO2016188077A1 PCT/CN2015/096148 CN2015096148W WO2016188077A1 WO 2016188077 A1 WO2016188077 A1 WO 2016188077A1 CN 2015096148 W CN2015096148 W CN 2015096148W WO 2016188077 A1 WO2016188077 A1 WO 2016188077A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
resource
task
resources
requirement
Prior art date
Application number
PCT/CN2015/096148
Other languages
English (en)
French (fr)
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 WO2016188077A1 publication Critical patent/WO2016188077A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for testing a copying machine.
  • the copying test is to check the stability and reliability of the product under extreme test conditions.
  • automated testing is often used to test the product.
  • the general method of automatic copying machine testing is: according to different copying machine requirements, the tester writes a copying machine test script, and runs a copying machine automatic script to perform a copying machine test on the device.
  • the inventor found that in the current copying machine mode, the task of the copying machine is sequential, and when the task resources that are executed earlier are not satisfied, the copying task that other resource constraints satisfy cannot be performed.
  • it is necessary to remove the copying test task whose task resource cannot be satisfied from the script, so that the subsequent copying test task can be performed.
  • the present invention provides a copying machine testing method and apparatus.
  • a copying machine testing method including: configuring a test task, wherein the test task includes: testing content, testing a demand resource, and executing a policy; determining the test task Testing whether the required resource can be satisfied by the available test resources of the current system; according to the execution policy, performing a test task that the test requirement resource can be satisfied by the available test resource.
  • the test content includes: one test operation, or multiple test operations in an ordered sequence, wherein the test operation includes one of the following: restarting the line card, port up/down, main Route switching, device restart, and Open Shortest Path First (OSPF) route flapping.
  • the test operation includes one of the following: restarting the line card, port up/down, main Route switching, device restart, and Open Shortest Path First (OSPF) route flapping.
  • OSPF Open Shortest Path First
  • configuring the test requirement resource in the test task includes: acquiring a test requirement resource of the test task; and recording a test requirement resource of the test task into a resource requirement library.
  • the execution policy includes: timing execution, or immediate execution.
  • determining whether the test requirement resource of the test task can be satisfied by the available test resources of the current system includes: acquiring multiple test tasks from the resource requirement library. Comparing the test requirement resources of each test task; comparing the test requirement resources of each test task with the available test resources of the current system, respectively, to determine whether the test requirement resources of each test task are respectively Can be described by the current system Satisfied with test resources.
  • the method further includes: marking, in the plurality of test tasks, that the test requirement resources can be currently
  • the test resource reservation status of the test task that is satisfied by the available test resources of the system is a success status.
  • performing the test task that the test requirement resource can be satisfied by the available test resource includes: traversing the test resource reservation status of the multiple test tasks; and extracting the test resource reservation status to a successful status test An execution policy corresponding to the task; and executing, according to the execution policy, a test task in which the test resource reservation state is a successful state.
  • the test requirement resource and the available test resource include: a test device, a test instrument, a connection relationship between the test device, and a connection relationship between the test device and the test instrument.
  • the method further includes: sending the execution result of the test task to the server.
  • a copying machine testing apparatus comprising: a configuration module configured to configure a test task, wherein the test task comprises: testing content, testing a demand resource, and executing a policy; a module, configured to determine whether the test requirement resource of the test task can be satisfied by an available test resource of a current system; and an execution module configured to perform, according to the execution policy, the test requirement resource to be available by the available test resource Satisfied test tasks.
  • a configuration test task is adopted, where the test task includes: testing content, testing requirement resources, and execution strategy; determining whether the test requirement resource of the test task can be satisfied by the available test resources of the current system; The test requirement resource can be solved by the test task that can be satisfied by the available test resources, and the problem of low efficiency of the copy machine test is solved, and the efficiency of the copy machine test is improved.
  • FIG. 1 is a flow chart of a copying machine testing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a copying machine testing apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a test system according to an alternative embodiment of the present invention.
  • FIG. 4 is a flowchart showing the operation of a custom copying test module in accordance with an alternative embodiment of the present invention.
  • FIG. 5 is a flowchart showing the operation of a reservation copying test module according to an alternative embodiment of the present invention.
  • FIG. 6 is a flowchart showing the operation of a copying machine execution scheduling module according to an alternative embodiment of the present invention.
  • FIG. 7 is a flow chart showing the operation of the copying result management module in accordance with an alternative embodiment of the present invention.
  • FIG. 1 is a flowchart of a copying machine testing method according to an embodiment of the present invention. As shown in FIG. 1, the flow includes the following steps:
  • Step S102 configuring a test task, where the test task includes: testing content, testing requirement resources, and executing policies;
  • Step S104 determining whether the test requirement resource of the test task can be satisfied by the available test resources of the current system
  • Step S106 Perform a test task that the test requirement resource can be satisfied by the available test resources according to the execution policy.
  • the test task is configured, and the test requirement resources required for the test task can be judged by the available test resources of the current system, and the test tasks that can be satisfied are executed; compared with the available test resources in the related technology.
  • the method of modifying the test script needs to be solved, the problem of low efficiency of the copying machine test is solved, and the efficiency of the copying machine test is improved.
  • the test content includes: one test operation, or multiple test operations in an orderly manner, wherein the test operation includes one of the following: restarting the line card, port up/down, active/standby switchover, device restart, and OSPF route flapping. .
  • test system when configuring the test content of the test task, common test operations can be preset in the system, and the user can configure the test task by selecting and arranging combinations, so that the user does not need to manually write a script.
  • the user experience is improved, and the difficulty of the user's copying test is also reduced.
  • the test system can also provide an interface, and the user is programmed to write a test script according to the new test operation, and package the test script to implement the addition of a new test operation. After adding a new test operation, the next time you perform the copy test of the same test operation, you can call the packaged test script, thus avoiding writing the test script again.
  • the test requirement resource required for the test task may be obtained according to the input of the user; and the test requirement resource required for the test task is recorded in the resource requirement library.
  • the user input may be a test task, and the test resource required for the test task may be determined according to the name of the test operation in the test task and the test resource corresponding to the test operation preset in the system.
  • the user can directly input the test resources corresponding to the test task.
  • the execution strategy includes: timing execution, or immediate execution.
  • step S104 the test requirement resources of each of the plurality of test tasks may be obtained from the resource requirement library; and the test requirement resources of each test task are respectively The available test resources of the current system are compared to determine whether the test requirement resources of each test task can be satisfied by the available test resources of the current system.
  • available test resources are recorded in the current repository.
  • test tasks of the plurality of test tasks that can be satisfied by the available test resources of the current system may also be marked.
  • the test resource reservation status is a success status. This flag is used to identify whether the test requirement resources required for the test task can be satisfied by the available test resources of the current system, so as to facilitate the execution of subsequent test tasks.
  • the test resource reservation status of the multiple test tasks may be traversed in step S106; the execution strategy corresponding to the test task whose test resource reservation status is the successful status is extracted; and executed according to the execution policy Test the test resource reservation status to a successful test task.
  • a corresponding execution strategy can be adopted for each test task, which improves the user experience.
  • test resources include, but are not limited to, a test device, a test instrument, a connection relationship between the test devices, and a connection relationship between the test device and the test instrument.
  • the execution result of the test task may also be sent to the server.
  • the user can query the execution result of the test task by accessing the server.
  • the execution result includes: a successful execution result, a failed execution result, or a reason for failure to execute.
  • a copying machine testing device for implementing the above-mentioned embodiments and optional embodiments.
  • the descriptions of the modules involved in the device will be described below.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the apparatus includes: a configuration module 22, a judging module 24, and an executing module 26, wherein the configuration module 22 is configured to configure a test task.
  • the test task includes: testing content, testing the demand resource, and executing the policy; the determining module 24 is coupled to the configuration module 22, and configured to determine whether the test requirement resource of the test task can be satisfied by the available test resources of the current system; and the executing module 26 And coupled to the determining module 24, configured to execute a test task that the test requirement resource can be satisfied by the available test resources according to the execution policy.
  • the test content includes: one test operation, or multiple test operations in an orderly manner, wherein the test operation includes one of the following: restarting the line card, port up/down, active/standby switchover, device restart, and OSPF route flapping. .
  • the configuration module 22 is configured to: obtain a test requirement resource of the test task; and record the test requirement resource of the test task into the resource requirement library.
  • the execution strategy includes: timing execution, or immediate execution.
  • the determining module 24 is configured to: when the test task is multiple, obtain test test resources of each test task from the resource requirement library; and separately test test requirement resources of each test task The available test resources of the current system are compared to determine whether the test requirement resources of each test task can be satisfied by the available test resources of the current system.
  • the device further includes: a marking module coupled to the determining module 24, configured to mark a test resource reservation state of the test task in which the test requirement resource can be satisfied by the available test resources of the current system in a plurality of test tasks as a successful state.
  • a marking module coupled to the determining module 24, configured to mark a test resource reservation state of the test task in which the test requirement resource can be satisfied by the available test resources of the current system in a plurality of test tasks as a successful state.
  • the executing module 26 is configured to: traverse the test resource reservation state of the multiple test tasks; extract an execution policy corresponding to the test task whose test resource reservation state is the successful state; and execute the test resource reservation state to the successful state according to the execution policy. Test task.
  • the test requirement resource and the available test resources include: a test device, a test instrument, a connection relationship between the test device, and a connection relationship between the test device and the test instrument.
  • the device further includes: a sending module, coupled to the executing module 26, configured to send an execution result of the testing task to the server.
  • a sending module coupled to the executing module 26, configured to send an execution result of the testing task to the server.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • An alternative embodiment of the present invention provides a testing method and system thereof, and relates to a method and system for introducing a copying machine customization, a resource reservation, a resource priority execution scheduling strategy, and a copying machine test result management in an automated test in the communication field.
  • the automatic testing method of the copying machine provided by the alternative embodiment adopts the following four aspects: 1. Customizing the test task of the copying machine; 2, copy machine test resource reservation; 3, copy machine execution scheduling; 4, copy machine test result management.
  • the copying test can consist of several test tasks, each of which includes test content, test resource requirements, and execution strategy.
  • Custom-made testing is the customization of test content, test requirements resources, and execution strategies.
  • copy machine test content customization general copy machine test content consists of a number of copy machine operations, copy machine test content is a combination of these copy machine operations.
  • copy machine test 1 restart line card ⁇ port up / down ⁇ active / standby switching ⁇ device restart ⁇ OSPF route flapping ⁇ restart line card.
  • the copying machine test 1 indicates the copying operation performed by the copying test task.
  • copy machine test requirements resource customization copy machine test requirements resources, that is, the test resources required for this copying task, Including but not limited to: test equipment, test instruments, connection between test equipment, connection between test equipment and test instruments.
  • Customization of the execution strategy of the copy machine You can choose to execute the policy immediately (that is, execute the policy immediately) or execute the policy periodically.
  • the above-mentioned copying test content customization includes:
  • A12. Combine the copying operation and customize the internal sequence of the copying machine.
  • the atomized copying operations can appear in the copy machine execution sequence in any order and can be repeated.
  • the copying script is solved to be single and fixed.
  • the user implements the copying machine customized according to his own needs, he needs to write different copying scripts, which has a certain workload and complexity. .
  • the above-mentioned copying test requirement resource customization includes:
  • the user selects the resource characteristics required for the copy test task, and forms a resource requirement table into the resource requirement library;
  • the copying resource reservation is completed.
  • the copying task completed by the copying machine resource is a copying test task that can be executed.
  • the automated test requirements resource constraints are realized, the resources required for the copying machine in the related technology are solved, and the problem of verifying the resource constraint requirements of the copying automation in the current environment is required, and the current environment is not avoided.
  • human intervention is required, and when the resource constraints are met, the automatic testing of the copying machine can be performed.
  • the customization of the copying execution policy includes:
  • the timing execution strategy is a policy of waiting for the time set by the user to execute the copying content when the copying resource reservation of the copying test task is completed.
  • test resource constraints include: test device type, test instrument type, number of test devices, number of test instruments, and the like.
  • Test resource reservation periodically determine whether the constraint of the reserved resource is satisfied in the test environment. When the reserved resource constraint is satisfied, the resource constraint state of the current task is the completion state (equivalent to the completion of the copying resource reservation); if not, the matching of the next cycle is performed again.
  • test resource reservation includes:
  • resource-prioritized scheduling strategy when the resource constraint of a certain test task at a certain time point is preferentially satisfied, the copying test task is preferentially scheduled to be executed.
  • the execution strategy of the copy test task depends on the execution strategy customized by the test task of the test task.
  • the resource-prioritized scheduling policy includes:
  • the automatic test result of the copying machine can be automatically copied to the relevant personnel designated by the user;
  • the automatic test results, reports, and logs of the copy machine can be automatically uploaded to the server, and relevant personnel can access the server to check the detailed information of the copy machine automation.
  • the above-mentioned optional embodiment of the present invention solves the current automatic copying machine test, is not very intelligent, requires a certain amount of manpower to perform maintenance, and the automation of the whole copying process is not high, which improves the automation of testing. Degree and test efficiency.
  • FIG. 3 is a schematic structural diagram of a test system according to an alternative embodiment of the present invention. As shown in FIG. 3, the system includes: a customized copy test module and a reservation copy machine. Test module, copy machine execution scheduling module, copy machine result management module. The individual modules are described below.
  • the customized copying test module is set to customize the copying test content, customize the copying test requirement resource, and copy Machine execution strategy customization.
  • the basic operations of the copy machine test are: restarting the device, switching between the active and standby switches, restarting the line card, up/down the port, and routing the test instrument.
  • the user can independently select the order of execution of the copying test operation and the number of executions of each test operation; in the customization of the copying test requirement resource, the user can select the resources required for the copying task in the module. constraint.
  • the customization of the copy machine execution strategy the user can decide the execution strategy of the copy machine.
  • FIG. 5 is a flowchart showing the operation of the reservation copying test module according to an alternative embodiment of the present invention.
  • the reservation copying test module is set as a reservation for resources required by the copying environment, wherein the user restricts resources.
  • the information is stored in the resource requirement library, and the current actual resource information is stored in the current resource library, and the resource requirement library is periodically matched with the current resource library to complete the reservation of the resource.
  • FIG. 6 is a flowchart of the operation of the copying machine execution scheduling module according to an alternative embodiment of the present invention.
  • the copying machine execution scheduling module is set to perform scheduling control on the copying machine test task, according to each copying machine test.
  • the resource reservation in the task, priority is given to the task of completing the resource reservation.
  • FIG. 7 is a working flow chart of a copying result management module according to an alternative embodiment of the present invention. As shown in FIG. 7, the copying result management module is set to copy machine result generation, copy machine log generation, copy machine report generation, copying. Machine results copy, copy machine report upload and other functions.
  • the above-mentioned copying test task customization includes the following steps:
  • Step 1 The copy machine test operation corresponds to the copy machine package function, and each copy machine test operation corresponds to a copy machine package function;
  • Step 2 performing a custom operation of the copying test task for each task to be copied
  • Step 3 According to the encapsulation of step 1, customize the test content of each test task;
  • Step 4 Select resource constraints required for each test task
  • Step 5 Select the copy machine execution strategy required for each test task.
  • the copy machine test requirement resource reservation includes the following steps:
  • Step 1 According to the test task of the current copy machine, generate a copy test task list, each of the test task list The node is the copy test task and the resource reservation status of the test task.
  • Step 2 Extract constraint information according to the subscription information of the copy test task, where the constraint information includes a required device type, a tester type, and a port connection relationship between the device and the device, the device, and the tester; the constraint information has a resource requirement.
  • the constraint information includes a required device type, a tester type, and a port connection relationship between the device and the device, the device, and the tester; the constraint information has a resource requirement.
  • Step 3 Extract constraint information according to actual resource information in the current environment, where the constraint information includes a required device type, a tester type, and a port connection relationship between the device and the device, the device, and the tester; the constraint information has a current resource. Need to be in the library.
  • Step 4 periodically matching the current resource library according to the constraint information in the resource requirement library, and once the matching is completed, updating the copying test task list, and setting the resource reservation of the current copying test task to a completion state. Otherwise, continue with the periodic match.
  • Step 5 Maintenance of the current resource pool: periodically update the current resource pool according to the resources in the current environment.
  • the copy machine execution schedule includes the following steps:
  • Step 1 sequentially access each task node in the copy test task list to obtain the resource reservation completion status of the current test task.
  • Step 2 If the resource reservation completion status in step 1 is “not completed”, the task node is skipped and the subsequent task node is continued.
  • Step 3 If the resource reservation status in step 1 is “completed”, the copy test content of the task node and the customized manner of the copy machine execution policy are extracted.
  • Step 4 Perform the automatic copying test according to the manner in which the copying machine executes the policy customization in step 3 and the test content executed by the copying machine.
  • Step 5 After the test is completed, the copy test task list is updated, and the node corresponding to the task in the copy test task list is deleted.
  • Step 6 After the test is completed, release the resources occupied by the current test task, clear the configuration made for the copy test task, and restore the site.
  • Step 7 When the copy test task list is empty, it indicates that all the copy test tasks are completed.
  • the copy machine result management includes the following steps:
  • Step 1 After the execution of the copying test task is completed, generate the relevant copying log and upload it to the server;
  • Step 2 After the execution of the copying test task is completed, the relevant copying result is generated and uploaded to the server;
  • Step 3 Extracting the keywords in the copying machine log, and copying the result, as a basis for generating the copying machine report, generating a copying machine test report.
  • the completion of each step of the copying process will write the result into the copying machine report;
  • Step 4 automatically copy the copying machine report to the relevant personnel set by the user
  • Step 5 The relevant personnel can view the copy machine log and the copy machine result on the server.
  • the copying machine testing method and system introduces the customization of the copying machine test task, that is, the user can customize the copying machine test content, the copying machine test requirement resource, and the copying machine according to the requirements.
  • Execution strategy introduce resource reservation method at the same time, automatically complete the matching of the resource requirements of the copy test task with the actual resource environment; introduce the resource-priority copy machine execution scheduling method on the copy machine execution; introduce the copy machine result management on the copy machine result
  • the method helps the copying machine to be carried out smoothly, quickly and effectively, and increases the intelligence and accuracy of the copying machine test, thereby improving the testing quality.
  • the embodiment, the optional embodiment, or the optional embodiment of the present invention have the following beneficial effects:
  • General copying machine automation system users want to implement different copying methods, need to rewrite the copying machine automation script, need users to have an understanding of the automation script, there is a certain threshold and complexity.
  • the general copying automation system does not support the resource reservation function, and the user is required to determine whether the execution of the copying task is satisfied in the current environment.
  • the general copying automation system adopts a sequential execution strategy when executing multiple copying tasks, and cannot reasonably allocate resources.
  • the result of the copying machine is still relatively simple, so that the relevant personnel cannot systematically obtain the information of the copying machine.
  • the traditional copying method can also effectively perform the automatic testing of the copying machine.
  • the resource environment is more complicated, or the current copying test tasks are more, the original method requires more manpower to maintain and execute the automatic testing of the copying machine. .
  • the embodiment of the present invention or the optional embodiment can conveniently implement the customized copying machine test, and the scriptless customized copying machine can be easily implemented, and the user and the underlying automation script are shielded, so that the operation is further improved. Convenient and lower threshold.
  • the copy-copying test in the embodiment or the optional embodiment of the present invention solves the problem that the current resource does not satisfy the copying machine topology, and automatically waits for the release of the environment, so that the copying machine can still be executed smoothly without requiring the user to artificially To determine whether the current resource meets the copy machine execution conditions. In this way, the operation of the copying machine is more convenient and intelligent, and the human resources are liberated.
  • the function of the copying machine performs scheduling, and the copying sequence that satisfies the constraints of the copying machine resource is preferentially executed, so that the automatic testing of the copying machine is more efficient, and the resource utilization is more reasonable.
  • the management of the copying result in the embodiment or the optional embodiment of the present invention enables the relevant personnel to obtain the information of the copying machine conveniently and in time, and makes the query convenient.
  • the copying machine testing method and system thereof provided by the embodiment or the optional embodiment of the present invention are beneficial to the rapid development of the copying machine test, and have great advantages in the accuracy of testing, rational allocation of resources, and intelligence. Raise; and copy machine Dynamic system, easy to implement and easy to operate.
  • the present invention configures a test task, determines whether the test requirement resources required for the test task can be satisfied by the available test resources of the current system, and performs a test task that can be satisfied; In the case that the available test resources cannot be satisfied, the method of modifying the test script needs to be modified, the problem of low efficiency of the copying test is solved, and the efficiency of the copying test is improved.
  • a storage medium is further provided, wherein the software includes the above-mentioned software, including but not limited to: an optical disk, a floppy disk, a hard disk, an erasable memory, and the like.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Facsimiles In General (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种拷机测试方法及装置,其中,该方法包括:配置测试任务,其中,测试任务包括:测试内容、测试需求资源和执行策略(S102);判断测试任务的测试需求资源是否能被当前系统的可用测试资源满足(S104);根据执行策略,执行测试需求资源能够被可用测试资源满足的测试任务(S106)。解决了拷机测试效率低的问题,提高了拷机测试的效率。

Description

拷机测试方法及装置 技术领域
本发明涉及通信领域,具体而言,涉及一种拷机测试方法及装置。
背景技术
为了测试保证产品的质量,自动化测试在整个测试过程中发挥着重要的作用。拷机测试是检查产品在极限测试情况下的稳定性和可靠性。在通信产品测试领域,通常使用自动化测试方式对产品做拷机测试。目前自动化拷机测试一般方式为:根据不同的拷机需求,测试人员编写好拷机测试脚本,运行拷机自动化脚本对设备进行拷机测试。
发明人在研究过程中发现,目前的化拷机方式中,拷机任务执行是顺序的,当较早执行的任务资源不满足时,无法执行其他资源约束满足的拷机任务。则为了实现多个拷机测试任务,此时需要将任务资源不能够得到满足的拷机测试任务从脚本中移除,才能够进行后续的拷机测试任务。在拷机测试任务较多的情况下,存在拷机测试效率低的问题。
针对相关技术中拷机测试效率低的问题,目前尚未提出有效的解决方案。
发明内容
为了解决上述技术问题,本发明提供了一种拷机测试方法及装置。
根据本发明实施例的一个方面,提供了一种拷机测试方法,包括:配置测试任务,其中,所述测试任务包括:测试内容、测试需求资源和执行策略;判断所述测试任务的所述测试需求资源是否能被当前系统的可用测试资源满足;根据所述执行策略,执行所述测试需求资源能够被所述可用测试资源满足的测试任务。
可选地,所述测试内容包括:一个测试操作,或者有序排列的多个测试操作,其中,测试操作包括以下之一:重启线卡、端口开启(up)/未开启(down)、主备倒换、设备重启、开放式最短路径优先(Open Shortest Path First,简称为OSPF)路由震荡。
可选地,配置所述测试任务中的所述测试需求资源包括:获取所述测试任务的测试需求资源;记录所述测试任务的测试需求资源至资源需求库中。
可选地,所述执行策略包括:定时执行,或者即时执行。
可选地,在所述测试任务为多个的情况下,判断所述测试任务的所述测试需求资源是否能被当前系统的可用测试资源满足包括:从所述资源需求库获取多个测试任务中每个测试任务的测试需求资源;分别将所述每个测试任务的测试需求资源与当前系统的所述可用测试资源进行比较,以分别判断所述每个测试任务的所述测试需求资源是否能被当前系统的所述可 用测试资源满足。
可选地,在分别将所述每个测试任务的测试需求资源与当前系统的所述可用测试资源进行比较之后,所述方法还包括:标记所述多个测试任务中测试需求资源能够被当前系统的所述可用测试资源满足的测试任务的测试资源预约状态为成功状态。
可选地,执行所述测试需求资源能够被所述可用测试资源满足的测试任务包括:遍历所述多个测试任务的所述测试资源预约状态;提取所述测试资源预约状态为成功状态的测试任务对应的执行策略;根据所述执行策略,执行所述测试资源预约状态为成功状态的测试任务。
可选地,所述测试需求资源和所述可用测试资源包括:测试设备、测试仪表、测试设备之间的连接关系、测试设备与测试仪表之间的连接关系。
可选地,在执行所述测试需求资源能够被所述可用测试资源满足的测试任务之后,所述方法还包括:发送所述测试任务的执行结果至服务器。
根据本发明实施例的另一个方面,还提供了一种拷机测试装置,包括:配置模块,设置为配置测试任务,其中,所述测试任务包括:测试内容、测试需求资源和执行策略;判断模块,设置为判断所述测试任务的所述测试需求资源是否能被当前系统的可用测试资源满足;执行模块,设置为根据所述执行策略,执行所述测试需求资源能够被所述可用测试资源满足的测试任务。
通过本发明实施例,采用配置测试任务,其中,测试任务包括:测试内容、测试需求资源和执行策略;判断测试任务的测试需求资源是否能被当前系统的可用测试资源满足;根据执行策略,执行测试需求资源能够被可用测试资源满足的测试任务的方式,解决了拷机测试效率低的问题,提高了拷机测试的效率。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的拷机测试方法的流程图;
图2是根据本发明实施例的拷机测试装置的结构示意图;
图3是根据本发明可选实施例的测试系统的结构示意图;
图4是根据本发明可选实施例的定制拷机测试模块的工作流程图;
图5是根据本发明可选实施例的预约拷机测试模块的工作流程图;
图6是根据本发明可选实施例的拷机执行调度模块的工作流程图;
图7是根据本发明可选实施例的拷机结果管理模块的工作流程图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
本发明实施例提供了一种拷机测试方法,图1是根据本发明实施例的拷机测试方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,配置测试任务,其中,测试任务包括:测试内容、测试需求资源和执行策略;
步骤S104,判断测试任务的测试需求资源是否能被当前系统的可用测试资源满足;
步骤S106,根据执行策略,执行测试需求资源能够被可用测试资源满足的测试任务。
通过上述步骤,配置测试任务,对测试任务所需的测试需求资源能否被当前系统的可用测试资源满足进行判断,并执行可以满足的测试任务;相对于相关技术中在可用测试资源不能满足的情况下需要修改测试脚本的方式,解决了拷机测试效率低的问题,提高了拷机测试的效率。
可选地,测试内容包括:一个测试操作,或者有序排列的多个测试操作,其中,测试操作包括以下之一:重启线卡、端口up/down、主备倒换、设备重启、OSPF路由震荡。
可选地,在配置测试任务的测试内容时,在系统中可以预设常用的测试操作,用户可以通过选择及排列组合的方式,实现测试任务的配置,从而使得用户可以不需要手动编写脚本,提高了用户体验,也降低了用户进行拷机测试的操作难度。可选地,测试系统还可以提供一个接口,设置为用户根据新的测试操作编写测试脚本,并将测试脚本进行封装,实现新的测试操作的添加。在添加了新的测试操作之后,下一次进行相同测试操作的拷机测试时,可以对封装的测试脚本进行调用,从而避免了再次编写测试脚本。
可选地,在配置测试任务中的测试需求资源时,可以根据用户的输入,获取测试任务所需的测试需求资源;并记录测试任务所需的测试需求资源至资源需求库中。其中,用户输入的可以是测试任务,则此时可以根据测试任务中测试操作的名称以及系统中预设的与测试操作对应的测试资源,确定该测试任务所需的测试资源。此外,用户也可以直接输入与测试任务对应的测试资源。
可选地,执行策略包括:定时执行,或者即时执行。
可选地,在测试任务为多个的情况下,在步骤S104中,可以从资源需求库获取多个测试任务中每个测试任务的测试需求资源;分别将每个测试任务的测试需求资源与当前系统的可用测试资源进行比较,以分别判断每个测试任务的测试需求资源是否能被当前系统的可用测试资源满足。可选地,可用测试资源记录在当前资源库中。
可选地,在分别将每个测试任务的测试需求资源与当前系统的可用测试资源进行比较之后,还可以标记多个测试任务中测试需求资源能够被当前系统的可用测试资源满足的测试任务的测试资源预约状态为成功状态。该标记用于识别测试任务所需的测试需求资源是否能够被当前系统的可用测试资源所满足,以便于后续的测试任务的执行。
可选地,在标记了成功状态的情况下,在步骤S106中可以遍历多个测试任务的测试资源预约状态;提取测试资源预约状态为成功状态的测试任务对应的执行策略;根据执行策略,执行测试资源预约状态为成功状态的测试任务。这样可以对每个测试任务分别采取对应的执行策略,提升了用户体验。
可选地,测试资源包括但不限于:测试设备、测试仪表、测试设备之间的连接关系、测试设备与测试仪表之间的连接关系。
可选地,在步骤S106之后,还可以发送测试任务的执行结果至服务器。用户可以通过访问服务器查询测试任务的执行结果。其中,执行结果包括:执行成功的结果,执行失败的结果,或者未能执行的原因等。
在本实施例中还提供了一种拷机测试装置,用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述,下面对该装置中涉及到的模块进行说明。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图2是根据本发明实施例的拷机测试装置的结构示意图,如图2所示,该装置包括:配置模块22、判断模块24和执行模块26,其中,配置模块22,设置为配置测试任务,其中,测试任务包括:测试内容、测试需求资源和执行策略;判断模块24,耦合至配置模块22,设置为判断测试任务的测试需求资源是否能被当前系统的可用测试资源满足;执行模块26,耦合至判断模块24,设置为根据执行策略,执行测试需求资源能够被可用测试资源满足的测试任务。
可选地,测试内容包括:一个测试操作,或者有序排列的多个测试操作,其中,测试操作包括以下之一:重启线卡、端口up/down、主备倒换、设备重启、OSPF路由震荡。
可选地,配置模块22设置为:获取测试任务的测试需求资源;记录测试任务的测试需求资源至资源需求库中。
可选地,执行策略包括:定时执行,或者即时执行。
可选地,判断模块24设置为:在测试任务为多个的情况下,从资源需求库获取多个测试任务中每个测试任务的测试需求资源;分别将每个测试任务的测试需求资源与当前系统的可用测试资源进行比较,以分别判断每个测试任务的测试需求资源是否能被当前系统的可用测试资源满足。
可选地,装置还包括:标记模块,耦合至判断模块24,设置为标记多个测试任务中测试需求资源能够被当前系统的可用测试资源满足的测试任务的测试资源预约状态为成功状态。
可选地,执行模块26设置为:遍历多个测试任务的测试资源预约状态;提取测试资源预约状态为成功状态的测试任务对应的执行策略;根据执行策略,执行测试资源预约状态为成功状态的测试任务。
可选地,测试需求资源和可用测试资源包括:测试设备、测试仪表、测试设备之间的连接关系、测试设备与测试仪表之间的连接关系。
可选地,装置还包括:发送模块,耦合至执行模块26,设置为发送测试任务的执行结果至服务器。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
为了使本发明实施例的描述更加清楚,下面结合可选实施例进行描述和说明。
本发明可选实施例提供了一种测试方法及其系统,涉及一种在通信领域自动化测试中引入拷机定制、资源预约、资源优先执行调度策略、拷机测试结果管理的方法及其系统。
为了促进拷机测试的快速、有效的开展,从而提高测试质量本发明鉴于上述分析,本可选实施例提供的拷机自动化测试方法采用如下四个方面的方案:1、拷机测试任务定制;2、拷机测试资源预约;3、拷机执行调度;4、拷机测试结果管理。
1、拷机测试任务定制
拷机测试可由若干个测试任务组成,每个测试任务包括测试内容、测试资源需求、执行策略。拷机定制测试,就是对测试内容、测试需求资源、执行策略的定制。
A1、拷机测试内容定制:一般拷机测试内容由若干拷机操作组成,拷机测试内容是这些拷机操作的组合。
比如:拷机测试1:重启线卡→端口up/down→主备倒换→设备重启→OSPF路由震荡→重启线卡。
其中,“重启线卡”、“主备倒换”等就是基本的拷机操作。拷机测试1表示了本次拷机测试任务所执行的拷机操作。
A2、拷机测试需求资源的定制:拷机测试需求资源即本次拷机任务所需要的测试资源, 包括但不限于:测试设备、测试仪表、测试设备之间的连接关系、测试设备与测试仪表之间的连接关系等。
A3、拷机执行策略的定制:可以选择立即执行策略(即即时执行策略)或者定时执行策略。
可选地,上述拷机测试内容定制包括:
A11、拷机操作原子化,即将拷机操作进行封装,使每一步操作能够被调用。
A12、将拷机操作组合,定制拷机执行的内部序列。原子化的拷机操作可以以任意的顺序出现在拷机执行序列中,并且可以重复出现。
通过拷机测试操作的原子化,解决了拷机脚本是单一、固定的,当用户实现按照自己需求定制的拷机时,需要编写不同的拷机脚本,存在一定的工作量和复杂度的问题。
可选地,上述拷机测试需求资源定制包括:
A21、用户选择拷机测试任务所需预约的资源特征,形成资源需求表写入资源需求库中;
A22、当拷机测试任务所需的资源预约得到满足时,即表示拷机资源预约完成。其中,拷机资源预约完成的拷机任务是可以执行的拷机测试任务。
通过上述方式,实现了自动化的测试需求资源约束,解决了相关技术中拷机所需的资源,需要人为的验证当前环境中是否满足拷机自动化的资源约束需求的问题,避免了若当前环境不满足拷机需求,需要人为的干预,待到满足资源约束时,才能进行拷机自动化测试。
可选地,上述拷机执行策略的定制包括:
A31、立即执行策略,即当拷机测试任务的拷机资源预约完成时,立即执行拷机内容的策略;
A31、定时执行策略,即当拷机测试任务的拷机资源预约完成时,等待用户设置的时间再执行拷机内容的策略。
2、拷机测试资源预约
B1、拷机测试资源约束的描述,其中,测试资源约束包括:测试设备类型、测试仪表类型、测试设备个数、测试仪表个数等。
B2、测试资源预约:周期性的向测试环境中判断所预约的资源的约束是否满足。当所预约的资源约束满足时,则当前任务的资源约束状态为完成状态(相当于拷机资源预约完成);若不满足,则再次进行下一周期的匹配。
可选地,上述测试资源预约包括:
B21、获取当前测试环境中所有的资源信息,包括设备类型、测试仪类型、设备个数、测 试仪个数等,并将所有的信息保存在当前资源库中。
B22、根据当前拷机测试任务名称从资源需求库中获取该测试任务的资源约束,包括设备类型、测试仪类型、设备个数、测试仪个数等。
B23、周期性地根据资源需求库中的预约信息与当前资源库中的资源信息进行匹配,当满足条件时,置当前拷机任务资源预约状态为预约成功状态;若未完成,则等待下一周期的匹配。
通过上述方式,解决了当拷机测试过程中存在多个拷机任务时,对于每个拷机任务需要单独验证当前环境是否满足资源约束需求的问题。
3、拷机执行调度
为了实现任务资源优先的执行调度,采用如下方案:
C1、资源优先的调度策略,当某个时间点下的某一测试任务的资源约束优先被满足时,优先调度执行该拷机测试任务。拷机测试任务的执行策略根据该测试任务的拷机测试任务定制的执行策略而定。
可选地,资源优先的调度策略包括:
C11、遍历拷机测试任务列表中各测试任务的资源预约状态;
C12、当资源预约状态为成功时,则提取该测试任务对应的用户定制的执行策略;
C13、根据用户定制的执行策略执行该拷机测试任务。
C14、当拷机测试任务的测试时间执行完毕后,释放所占用的资源,将资源恢复至之前的状态。
通过上述的资源优先的调度策略,解决了相关技术中拷机测试任务执行是顺序的,当较早执行的测试任务的资源不满足时,无法执行其他资源约束满足的拷机测试任务的问题。
4、拷机测试结果管理
D1、当拷机测试任务执行完成后,根据拷机测试结果以及拷机自动化测试的运行日志,自动生成拷机测试报告;
D2、在用户设定了拷机相关人员的情况下,拷机自动化测试结果可以自动抄送给用户指定的相关人员;
D3、拷机自动化测试结果、报告、日志可以自动上传到服务器,相关人员可以访问该服务器查阅拷机自动化的详细信息。
通过上述方式,解决了拷机测试结果管理不够方便,结果的查看还是在本地完成,无法在线查看的问题。
可见,通过本发明的上述可选实施例,解决了目前自动化拷机测试,还不是很智能,需要投入一定的人力去执行维护,整个拷机过程自动化程度不高的问题,提升了测试的自动化程度和测试效率。
本发明可选实施例还提供了一种测试系统,图3是根据本发明可选实施例的测试系统的结构示意图,如图3所示,该系统包括:定制拷机测试模块、预约拷机测试模块、拷机执行调度模块,拷机结果管理模块。下面分别对各个模块进行说明。
图4是根据本发明可选实施例的定制拷机测试模块的工作流程图,如图4所示,定制拷机测试模块设置为拷机测试内容的定制、拷机测试需求资源的定制、拷机执行策略的定制。
拷机测试基本操作有:重启设备、主备倒换、重启线卡、端口up/down、测试仪表灌路由等。用户在该模块中,可以自主选择拷机测试操作的执行的顺序与各测试操作的执行次数;拷机测试需求资源定制中,用户可以在该模块中,选择此次拷机任务所需的资源约束。拷机执行策略的定制中,用户可以决定拷机的执行策略。
图5是根据本发明可选实施例的预约拷机测试模块的工作流程图,如图5所示,预约拷机测试模块设置为拷机环境所需资源的预约,其中,用户对于资源的约束信息存放到资源需求库中,当前实际的资源信息存储到当前资源库中,周期性地对资源需求库与当前资源库进行匹配,完成对资源的预约。
图6是根据本发明可选实施例的拷机执行调度模块的工作流程图,如图6所示,拷机执行调度模块设置为对拷机测试任务执行的调度控制,根据每个拷机测试任务中的资源预约情况,优先执行资源预约完成的任务。
图7是根据本发明可选实施例的拷机结果管理模块的工作流程图,如图7所示,拷机结果管理模块设置为拷机结果生成、拷机日志生成、拷机报告生成、拷机结果抄送、拷机报告上传等功能。
下面采用一个实例对本发明的可选实施例进行描述和说明。
在进行了拷机常用测试操作的封装后,上述拷机测试任务定制包括下列步骤:
步骤1、拷机测试操作与拷机封装函数的对应,每个拷机测试操作对应一个拷机封装函数;
步骤2、对所要进行拷机的每一个任务进行拷机测试任务定制操作;
步骤3、根据步骤1的封装,对每一个测试任务的测试内容进行定制;
步骤4、选择每一个测试任务所需要的资源约束条件;
步骤5、选择每一个测试任务所需要的拷机执行策略。
在当前资源库与资源需求库设置完毕之后,拷机测试需求资源预约包括如下步骤:
步骤1、根据当前拷机的测试任务,生成一个拷机测试任务列表,该测试任务列表的每个 节点就是拷机测试任务以及该测试任务的资源预约状态。
步骤2、根据拷机测试任务的预约信息,提取约束信息,该约束信息包括所需的设备类型、测试仪类型、以及设备与设备、设备与测试仪的端口连接关系;该约束信息存在资源需求库中。
步骤3、根据当前环境下的实际资源信息,提取约束信息,该约束信息包括所需的设备类型、测试仪类型、以及设备与设备、设备与测试仪的端口连接关系;该约束信息存在当前资源需库中。
步骤4、周期性地根据资源需求库中的约束信息与当前资源库进行匹配,一旦匹配完成,更新拷机测试任务列表,置当前拷机测试任务的资源预约为完成状态。否则,继续进行周期性的匹配。
步骤5、当前资源库的维护:周期性的根据当前环境中的资源情况,来更新当前资源库。
拷机执行调度包括如下步骤:
步骤1、依次访问拷机测试任务列表中每个任务节点,获取当前测试任务的资源预约完成状态。
步骤2、若步骤1中资源预约完成状态为“未完成”则跳过该任务节点,继续执行后续任务节点。
步骤3、若步骤1中资源预约状态为“完成”,提取该任务节点的拷机测试内容以及拷机执行策略所定制的方式。
步骤4、根据步骤3中拷机执行策略定制的方式,以及拷机执行的测试内容执行拷机自动化测试。
步骤5、测试完成后,更新拷机测试任务列表,将该拷机测试任务列表中该任务对应的节点删除。
步骤6、测试完成后,释放当前测试任务所占用的资源,清除针对本次拷机测试任务所做的配置,还原现场。
步骤7、当拷机测试任务列表为空时,表示所有拷机测试任务执行完毕。
拷机结果管理包括如下步骤:
步骤1、在拷机测试任务执行完成后,生成相关的拷机日志,上传至服务器中;
步骤2、在拷机测试任务执行完成后,生成相关的拷机结果,上传至服务器中;
步骤3、对拷机日志中关键字进行提取,以及拷机结果,作为生成拷机报告的依据,生成拷机测试报告。可选地,每一步拷机步骤的完成,都会将结果写入拷机报告中;
步骤4、将拷机报告自动抄送给用户设定好的相关人员;
步骤5、相关人员可以在服务器上查看拷机日志和拷机结果。
通过上述描述可知,在本发明可选实施例中提供的拷机测试方法和系统,引入了拷机测试任务的定制,即用户可以根据需求定制拷机测试内容、拷机测试需求资源、拷机执行策略;同时引入资源预约方法,自动完成拷机测试任务的资源需求与实际资源环境的匹配;在拷机执行上引入资源优先的拷机执行调度方法;在拷机结果上引入拷机结果管理方法,有助于拷机顺利、快速、有效的开展,增加了拷机测试的智能性、准确性,从而提高测试质量。
与相关技术比较,本发明实施例、可选实施例或者可选实施方式具有以下有益效果:
一般拷机自动化系统,用户想实现不同的拷机方式,需要重新编写拷机自动化脚本、需要用户对自动化脚本有了解,存在一定的门槛与复杂性。另外,一般拷机自动化系统不支持资源预约功能,需要用户人为去判断当前环境下是否满足拷机任务的执行。此外,一般拷机自动化系统在执行多个拷机任务运行时采用顺序执行策略,无法实现资源的合理分配。最后,拷机结果的生成还比较单一,使得相关人员无法系统的获取拷机的信息。当拷机方式比较固定和单一时,传统的拷机方法也能有效的执行拷机自动化测试。但是,当需要频繁的执行不同的拷机内容、资源环境比较复杂时,或者,当前拷机测试任务较多的情况下,原来的方法就需要投入更多的人力来维护和执行拷机自动化测试。
上述问题概括起来有四点因素:首先,通信领域拷机自动化脚本涉及的步骤可能需要频繁的变动,执行时需要频繁的编写不同的脚本;其次,拷机自动化测试对于资源的要求很高,必须满足一定条件才能进行;再次,多个拷机任务时,拷机执行的调度策略影响拷机执行的效率;最后,拷机结果的抄送不一定及时的,相关人员可能无法第一时间查看拷机信息。
对比上述问题,本发明实施例或者可选实施例的优势在于:
首先,对比相关技术提供的方法,本发明实施例或者可选实施例可以很方便的实现定制拷机测试,很容易的实现无脚本化定制拷机,屏蔽了用户与底层自动化脚本,使得运行更加方便、门槛更低。
其次,本发明实施例或者可选实施例中的预约拷机测试,解决了当前资源不满足拷机拓扑的情况下,自动等待环境的释放,使得拷机依然可以顺利执行,不需要用户人为的去确定当前资源是否满足拷机执行条件。这样,就使得拷机操作更加便捷和智能,解放了人力资源。
再次,本发明实施例或者可选实施例中拷机执行调度的功能,优先执行满足拷机资源约束条件的拷机序列,使得拷机自动化测试更加有效率,资源利用更近合理。
还有,本发明实施例或者可选实施例中对拷机结果的管理,使得相关人员能够方便、及时的得到拷机的信息,又使得查询变得方便。
综上所述,本发明实施例或者可选实施例提供的拷机测试方法及其系统,有利于拷机测试快速的开展,并且在测试的准确性、资源合理分配、智能性方面有很大提高;并且拷机自 动化系统、实现简单、易于操作。
工业实用性:通过上述描述可知,本发明配置测试任务,对测试任务所需的测试需求资源能否被当前系统的可用测试资源满足进行判断,并执行可以满足的测试任务;相对于相关技术中在可用测试资源不能满足的情况下需要修改测试脚本的方式,解决了拷机测试效率低的问题,提高了拷机测试的效率。
在另外一个实施例中,还提供了一种软件,该软件用于执行上述实施例及可选实施方式中描述的技术方案。
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件,该存储介质包括但不限于:光盘、软盘、硬盘、可擦写存储器等。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的对象在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种拷机测试方法,包括:
    配置测试任务,其中,所述测试任务包括:测试内容、测试需求资源和执行策略;
    判断所述测试任务的所述测试需求资源是否能被当前系统的可用测试资源满足;
    根据所述执行策略,执行所述测试需求资源能够被所述可用测试资源满足的测试任务。
  2. 根据权利要求1所述的方法,其中,所述测试内容包括:
    一个测试操作,或者有序排列的多个测试操作,其中,测试操作包括以下之一:重启线卡、端口开启up/未开启down、主备倒换、设备重启、开放式最短路径优先OSPF路由震荡。
  3. 根据权利要求1所述的方法,其中,配置所述测试任务中的所述测试需求资源包括:
    获取所述测试任务的测试需求资源;
    记录所述测试任务的测试需求资源至资源需求库中。
  4. 根据权利要求1所述的方法,其中,所述执行策略包括:
    定时执行,或者即时执行。
  5. 根据权利要求3所述的方法,其中,在所述测试任务为多个的情况下,判断所述测试任务的所述测试需求资源是否能被当前系统的可用测试资源满足包括:
    从所述资源需求库获取多个测试任务中每个测试任务的测试需求资源;
    分别将所述每个测试任务的测试需求资源与当前系统的所述可用测试资源进行比较,以分别判断所述每个测试任务的所述测试需求资源是否能被当前系统的所述可用测试资源满足。
  6. 根据权利要求5所述的方法,其中,在分别将所述每个测试任务的测试需求资源与当前系统的所述可用测试资源进行比较之后,所述方法还包括:
    标记所述多个测试任务中测试需求资源能够被当前系统的所述可用测试资源满足的测试任务的测试资源预约状态为成功状态。
  7. 根据权利要求6所述的方法,其中,执行所述测试需求资源能够被所述可用测试资源满足的测试任务包括:
    遍历所述多个测试任务的所述测试资源预约状态;
    提取所述测试资源预约状态为成功状态的测试任务对应的执行策略;
    根据所述执行策略,执行所述测试资源预约状态为成功状态的测试任务。
  8. 根据权利要求1所述的方法,其中,所述测试需求资源和所述可用测试资源包括:
    测试设备、测试仪表、测试设备之间的连接关系、测试设备与测试仪表之间的连接关系。
  9. 根据权利要求1至8中任一项所述的方法,其中,在执行所述测试需求资源能够被所述可用测试资源满足的测试任务之后,所述方法还包括:
    发送所述测试任务的执行结果至服务器。
  10. 一种拷机测试装置,包括:
    配置模块,设置为配置测试任务,其中,所述测试任务包括:测试内容、测试需求资源和执行策略;
    判断模块,设置为判断所述测试任务的所述测试需求资源是否能被当前系统的可用测试资源满足;
    执行模块,设置为根据所述执行策略,执行所述测试需求资源能够被所述可用测试资源满足的测试任务。
PCT/CN2015/096148 2015-05-25 2015-12-01 拷机测试方法及装置 WO2016188077A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510272195.X 2015-05-25
CN201510272195.XA CN106294037A (zh) 2015-05-25 2015-05-25 拷机测试方法及装置

Publications (1)

Publication Number Publication Date
WO2016188077A1 true WO2016188077A1 (zh) 2016-12-01

Family

ID=57392411

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/096148 WO2016188077A1 (zh) 2015-05-25 2015-12-01 拷机测试方法及装置

Country Status (2)

Country Link
CN (1) CN106294037A (zh)
WO (1) WO2016188077A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651349A (zh) * 2020-05-26 2020-09-11 泰康保险集团股份有限公司 一种测试方法和装置
CN111966601A (zh) * 2020-09-04 2020-11-20 苏州浪潮智能科技有限公司 一种基于标签的自动化测试用例执行方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845937A (zh) * 2018-06-01 2018-11-20 平安普惠企业管理有限公司 测试环境监控方法、装置、计算机设备和存储介质
CN112787887B (zh) * 2021-01-15 2022-03-25 烽火通信科技股份有限公司 一种面向分布式存储系统的自动化拷机测试方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538317A (zh) * 2003-10-24 2004-10-20 中兴通讯股份有限公司 多业务平台多种资源综合调度的方法
CN103365713A (zh) * 2012-04-01 2013-10-23 华为技术有限公司 一种资源的调度和管理方法及装置
CN103425536A (zh) * 2013-08-26 2013-12-04 中国科学院软件研究所 一种面向分布式系统性能测试的测试资源管理方法
CN103699443A (zh) * 2013-12-16 2014-04-02 北京神州绿盟信息安全科技股份有限公司 任务分发方法及扫描器

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8438570B2 (en) * 2010-07-31 2013-05-07 International Business Machines Corporation Resource allocator with knowledge-based optimization
CN101917306B (zh) * 2010-08-20 2012-08-15 北京星网锐捷网络技术有限公司 一种自动测试方法、系统及装置
CN102214139B (zh) * 2011-06-01 2013-11-27 北京航空航天大学 一种面向分布式系统的自动化测试的执行控制与调度方法
CN103034534A (zh) * 2011-09-29 2013-04-10 阿尔斯通电网公司 基于网格计算的电力系统分析并行计算方法和系统
CN103530231B (zh) * 2013-10-12 2017-02-22 北京京东尚科信息技术有限公司 一种基于业务流程控制的应用程序测试方法及系统
CN103995778B (zh) * 2014-05-29 2018-02-09 上海科梁信息工程股份有限公司 一种基于事件和动作的脚本文件生成方法及其装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538317A (zh) * 2003-10-24 2004-10-20 中兴通讯股份有限公司 多业务平台多种资源综合调度的方法
CN103365713A (zh) * 2012-04-01 2013-10-23 华为技术有限公司 一种资源的调度和管理方法及装置
CN103425536A (zh) * 2013-08-26 2013-12-04 中国科学院软件研究所 一种面向分布式系统性能测试的测试资源管理方法
CN103699443A (zh) * 2013-12-16 2014-04-02 北京神州绿盟信息安全科技股份有限公司 任务分发方法及扫描器

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651349A (zh) * 2020-05-26 2020-09-11 泰康保险集团股份有限公司 一种测试方法和装置
CN111651349B (zh) * 2020-05-26 2023-07-14 泰康保险集团股份有限公司 一种测试方法和装置
CN111966601A (zh) * 2020-09-04 2020-11-20 苏州浪潮智能科技有限公司 一种基于标签的自动化测试用例执行方法
CN111966601B (zh) * 2020-09-04 2022-09-20 苏州浪潮智能科技有限公司 一种基于标签的自动化测试用例执行方法

Also Published As

Publication number Publication date
CN106294037A (zh) 2017-01-04

Similar Documents

Publication Publication Date Title
US11307967B2 (en) Test orchestration platform
CN104541247B (zh) 用于调整云计算系统的系统和方法
Viswanathan et al. {CLARINET}:{WAN-Aware} Optimization for Analytics Queries
CN104520814B (zh) 用于配置云计算系统的系统和方法
CN107948006B (zh) 一种虚拟化网络功能的编排方法及装置
CN108280023B (zh) 任务执行方法、装置和服务器
WO2016188077A1 (zh) 拷机测试方法及装置
CN107943555A (zh) 一种云计算环境下的大数据存储和处理平台及处理方法
CN106302008A (zh) 数据更新方法和装置
US9438665B1 (en) Scheduling and tracking control plane operations for distributed storage systems
CN111125444A (zh) 大数据任务调度管理方法、装置、设备及存储介质
WO2018000678A1 (zh) 模块流程化调度方法及装置
CN110046088A (zh) 一种接口测试方法、装置及设备
CN110071855A (zh) 设备联动控制方法、装置、系统、网关及存储介质
CN111208975A (zh) 并发执行服务
CN113572780A (zh) 设备安全策略配置方法
CN107911251A (zh) 一种网络设备配置方法、装置和介质
CN110347407A (zh) 一种获取内存占用量的方法、装置、计算机设备及介质
US11108638B1 (en) Health monitoring of automatically deployed and managed network pipelines
CN109800081A (zh) 一种大数据任务的管理方法及相关设备
Poquet Simulation approach for resource management
US20170300403A1 (en) Recordation of user interface events for script generation
CN115994085A (zh) 代码覆盖率的测试处理方法、装置、设备及存储介质
WO2024032781A1 (zh) 一种算法测试方法、装置和存储介质
TWI706343B (zh) 樣本回放資料存取方法、裝置及電腦設備

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

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

Country of ref document: EP

Kind code of ref document: A1