Virtual Users in Testing

A software testing process requires examination and assessment of a software product from the user's point of view. Thus, a tester puts itself in the user's shoes, to view and test a software application from the user perspective.

However, there are several testing types, which may need a large number of users/resources to assess the software quality, such as in the performance, load and stress testing. It is not economically feasible to organize and deploy multiple users simultaneously, each having a separate system in the testing environment, keeping in view the budget & time constraints associated with the project. This made the testing team, to implement and make use of virtual users.

What is meant by the term "virtual users" in the field of software testing?

Virtual users are used to simulate the number of users required in performing the certain testing forms, as stated in the introductory paragraph. Testing types such as load and stress testing, requires to check the performance and efficiency quality of a software application or a system, by burdening it with the large number of users, concurrently accessing and using the system/application. Thus, a virtual user acts as a real world user, which is automated to perform a particular operation over the software product, in order to test it.

Generally, a virtual user generator is being used by the testing team to create the virtual users and simultaneously burdening the system with more increasing load.

Before going further, let's us have a small glance on the load and the stress testing.

Load Testing:It is a basic form of the performance testing, which is used to evaluate the functioning and performance of a software product, under multiple variant of loads, in the terms of users, concurrently accessing and using the application or the system. The load is gradually increased, until the threshold limit or break-even point of the system and simultaneously response and behaviour of the system is evaluated after each increment in the load. This ensures the smooth and proper functioning of the application under normal and peek load and conditions.

Stress Testing:It is also a form of performance testing and may be considered as the extreme or the brutal version of the load testing. This testing type ensures the robustness quality of the system under maximum load and extreme or unacceptable or unexpected conditions, with the intention to break down the system.

Now, coming back to the virtual user, it is an effective approach of concurrently accessing and performing the multiple operations on the software application, through a single host or the system, thereby, diminishes the need of deploying different users, accessing and using the system, from different host. At some point of limit, virtual users may prove to be beneficial for testing the application, however, creating the huge number of virtual users or beyond the limit, may results into the large consumption of the CPU, memory and space, thereby causing overload and may subsequently generates invalid or unexpected results.

How to measure the number of virtual users, required in testing a system or an application?

The information regarding the number of potential users of a software application may be gained from the business team, which may be aware of it. However, in the event of non-availability of such information from the business team, a tester may adopt a general formula as given below, to calculate the number of virtual users, required in testing an application.


N= Number of Virtual users
Z= Transaction per Second
R= Response Time in Seconds
T= Think Time in Seconds

However, based on different parameters and measurements, this formula may be modified or re-created as under:

Number of Virtual Users= Length of User Scenario(in secs)* No. of request per second required
Number of Virtual Users= (No. of Users/hour* No. of request/user*3600)/Length of User Scenario(in sec.)


In nutshell, it may be concluded that the robustness of a system or an application could only be assessed by targeting them with the maximum possible load (huge number of users), which may seen to be possible by the implementation and usage of virtual users, only.