After recording the real user behaviour (business process) on a website, VuGen converts the user action into a code called Vuser script. A performance test with LoadRunner can not be run using the same Vuser script because it requires some basic debugging like handling of dynamic value, flow verification etc. which are explained below:
LoadRunner generates a very basic script which lacks the handling of dynamic values coming from the server; although it has an autocorrelation feature. Definitely, a question comes to your mind what is the dynamic value? The server generates some unique value like sessionID, authorization token etc. for security purpose that needs to be handled in the script. The handling of dynamic values in LoadRunner is called ‘Correlation’.
If you replay the freshly recorded script without any change then the script may fail due to the correlation issue. Because it passes the old (recorded) dynamic value which will be refused by the server. Hence you need to identify the dynamic values in the script and apply the correlation wherever required. As mentioned above, LoadRunner has an auto-correlation feature that automatically identifies the dynamic values but it does not work every time. We will discuss the correlation topic later in detail.
2. Flow Logic:
In some cases, you need to write custom code to handle the user activities. For example, a hotel booking site displays a list of the hotels along with their occupancy status (Booked/Available). As per the business case, a user has to pick only that hotel which has occupancy status as ‘Available’. Let’s consider you replay the script with the recorded hotel which has already been booked while recording then the script will try to book the same booked hotel and the server will refuse it and throw an error. At last, you will get the script failure message. Now, you need to write a custom logic that checks the occupancy status of the hotel first and then book the available hotel only. In this scenario, you will perform flow debugging.
3. Content Check:
It helps to validate the response by checking the content or image present on a webpage. This is an important check to verify the desired page has been loaded or not. It is of two types:
- Text check: To validate the text in the response.
- Image check: To verify the availability of the image in the response.
You may be interested:
- Performance Testing Tutorial
- Performance Engineering Tutorial
- Apache JMeter Tutorial
- Neotys NeoLoad Tutorial