Invention content
The purpose of the present invention is to provide a kind of system detection method and its devices, also can be effective in the case of big concurrent
Specific fault is tested on ground.
In order to solve the above technical problems, embodiments of the present invention disclose a kind of system detection method, by healthy and strong
Property test realize the integrated of loose coupling, the automatic injection system failure in pressure test sequence with performance pressures test, and pressing
Monitor the indices of each system in chain road in power test process in real time, this approach includes the following steps:
Config failure timed task, each failure timed task include one or more failed operations;
Pressure test task and failure timed task are associated;And
Pressure test task is executed, during executing pressure test task, Dynamic injection and pressure test task institute
Each failed operation in associated failure timed task, and monitor the indices of each system on service link in real time, it obtains
The monitoring data of corresponding failed operation period.
Embodiments of the present invention also disclose a kind of opening machine system test device, including:
Fault configuration unit, is used for config failure timed task, and each failure timed task includes one or more events
Barrier operation;
Task associative cell, for pressure test task and specific failure timed task to be associated;And
Pressure test unit, for executing pressure test task, during executing pressure test task, Dynamic injection
With each failed operation in the failure timed task associated by pressure test task, and each system on service link is monitored in real time
Indices, obtain the monitoring data of each failure period.
Compared with prior art, the main distinction and its effect are embodiment of the present invention:
By the way that robustness testing and performance pressures test are realized the integrated of loose coupling, noted automatically in pressure test sequence
Enter the system failure, and monitor the indices of each system on chain road in real time in pressure test sequence, solves big concurrent feelings
The problem of also effectively specific fault can be tested under condition.
Further, after pressure test task, by in the failure timed task associated by pressure test task
Each failed operation be associated with the monitoring data of corresponding failed operation period and business scenario, automatically generate test report
It accuses, so as to analyze the scene of the failure of system dimensions and link traffic dimension with being associated, it is accurate to improve
Degree.
Further, after automatically generating test report, to index average comparison, trend also in a manner of tendency modelling
Comparison and operating lag are analyzed, and to carry out modeling analysis in the failure for considering operating lag, it is accurate to improve
Degree.
Specific implementation mode
In the following description, in order to make the reader understand this application better, many technical details are proposed.But this
The those of ordinary skill in field is appreciated that even if without these technical details and many variations based on the following respective embodiments
And modification, each claim of the application technical solution claimed can also be realized.
To make the object, technical solutions and advantages of the present invention clearer, the implementation below in conjunction with attached drawing to the present invention
Mode is described in further detail.
In order to help to understand the present invention, now the term in some specifications is illustrated.
Business scenario typically refers to complete a process of a certain business objective.The implementation procedure of a usual business scenario
It can include the multiple calling to multiple interfaces of the multiple systems in chain road.Can include multiple operating procedures in business scenario,
Each operating procedure includes one or more page requests, and each page request can include the interface of one or more dependence systems
It calls.
Direct fault location operation is the base unit of robustness testing.One direct fault location operation generally includes following information:
Failure title, injection means (bytecode, script or other), by the system domain name of injection failure, the operating lag size of injection,
The Exception Type etc. dished out.During robustness testing, tester can carry out failure note from the granularity of system interface
Enter operation, to monitor and assess disturbance degree of the failed operation to business scenario.
Little's Law (Little's Law) being widely used in performance test is general, is mainly used for results of property
Verification, the formula of rule are as follows:
TPS=U_concurrent/ (T_response+T_think)
Wherein:
A) TPS is the handling capacity of system or business;
B) U_concurrent is the number of concurrent of pressure test;
C) T_response is the average response time of system or business;
D) T_think is average think time.
According to Little's Law, as long as keeping pressure test number of concurrent U_concurrent constant, failure can be utilized to note
Enter technology dynamically to control T_response+T_think, so that quantization system or business are under some failure delaying state
TPS performance.
First embodiment of the invention is related to a kind of system detection method.Fig. 1 is the flow signal of the system detection method
Figure.
Specifically, the system detection method passes through the collection robustness testing and performance pressures test realization loose coupling
At, the automatic injection system failure in pressure test sequence, and monitor each system on chain road in real time in pressure test sequence
Indices.As shown in Figure 1, the system detection method includes the following steps:
In step S101, config failure timed task, each failure timed task includes one or more failure behaviour
Make.
Failed operation is the basic object of robustness testing.Failed operation may include much information, such as including following
Information:Failed operation title, injection means, action type, (by injecting) system domain name, (by injecting) service class name (are injected
Interface) method name, injection delay, (dishing out) exception class name.
Such as the following information for included by an illustrative failed operation.
Failed operation title:SystemA-serviceB.methodC- injects 500ms delays,
Injection means:Bytecode injects,
Action type:Direct fault location,
System domain name:SystemA.xxx.yyy.net,
Service class name:Net.yyy.xxx.systemA.serviceB,
Method name:MethodC,
Injection delay:500ms,
Abnormal class name:java.lang.NullPointerException.
One or more failed operations are assembled into a failure timed task.For example, in the event of an entitled testTask1
Barrier timed task includes three failed operations, i.e. failed operation testAction1, testAction3, testAction4, and three
The relative time of a failed operation is 5min, 10min, 15min respectively.
The configuration process that an illustrative failure timed task is shown in Fig. 2 creates failure in fault configuration module
Operation, can create any number of failed operation as needed, then create failure timed task again, institute newly-built before
Faulty operation is added to this failure timed task, and the plan for configuring each failed operation executes the time.
Optionally, other than establishment, it can also inquire, edit or delete failed operation and failure timed task.
Then into step S102, pressure test task and failure timed task are associated.
Then into step S103, pressure test task, during executing pressure test task, Dynamic injection are executed
With each failed operation in the failure timed task associated by pressure test task, and each system on service link is monitored in real time
Indices, obtain the monitoring data of corresponding failed operation period.
The indices of system may include various indexs, for example, including hardware resource, Java Virtual Machine (JVM) state,
System log etc..
Monitoring data may include various data, such as including business dimension data and system dimensions data etc..
It is an exemplary embodiment below, can be modified according to actual needs.It is being configured with failure timed task
And after being associated pressure test task and failure timed task, pressure test task is triggered, and enable associated there
Failure timed task.In the implementation procedure of pressure test task, according to the failure timed task configured before, with service link
On related application system where agent (intelligent body) on machine communicated, dynamically inject failure.Appoint in pressure test
In the implementation procedure of business, interacted with the agent (intelligent body) on machine where each application system on service link, it is real
When acquire relevant business dimension and system dimensions achievement data.
Hereafter terminate this flow.
The system detection method is preferably further comprising the steps of:It, will be with pressure test after pressure test task
The monitoring data and business of each failed operation and corresponding failed operation period in failure timed task associated by task
Scene is associated, and automatically generates test report.Thus, can be by the field of the failure of system dimensions and link traffic dimension
Scape is analyzed with being associated, and improves accuracy.
Moreover, after automatically generating test report, further preferably test report is analyzed.Analysis to test report
Various ways may be used, such as index average comparison, trend comparison and operating lag are carried out in a manner of tendency modelling
Analysis etc..Thus, carry out modeling analysis in the failure for considering operating lag, accuracy is improved.
In conclusion by the way that robustness testing and performance pressures test are realized the integrated of loose coupling, in pressure test
Automatic injection system failure in journey, and monitor in pressure test sequence the indices of each system on chain road in real time, it solves
The problem of also effectively specific fault can be tested in the case of big concurrent.
The each method embodiment of the present invention can be realized in a manner of software, hardware, firmware etc..No matter the present invention be with
Software, hardware or firmware mode realize that instruction code may be stored in any kind of computer-accessible memory
In (such as permanent either revisable volatibility is either non-volatile solid or non-solid, it is fixed or
The replaceable medium etc. of person).Equally, memory may, for example, be programmable logic array (Programmable Array
Logic, referred to as " PAL "), random access memory (Random Access Memory, referred to as " RAM "), programmable read-only deposit
Reservoir (Programmable Read Only Memory, referred to as " PROM "), read-only memory (Read-Only Memory, letter
Claim " ROM "), electrically erasable programmable read-only memory (Electrically Erasable Programmable ROM, referred to as
" EEPROM "), disk, CD, digital versatile disc (Digital Versatile Disc, referred to as " DVD ") etc..
Second embodiment of the invention is related to a kind of opening machine system test device.Fig. 3 is the structural representation of the opening machine system test device
Figure.The practical structures of the present invention can make necessary adjustment according to actual needs, it is not limited to the structure in Fig. 3.
Specifically, the opening machine system test device passes through the collection robustness testing and performance pressures test realization loose coupling
At, the automatic injection system failure in pressure test sequence, and monitor each system on chain road in real time in pressure test sequence
Indices.As shown in figure 3, the opening machine system test device 100 includes:
Fault configuration unit 101, is used for config failure timed task, and each failure timed task includes one or more
Failed operation;
Task associative cell 102, for pressure test task and specific failure timed task to be associated;And
Pressure test unit 103, for executing pressure test task, during executing pressure test task, dynamic
Injection and each failed operation in the failure timed task associated by pressure test task, and monitor in real time each on service link
The indices of system obtain the monitoring data of each failure period.
First embodiment is method embodiment corresponding with present embodiment, and present embodiment can be implemented with first
Mode is worked in coordination implementation.The relevant technical details mentioned in first embodiment are still effective in the present embodiment, in order to
It reduces and repeats, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the first implementation
In mode.
Optionally but not necessarily, opening machine system test device 100 further includes that report generation unit 104 (does not show in figure 3
Go out), for after pressure test task, by with each failure in the failure timed task associated by pressure test task
Operation is associated with the monitoring data of corresponding failure period and business scenario, automatically generates test report.
Optionally but not necessarily, fault configuration unit 101 includes following subelement (being not shown in figure 3):Failure
Creating unit 201 is operated, for creating one or more failed operations;Failure timed task creating unit 202, for creating event
Hinder timed task;And adding device 203, it is added by the failure timed task that failure timed task creating unit 202 creates
The execution time of failed operation and the failed operation each created that failed operation creating unit 201 is created.
Optionally but not necessarily, opening machine system test device 100 further includes that report analysis unit 105 (does not show in figure 3
Go out), for analyzing test report.
It should be noted that each unit mentioned in each equipment embodiment of the present invention is all logic unit, physically,
One logic unit can be a physical unit, can also be a part for a physical unit, can also be with multiple physics
The combination of unit realizes that the Physical realization of these logic units itself is not most important, these logic units institute is real
The combination of existing function is only the key for solving technical problem proposed by the invention.In addition, in order to protrude the innovation of the present invention
Part, there is no the technical problem relationship proposed by the invention with solution is less close for the above-mentioned each equipment embodiment of the present invention
Unit introduce, this does not indicate above equipment embodiment and there is no other units.
It should be noted that in the claim and specification of this patent, such as first and second or the like relationship
Term is only used to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying
There are any actual relationship or orders between these entities or operation.Moreover, the terms "include", "comprise" or its
Any other variant is intended to non-exclusive inclusion so that including the processes of a series of elements, method, article or
Equipment includes not only those elements, but also includes other elements that are not explicitly listed, or further include for this process,
Method, article or the intrinsic element of equipment.In the absence of more restrictions, being wanted by what sentence " including one " limited
Element, it is not excluded that there is also other identical elements in the process, method, article or apparatus that includes the element.
Although by referring to some of the preferred embodiment of the invention, the present invention is shown and described,
It will be understood by those skilled in the art that can to it, various changes can be made in the form and details, without departing from this hair
Bright spirit and scope.