Debugging the LoadRunner script
VuGen converts user activity into a program called a Vuser script after capturing actual user behavior (business process) on a website. You cannot use the same Vuser script to perform a performance test with LoadRunner because you need to do some basic debugging, such as dynamic value handling and flow verification, which are described below:
1. Correlation:
Although it has an autocorrelation feature, LoadRunner writes a very simple script that cannot handle dynamic data coming from the server. No doubt the question “What is the dynamic value?” comes to mind. For security reasons, the server generates various differentiating values, such as session IDs and permission tokens, for the script to manage. Mapping is LoadRunner’s term for handling dynamic values.
If you play a newly recorded script without making any changes, the script may not work due to a mapping problem. because the server will reject it because you pass an obsolete (included) dynamic value. As a result, you should place the dynamic values in the script and use mapping if necessary. As noted, LoadRunner has an autocorrelation capability that can automatically recognize dynamic values, but this is not always effective.
2. Flow logic:
Β Sometimes it is necessary to create original code to manage user activities. A hotel booking website can list all the hotels and indicate if they are booked or available. Based on the business case, a user should only select hotels with an occupancy status of “Available”. If you were to play the script using the recorded hotel that was booked during the recording, the script would try to do the same, but the server would reject it and throw an error. Finally, a message appears stating that the script failed. Now you need to create custom logic that only books available hotels after first checking the occupancy status of the hotel.
3. Control of content:
Β It is helpful to check the answer by looking at the text or image on a website. This is a crucial check to see if the landing page has loaded or not. There are two kinds:
- Verify the text in the response with a text check.
- Image check: to make sure that the image is present in the response