摘要 |
A load testing system (100) for testing a web site or other type of server system (122) uses a thread architecture that reduces the computing resources needed to generate a desired load. The load testing system runs several virtual users (102) on one or more clients (104) to simulate user interactions with the server. Each virtual user is executed as a virtual user thread (112) under a process on a client computer. Each virtual user thread itself establishes and supports multiple connections (202) to the web site; therefore, an additional thread need not be created for each connection. For each connection, the virtual user thread performs a sequence of functions in an asynchronous mode to establish and support the connection. If a function of a thread cannot complete without blocking, it immediately returns and the calling thread switches execution to another task. After the condition causing the block has been resolved, the thread can switch back to executing the interrupted task. In this manner, the single thread is able to support multiple simultaneous connections. |