摘要 |
A method and system for load testing a server is disclosed. The method and system includes providing at least one virtual user, each of which simulates one client device, a main thread to emulate a plurality of user sessions between the at least one virtual user and the server, wherein each user session includes at least one request/response pair, and generating a plurality of subthreads from the main thread, wherein each subthread emulates one of the plurality of user sessions. The method and system further includes, building in each virtual user a message that includes a request extracted from the at least one request/response pairs in the one user session, and transmitting that message to the server. The method and system according to the preferred embodiment of the present invention easily creates a system load, quickly composes multi-user test scenarios, and automatically runs load testing. One aspect of the method and system of the present invention supports a stateful model, i.e., messages can be built based on previous synchronization user sessions with the server, because information that is to be used in subsequent messages or user sessions is stored and updated in a configuration file. Messages are then built to include information stored in the configuration file. In another aspect of the present invention, security information is also stored in the configuration file so that the subthread can emulate secure communications between the virtual user and the server.
|