CN107992362B - Method, device and system for automatic performance test - Google Patents
Method, device and system for automatic performance test Download PDFInfo
- Publication number
- CN107992362B CN107992362B CN201610957339.XA CN201610957339A CN107992362B CN 107992362 B CN107992362 B CN 107992362B CN 201610957339 A CN201610957339 A CN 201610957339A CN 107992362 B CN107992362 B CN 107992362B
- Authority
- CN
- China
- Prior art keywords
- task
- test
- tested
- performance test
- performance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention provides a method, a device and a system for automatic performance testing, which can avoid idle occupation of a press machine and improve the CPU utilization rate of a press machine cluster. The method comprises the following steps: adding a press machine into a resource pool, adding test tasks into a task queue, and acquiring the number of press machines required by each test task; selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested; after the performance test is finished, releasing the press, analyzing the performance test result, if the performance test result is normal, completing the task to be tested, and if the performance test result is abnormal, adding the task to be tested after the script is debugged into a task queue again to wait for execution; and monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
Description
Technical Field
The invention relates to the field of computer technology and software, in particular to a method, a device and a system for automatic performance testing.
Background
With the increasing number of internet users and the peak of access caused by various special events, the demand of network services on performance is higher and higher. Among them, the fact that various service systems can withstand instantaneous high concurrency and have high response speed is a key of user experience, and therefore, performance testing of various service systems becomes especially important. A large amount of pressing machines (namely testing resources such as physical servers, Docker and the like) are occupied in the performance testing process.
Normally, after receiving a test task, a tester will first request for a press, and if there are not enough test resources, the test task will not be executed. The specific procedures of the performance test in the prior art are roughly as follows:
as shown in fig. 1, the conventional process of manually performing performance testing generally requires the following steps. After applying for the press, the tester obtains the IP list of the press, and inputs the IP into the performance testing tool for execution during testing. These presses are released from their application until the test plan is fully completed, during which time the press is idle, which wastes testing resources and results in other projects not having enough presses.
At present, some cloud tests or automatic test platforms shared by multiple persons exist, and the press machines for testing can be distributed during test execution. In performance testing, multiple presses are typically required. When there is an abnormal execution of a certain machine, the test fails (the sent test pressure is not enough to achieve the test effect), and the failure state for a long time also causes resource waste.
In addition, more press machines are needed to serve as a resource pool during pressure generation, and a strategy for automatically and preferentially distributing the press machines is lacked at present. The presses are typically assigned in chronological order of the test task application. When the next test task to be executed cannot apply for the press, the test process is blocked, so that other test tasks cannot be executed continuously, resource waste is caused, and the utilization rate of the CPU of the press cluster is still at a low level. Particularly, when nobody is on duty at night, a plurality of timing tasks need to be subjected to performance testing, and how to effectively schedule the testing tasks to complete the testing tasks on time is the key of a task scheduling strategy.
In summary, the performance test of the prior art has the following defects:
1. the press machine is occupied for a long time in the process of manually executing the performance test, and resources are wasted; if the problem is solved by purchasing a large number of pressing machines, the cost is wasted;
2. when the automatic platform automatically executes the performance test, the situation that test errors are not easy to find and the press machine is occupied inefficiently is easily caused;
3. lack of a coordination mechanism of test tasks results in low utilization rate of CPU of the press cluster.
How to prevent the press from being idle and complete more performance test tasks under the limited press resources is the key for improving the performance test efficiency.
Disclosure of Invention
In view of this, the invention provides a method, a device and a system for automatic performance testing, which can avoid idle occupation of a press machine, improve the CPU utilization rate of a press machine cluster, reduce the time for delaying testing due to insufficient press machine, and effectively improve the performance testing execution efficiency.
To achieve the above objects, according to one aspect of the present invention, there is provided a method of automated performance testing.
The method for testing the automatic performance comprises the following steps: adding a press machine into a resource pool, adding test tasks into a task queue, and acquiring the number of press machines required by each test task; selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested; after the performance test is finished, releasing the press, analyzing the performance test result, if the performance test result is normal, completing the task to be tested, and if the performance test result is abnormal, adding the task to be tested after the script is debugged into a task queue again to wait for execution; and monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
Optionally, the method further comprises: before the performance test of the task to be tested is executed, the test script of the task to be tested is distributed to a set path of a press machine for executing the performance test of the task to be tested in an automatic distribution mode, so that the press machine can call and execute the test script.
Optionally, the method further comprises: and performing pre-test on the task to be tested before performing the performance test on the task to be tested.
Optionally, selecting a test task from the task queue as a task to be tested according to the scheduling policy further includes: on the basis of the first-come-first-serve sequence, a greedy algorithm is utilized to select a test task from a task queue as a task to be tested, so that the condition that as many presses as possible are used for executing the performance test of the task to be tested is ensured.
Optionally, selecting a test task from the task queue as the task to be tested by using a greedy algorithm further includes: if a plurality of groups of optimal schemes are obtained after the selection is finished, the scheme comprising a single test task requiring a plurality of presses is preferentially selected; and if the test task in the prior order is not selected after the selection is finished, increasing the weight of the test task before the next selection so as to be selected preferentially.
To achieve the above objects, according to another aspect of the present invention, there is provided an apparatus for automated performance testing.
The invention relates to an automatic performance testing device, which comprises: the preparation module is used for adding the press machine into the resource pool, adding the test tasks into the task queue and acquiring the number of the press machine required by each test task; the distribution execution module is used for selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from the resource pool to distribute to the task to be tested, and executing the performance test of the task to be tested; the release module is used for releasing the press machine after the performance test is finished, analyzing the performance test result, completing the task to be tested if the performance test result is normal, and adding the task to be tested after the script is debugged into a task queue again to wait for execution if the performance test result is abnormal; and the monitoring module is used for monitoring the execution condition in real time in the process of executing the performance test of the task to be tested by the allocation execution module.
Optionally, the allocation execution module is further configured to: before the performance test of the task to be tested is executed, the test script of the task to be tested is distributed to a set path of a press machine for executing the performance test of the task to be tested in an automatic distribution mode, so that the press machine can call and execute the test script.
Optionally, the allocation execution module is further configured to: and performing pre-test on the task to be tested before performing the performance test on the task to be tested.
Optionally, the allocation execution module is further configured to: on the basis of the first-come-first-serve sequence, a greedy algorithm is utilized to select a test task from a task queue as a task to be tested, so that the condition that as many presses as possible are used for executing the performance test of the task to be tested is ensured.
Optionally, the allocation execution module is further configured to: if a plurality of groups of optimal schemes are obtained after the selection is finished, the scheme comprising a single test task requiring a plurality of presses is preferentially selected; and if the test task in the prior order is not selected after the selection is finished, increasing the weight of the test task before the next selection so as to be selected preferentially.
To achieve the above objects, according to still another aspect of the present invention, there is provided a system for automated performance testing.
The invention relates to an automatic performance testing system, which comprises: a memory and a processor, wherein the memory is to store instructions; the processor is configured to perform the following actions in accordance with the instructions: adding a press machine into a resource pool, adding test tasks into a task queue, and acquiring the number of press machines required by each test task; selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested; after the performance test is finished, releasing the press, analyzing the performance test result, if the performance test result is normal, completing the task to be tested, and if the performance test result is abnormal, adding the task to be tested after the script is debugged into a task queue again to wait for execution; and monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
To achieve the above object, according to still another aspect of the present invention, there is provided an electronic apparatus.
An electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method for automated performance testing of the present invention.
To achieve the above object, according to still another aspect of the present invention, there is provided a computer-readable storage medium.
A computer readable storage medium of the present invention stores computer instructions that, when executed by a processor, implement the method of automated performance testing of the present invention.
According to the technical scheme of the invention, in the performance test process, the press machine is automatically distributed when the test task is executed, and the press machine is automatically released immediately after the test task is executed, so that the purposes of promoting the turnover efficiency of the press machine, improving the utilization rate of the press machine and indirectly improving the test efficiency can be achieved; by utilizing the characteristics of time consumption and distributed performance test execution, automatic detection mechanisms of automatic distribution of test scripts, pre-test, real-time monitoring and the like are added, so that the performance test can be ensured to be in a normal working state, the accuracy of the automatic performance test is improved, and the waste of resources of the press is reduced; the test tasks are scheduled by utilizing the scheduling strategy, so that the utilization rate of the CPU of the press cluster can be improved, and the performance test execution efficiency is effectively improved.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a prior art process for manually performing performance testing;
FIG. 2 is a schematic diagram of the main steps of a method of automated performance testing according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the main flow of a method of automated performance testing according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a press assignment to a test task in a method of automated performance testing according to an embodiment of the invention;
FIG. 5 is a schematic diagram of the main modules of an apparatus for automated performance testing according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a main part of a system for automated performance testing according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiment of the invention provides a method, a device and a system for automatic performance test, which can be used for:
1. the press machine is dynamically allocated, so that the press machine is prevented from being occupied by a test task for a long time;
2. monitoring is added before the automatic test and in the performance test, so that the normal operation of the test task is ensured;
3. when a plurality of performance tests need to be executed at the same time, screening is automatically performed, and the scheme with the highest utilization rate of the press is selected for execution.
By using the technical scheme of the embodiment of the invention to execute the performance test, the press can be effectively prevented from being idle, more performance test tasks can be completed under the limited press resources, the utilization rate of the CPU of the press cluster is improved, and the resource waste is reduced. The method is used for automatic testing, and can reduce human intervention and save labor cost.
FIG. 2 is a schematic diagram of the main steps of a method of automated performance testing according to an embodiment of the invention.
As shown in fig. 2, the method for testing automation performance of the embodiment of the present invention mainly includes the following steps:
step S21: and adding the press machine into a resource pool, adding the test tasks into a task queue, and acquiring the number of the press machines required by each test task.
Step S22: selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested.
Step S23: and releasing the press machine after the performance test is finished, analyzing the performance test result, completing the task to be tested if the performance test result is normal, and adding the task to be tested after the script is debugged into a task queue again to wait for execution if the performance test result is abnormal.
And monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
In the embodiment of the invention, a tester does not need to apply for a test press machine before executing the test, and only needs to inform the test process of how many press machines are needed, and the test process selects the corresponding number of press machines from the press machine resource pool to exclusively use the current test task when executing the test. At this point, other testing tasks can no longer apply for these presses. And after the execution of the test task is finished, the test process returns test information such as log and the like. After the press machine is ensured to have no test information left, the press machine is automatically recovered in the test process and is ready to be distributed to other test tasks.
By adopting the method, when a tester debugs the script or analyzes the test result, the press can be used by other test tasks, and the occupancy rate of the press is improved.
FIG. 3 is a schematic diagram of the main flow of a method of automated performance testing according to an embodiment of the invention. As shown in fig. 3, due to the characteristics of the performance test itself: the same test point is repeatedly executed, and a plurality of test presses are executed concurrently, so that compared with a general automatic test scheme, the embodiment of the invention also comprises the following steps of: and monitoring mechanisms such as automatic script distribution, pre-testing and real-time monitoring in performance testing before automatic testing.
The automatic script distribution implementation process comprises the following steps: before the performance test, the script is distributed under the set path of the press machine through TCP network communication. When the performance test is started, the script is called to achieve the effect of concurrence of the plurality of presses.
The pre-test implementation process is as follows: in order to ensure that the performance test script can normally run when a plurality of presses are executed simultaneously, a pretest function is required to be provided. The functions of the device comprise: and distributing scripts to a pre-test press, executing concurrent tests and monitoring whether abnormal information exists or not. The pretest is only used for functional verification, and does not occupy a large amount of resources, so that the pretest press can be shared by a plurality of tasks.
In addition, the real-time monitoring in the testing process is as follows: and in the test execution stage, the monitoring module checks whether the abnormity occurs or not, and sends warning information to a tester when the abnormity occurs. The sending mode includes but is not limited to mail, short message and instant communication message. Monitoring content includes, but is not limited to: the working state of the object to be tested, the resource occupation condition of the press machine system, the assertion in the test script and the script running condition.
Through pretesting and real-time monitoring, the problem that invalid performance tests occupy the press machine due to script abnormity or system abnormity can be prevented.
In the implementation process of the automatic performance testing method in the embodiment of the invention, in addition to the distribution of the press machine during the performance testing, how to dynamically distribute the press machine is also a core point of the invention. The dynamic allocation of the press machine refers to that a series of scheduling algorithms are adopted according to a scheduling strategy, test tasks to be executed are flexibly selected, and the press machine is allocated to the test tasks, so that the high occupancy rate of a press machine cluster is ensured. The implementation process comprises two important scripts of a monitoring press worker class and a task monitoring press class.
Fig. 4 is a schematic diagram of a press assigned to a test task in a method of automated performance testing according to an embodiment of the invention. As shown in fig. 4, the monitoring press worker is used for selecting a press for performing a test from a resource pool, and periodically checking whether a new press is free to be used; the task monitoring worker is used for selecting a task to be executed from the task queue and checking whether a new task needs to be executed in real time.
In the embodiment of the present invention, the scheduling policy is roughly as follows: and optimizing the selected execution sequence on the basis of first-come-first-obtain-first distribution of the press machine on the test task by adopting a greedy mechanism. The method specifically comprises the following steps:
1. if a plurality of tasks apply for the press machine during one-time scheduling, the tasks are selected, so that the press machines with the test tasks executed as many as possible are ensured, and the resource waste is reduced. This process may result in the previously applied test tasks not being immediately executed, but in the long-term allocation process, the total execution time is reduced and the CPU utilization of the press cluster is increased.
2. In order to avoid having a test task that is not assigned to a press for a long time, the scheduling strategy also includes a weighting mechanism, namely: if the press is not allocated due to the strategy problem when the press is scheduled for the first time, the weight of the press is increased when the press is selected for the next time so as to ensure that the press is allocated preferentially.
3. In order to avoid that test tasks requiring more presses block the distribution queue due to the high priority generated by strategy 2, in strategy 1, if there are multiple sets of optimal solutions, the solution including a single test task requiring more presses is preferentially executed as much as possible.
Wherein, the selection strategy in the strategy 1 can be converted into a 0-1 knapsack problem to solve. Namely, there are N tasks and the total number of press resource pools is V, the number of presses occupied by the ith task is Ci, and its value weight is wi. When the press is selected for the first time, W [ i ] ═ ci [ i ], and when an unassigned press is selected for the first time, W [ i ] ═ 2 × ci [ i ].
If the second dispatch is not yet assigned to a press, the blocking mechanism is initiated and no screening is performed until the task is assigned to enough presses and the test is performed. The problem of dynamic selection is converted into a solution for selecting which tasks are allocated to the press machines, so that the number of the allocated press machines does not exceed the total number V of the resource pools, and the value weight is the largest (namely, the allocated press machines are the most, and the idle press machines are the least).
The state transition equation is: and f [ i ] [ V ] ═ max { f [ i-1] [ V ], f [ i-1] [ V-c [ i ] ] + w [ i ] }, wherein f [ i ] [ V ] represents the maximum occupancy of the first i tasks for the V presses. Thereby, a most valuable press distribution scheme can be achieved. According to strategy 3, when the allocation scheme is not unique, the task with larger Ci is selected to be executed preferentially.
Because the execution time of the performance test cannot be determined, partial improvement is made on the basis of first-come-first-served FCFS. The method may not have an optimization effect in some special scenes, but the overall effect of the press cluster is obviously improved after long-time execution.
According to the method for the automatic performance test, disclosed by the embodiment of the invention, in the performance test process, the press machine is automatically distributed when the test task is executed, and the press machine is automatically released immediately after the test task is executed, so that the aims of promoting the turnover efficiency of the press machine, improving the utilization rate of the press machine and indirectly improving the test efficiency can be fulfilled; by utilizing the characteristics of time consumption and distributed performance test execution, automatic detection mechanisms of automatic distribution of test scripts, pre-test, real-time monitoring and the like are added, so that the performance test can be ensured to be in a normal working state, the accuracy of the automatic performance test is improved, and the waste of resources of the press is reduced; the test tasks are scheduled by utilizing the scheduling strategy, so that the utilization rate of the CPU of the press cluster can be improved, and the performance test execution efficiency is effectively improved.
Fig. 5 is a schematic diagram of main blocks of an apparatus for automated performance testing according to an embodiment of the present invention.
As shown in fig. 5, an apparatus 50 for automated performance testing according to an embodiment of the present invention mainly includes the following modules: a preparation module 501, an assignment execution module 502, a release module 503, and a monitoring module 504, wherein,
the preparation module 501 is configured to add a press machine into a resource pool, add test tasks into a task queue, and obtain the number of press machines required by each test task; the allocation execution module 502 is used for selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from the resource pool to allocate to the task to be tested, and executing a performance test of the task to be tested; the release module 503 is configured to release the press machine after the performance test is completed, analyze the performance test result, complete the task to be tested if the performance test result is normal, and add the task to be tested after the script is debugged to the task queue again to wait for execution if the performance test result is abnormal; the monitoring module 504 is configured to monitor an execution situation in real time during the process that the distribution executing module 502 executes the performance test of the task to be tested.
The distribution executing module 502 may further be configured to, before the performance test of the task to be tested is performed, distribute the test script of the task to be tested to a set path of a press machine that performs the performance test of the task to be tested in an automatic distribution manner, so that the press machine can call and execute the test script.
The allocation execution module 502 may also be configured to perform a pretest on the task to be tested before performing a performance test on the task to be tested. In addition, the distribution execution module 502 is further configured to select a test task from the task queue as a task to be tested by using a greedy algorithm based on the first-come-first-serve sequence, so as to ensure that as many presses as possible are used to perform a performance test on the task to be tested.
In addition, the allocation execution module 502 may be further configured to preferentially select a scheme including a single test task requiring a large number of presses if multiple groups of optimal schemes are obtained after the selection is completed; and if the test task in the prior order is not selected after the selection is finished, increasing the weight of the test task before the next selection so as to be selected preferentially.
Fig. 6 is a schematic diagram of a main part of a system for automated performance testing according to an embodiment of the present invention.
As shown in fig. 6, a system 60 for automated performance testing according to an embodiment of the present invention includes: a memory 601 and a processor 602, wherein the memory 601 is used for storing instructions; the processor 602 is configured to perform the following actions in accordance with the instructions: adding a press machine into a resource pool, adding test tasks into a task queue, and acquiring the number of press machines required by each test task; selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested; after the performance test is finished, releasing the press, analyzing the performance test result, if the performance test result is normal, completing the task to be tested, and if the performance test result is abnormal, adding the task to be tested after the script is debugged into a task queue again to wait for execution; and monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
From the above description, in the performance test process, the press machine is automatically allocated when the test task is executed, and the press machine is automatically released immediately after the test task is executed, so that the purposes of promoting the turnover efficiency of the press machine, improving the utilization rate of the press machine and indirectly improving the test efficiency can be achieved; by utilizing the characteristics of time consumption and distributed performance test execution, automatic detection mechanisms of automatic distribution of test scripts, pre-test, real-time monitoring and the like are added, so that the performance test can be ensured to be in a normal working state, the accuracy of the automatic performance test is improved, and the waste of resources of the press is reduced; the test tasks are scheduled by utilizing the scheduling strategy, so that the utilization rate of the CPU of the press cluster can be improved, and the performance test execution efficiency is effectively improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. A method of automated performance testing, comprising:
adding a press machine into a resource pool, adding test tasks into a task queue, and acquiring the number of press machines required by each test task;
selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested; selecting the test task from the task queue as the task to be tested according to the scheduling policy further comprises: on the basis of the first-come-first-serve sequence, selecting a test task from a task queue as a task to be tested by utilizing a greedy algorithm so as to ensure that as many presses as possible are used for executing the performance test of the task to be tested; selecting the test task from the task queue as the task to be tested by using a greedy algorithm further comprises: if a plurality of groups of optimal schemes are obtained after the selection is finished, the scheme comprising a single test task requiring a plurality of presses is preferentially selected; if the test task in the previous sequence is not selected after the selection is finished, the weight of the test task is increased before the next selection so as to be selected preferentially;
after the performance test is finished, releasing the press, analyzing the performance test result, if the performance test result is normal, completing the task to be tested, and if the performance test result is abnormal, adding the task to be tested after the script is debugged into a task queue again to wait for execution;
and monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
2. The method of claim 1, further comprising: before the performance test of the task to be tested is executed, the test script of the task to be tested is distributed to a set path of a press machine for executing the performance test of the task to be tested in an automatic distribution mode, so that the press machine can call and execute the test script.
3. The method of claim 1, further comprising: and performing pre-test on the task to be tested before performing the performance test on the task to be tested.
4. An automated performance testing apparatus, comprising:
the preparation module is used for adding the press machine into the resource pool, adding the test tasks into the task queue and acquiring the number of the press machine required by each test task;
the distribution execution module is used for selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from the resource pool to distribute to the task to be tested, and executing the performance test of the task to be tested; the allocation execution module is further configured to: on the basis of the first-come-first-serve sequence, selecting a test task from a task queue as a task to be tested by utilizing a greedy algorithm so as to ensure that as many presses as possible are used for executing the performance test of the task to be tested; the allocation execution module is further configured to: if a plurality of groups of optimal schemes are obtained after the selection is finished, the scheme comprising a single test task requiring a plurality of presses is preferentially selected; if the test task in the previous sequence is not selected after the selection is finished, the weight of the test task is increased before the next selection so as to be selected preferentially;
the release module is used for releasing the press machine after the performance test is finished, analyzing the performance test result, completing the task to be tested if the performance test result is normal, and adding the task to be tested after the script is debugged into a task queue again to wait for execution if the performance test result is abnormal;
and the monitoring module is used for monitoring the execution condition in real time in the process of executing the performance test of the task to be tested by the allocation execution module.
5. The apparatus of claim 4, wherein the allocation execution module is further configured to: before the performance test of the task to be tested is executed, the test script of the task to be tested is distributed to a set path of a press machine for executing the performance test of the task to be tested in an automatic distribution mode, so that the press machine can call and execute the test script.
6. The apparatus of claim 4, wherein the allocation execution module is further configured to: and performing pre-test on the task to be tested before performing the performance test on the task to be tested.
7. A system for automated performance testing, comprising: a memory and a processor, wherein,
the memory is to store instructions;
the processor is configured to perform the following actions in accordance with the instructions:
adding a press machine into a resource pool, adding test tasks into a task queue, and acquiring the number of press machines required by each test task;
selecting a test task from the task queue as a task to be tested according to a scheduling strategy, selecting a corresponding number of presses from a resource pool to distribute to the task to be tested, and executing a performance test of the task to be tested; selecting the test task from the task queue as the task to be tested according to the scheduling policy further comprises: on the basis of the first-come-first-serve sequence, selecting a test task from a task queue as a task to be tested by utilizing a greedy algorithm so as to ensure that as many presses as possible are used for executing the performance test of the task to be tested; selecting the test task from the task queue as the task to be tested by using a greedy algorithm further comprises: if a plurality of groups of optimal schemes are obtained after the selection is finished, the scheme comprising a single test task requiring a plurality of presses is preferentially selected; if the test task in the previous sequence is not selected after the selection is finished, the weight of the test task is increased before the next selection so as to be selected preferentially;
after the performance test is finished, releasing the press, analyzing the performance test result, if the performance test result is normal, completing the task to be tested, and if the performance test result is abnormal, adding the task to be tested after the script is debugged into a task queue again to wait for execution;
and monitoring the execution condition in real time in the process of executing the performance test of the task to be tested.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-3.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610957339.XA CN107992362B (en) | 2016-10-27 | 2016-10-27 | Method, device and system for automatic performance test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610957339.XA CN107992362B (en) | 2016-10-27 | 2016-10-27 | Method, device and system for automatic performance test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107992362A CN107992362A (en) | 2018-05-04 |
CN107992362B true CN107992362B (en) | 2021-05-25 |
Family
ID=62028563
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610957339.XA Active CN107992362B (en) | 2016-10-27 | 2016-10-27 | Method, device and system for automatic performance test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107992362B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109406025B (en) * | 2018-10-16 | 2020-12-15 | 武汉斗鱼网络科技有限公司 | Stress testing method, apparatus and electronic equipment |
CN109446102B (en) * | 2018-11-13 | 2022-10-25 | 郑州云海信息技术有限公司 | An event-based test script scheduling method and system |
CN110347484B (en) * | 2019-06-27 | 2024-02-02 | 上海麦克风文化传媒有限公司 | Working method for high-efficiency test in software compiling and deploying process |
CN111143210A (en) * | 2019-12-24 | 2020-05-12 | 中信银行股份有限公司 | Test task scheduling method and system |
CN111290907A (en) * | 2020-01-14 | 2020-06-16 | 深圳市网心科技有限公司 | Distributed storage network pressure measurement method and device, computer device and storage medium |
CN113806205B (en) * | 2020-06-12 | 2024-08-30 | 腾讯科技(上海)有限公司 | Software performance testing method and device, electronic equipment and readable storage medium |
CN113300900B (en) * | 2020-06-28 | 2024-10-29 | 阿里巴巴集团控股有限公司 | Cloud service testing method, device and system and container testing method and device |
CN111722917A (en) * | 2020-06-30 | 2020-09-29 | 北京来也网络科技有限公司 | Resource scheduling method, device and device for performance testing task |
CN113515435A (en) * | 2021-07-29 | 2021-10-19 | 中国电力科学研究院有限公司 | Method, system, equipment and storage medium for testing user experience under large-scale concurrency |
CN113722167B (en) * | 2021-08-30 | 2024-12-17 | 厦门亿联网络技术股份有限公司 | Method, device and system for multiplexing test resources of embedded equipment |
CN113791942B (en) * | 2021-09-22 | 2024-04-19 | 长江存储科技有限责任公司 | Method and device for automatically distributing test tasks |
CN114301805B (en) * | 2021-12-14 | 2024-04-26 | 山石网科通信技术股份有限公司 | Method and device for determining number of devices and electronic device |
CN117149591A (en) * | 2022-10-27 | 2023-12-01 | 领悦数字信息技术有限公司 | Method and system for performance testing |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012845B (en) * | 2010-12-16 | 2012-08-08 | 迈普通信技术股份有限公司 | Method for improving utilization rate of automatic testing resources |
US9087155B2 (en) * | 2013-01-15 | 2015-07-21 | International Business Machines Corporation | Automated data collection, computation and reporting of content space coverage metrics for software products |
CN103455425B (en) * | 2013-09-25 | 2016-08-17 | 中国银行股份有限公司 | A kind of distributed test system and method |
CN103631657B (en) * | 2013-11-19 | 2017-08-25 | 浪潮电子信息产业股份有限公司 | A kind of method for scheduling task based on MapReduce |
CN105446860B (en) * | 2015-11-11 | 2017-12-15 | 上海欣方智能系统有限公司 | Pressure testing system and method for testing based on asynchronism and concurrency mechanism |
CN105468490A (en) * | 2015-12-11 | 2016-04-06 | 珠海金山网络游戏科技有限公司 | Server performance automatic test method and system and device |
-
2016
- 2016-10-27 CN CN201610957339.XA patent/CN107992362B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107992362A (en) | 2018-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107992362B (en) | Method, device and system for automatic performance test | |
CN108845884B (en) | Physical resource allocation method, device, computer equipment and storage medium | |
CN112162865B (en) | Scheduling method and device of server and server | |
CA2849565C (en) | Method, apparatus, and system for scheduling processor core in multiprocessor core system | |
KR20220006490A (en) | Hybrid cloud resource allocation method for workload dynamic resource placement and optimization performance management | |
US10440136B2 (en) | Method and system for resource scheduling | |
CA2624483C (en) | A method and system for automatically testing performance of applications run in a distributed processing structure and corresponding computer program product | |
CA3168286A1 (en) | Data flow processing method and system | |
CN103369054B (en) | A kind of acquisition tasks management method and system | |
CN111182061B (en) | Task distribution processing method, system, computer device and storage medium | |
CN102096602A (en) | Task scheduling method, and system and equipment thereof | |
CN109558216B (en) | A single-root I/O virtualization optimization method and system based on online migration | |
CN102075384A (en) | Performance test system and method | |
CN112559159A (en) | Task scheduling method based on distributed deployment | |
CN110362474A (en) | A kind of distributed game test method, system, device and storage medium | |
CN112162839A (en) | Task scheduling method and device, computer equipment and storage medium | |
US11438271B2 (en) | Method, electronic device and computer program product of load balancing | |
CN102999317B (en) | Towards the elasticity multi-process service processing method of many tenants | |
CN108234189B (en) | Alarm data processing method and device | |
CN109117244B (en) | Method for implementing virtual machine resource application queuing mechanism | |
US20240202024A1 (en) | Thread processing methods, scheduling component, monitoring component, server, and storage medium | |
CN111722917A (en) | Resource scheduling method, device and device for performance testing task | |
Zhang et al. | Design and implementation of cloud-based performance testing system for web services | |
CN118312437A (en) | Determination method and device of test result, storage medium and electronic equipment | |
CN112416589A (en) | Method for timing operation peak-shifting execution of operation and maintenance platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |