Consider the client-side application for an automated teller machine (ATM). Although each client is connected to a server, in total there may be hundreds of ATMs open to the public. There may be some peak times — such as 10 a.m. Monday, the start of the work week — during which the load is much higher than normal. In order to test such situations, it is not practical to have a testbed of hundreds of ATMs. So, given an ATM simulator and a computer system with LoadRunner, one can simulate a large number of users accessing the server simultaneously. Once activities have been defined, they are repeatable. After debugging a problem in the application, managers can check whether the problem persists by reproducing the same situation, with the same type of user interaction.
Working in LoadRunner involves using three different tools which are part of LoadRunner. They are Virtual User Generator (VuGen), Controller and Analysis.
The Virtual User Generator (VuGen) allows a user to record and/or script the test to be performed against the application under test, and enables the performance tester to play back and make modifications to the script as needed. Such modifications may include Parameterization (selecting data for keyword-driven testing), Correlation and Error handling.
LoadRunner supports several protocols like Web HTTP/HTTPS, Remote Terminal Emulator, Oracle and Web Services. A protocol can be understood as a communication medium between the clients and the server. For example an AS400 or Mainframe based application use Terminal Emulator to talk to the Server where as a Web Online banking application uses HTTP/HTTPS with some Java and Web services. LoadRunner is capable of recording scripts in both single and multi-protocol modes.
During recording, VuGen records a tester's actions by routing data through a proxy. The type of proxy depends upon the protocol being used, and affects the form of the resulting script. For some protocols, various recording modes can be selected to further refine the form of the resulting script. For instance, there are two types of recording modes used in LoadRunner Web/HTTP testing: URL based, and HTML based.
LoadRunner allows any portion of a string to be replaced by a parameter. Parameters may be defined in a CSV or dat file; or they may be defined dynamically in a LoadRunner script.
Common situations where parameterization is used include:
- When the application needs unique data (such as user name)
- Data dependency (such as passwords)
- Data cache
- Date constraints
Once a script is prepared in VuGen, it is run via the Controller. LoadRunner provides for the usage of various machines to act as Load Generators. For example, to run a test of 1000 users, we can use three or more machines with a LoadRunner agent installed on them. These machines are known as Load Generators because the actual load will be generated from them. Each run is configured with a scenario, which describes which scripts will run, when they will run, how many virtual users will run, and which Load Generators will be used for each script. The tester connects each script in the scenario to the name of a machine which is going to act as a Load Generator, and sets the number of virtual users to be run from that Load Generator.
LoadRunner uses monitors during a load test to monitor the performance of individual components under load. Some monitors include Oracle monitors, WebSphere monitors, etc... Once a scenario is set and the run is completed, the result of the scenario can be viewed via the Analysis tool.
0 Comments