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.
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.
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.
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
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.