Simple Version
Achieve the goal : can be distributed testing their own business, highly customizable
principle : Through zookeeper to configure and dispatch, the role is divided into two, the main control and distribution test unit. Distribution Test Unit
Function: Receive master task and execute, main function is to start and receive perform task
Start
1, when the start of the registration to the zookeeper
2, listening to the corresponding configuration node (need to start the task according to the configuration)
3, listening to the corresponding queue, used to communicate with the main control message
Receive Tasks
1, from the configuration node to get the corresponding parameters to be executed, including the start of the thread, corresponding to each thread execution time interval and reporting notification time
2. Receive Task execution
3, through the queue, notify the corresponding master node for communication (communication protocol including, this node corresponding information, task execution stage information)
4, task execution completed through the queue to the main control
Difficulty
1, about set points and high consistency is difficult, but in fact, the test may not be so strict and acceptable
2, about the Distributed test node in the case of various exceptions to deal with the situation is also a difficult master node
Master node features : Assign task execution, and view tasks for Task Rollup.
1, assign tasks: Configure related Tasks, after the configuration is completed, start the related node start task
2, Task view: Timed from the queue to view the current implementation of each node
3, the Task summary: If all task execution is finished, the corresponding task summary output corresponding report complex edition
Achieve the goal : You can customize the expansion of business, direct execution can
core issues that need to be addressed
1, the task through the jar package style distribution to each node, placed in the Lib directory
2. New tasks load corresponding jar packages from lib using custom ClassLoader
3, the corresponding implementation of the business of the jar package to be highly abstracted into a set of extensible interface
can be made into a product, if the company testing business has the need to do, the general company does not have the patience and input Summary
1, the complex version to do, is a long-term project, simple version can meet the development of non-test most of the requirements
2, a single machine to start multiple Java Client pressure test program can also do a part of the stress testing work, but still far from enough.