Tuesday, June 12, 2012

Understanding various log files in LoadRunner



Once a script is recorded using LoadRunner tool, one can notice 4 different tabs as part of the output window. This article is all about these tabs and their usage. The 4 tabs that you notice are: 

  •   Replay Log
  •  Recording Log
  • Correlation Results
  • Generation Log
Let us start the way these logs are generated.
Recording Log:
When a script is being recorded, the Virtual User Generator records all the communication that has happened between the client and the server into a log called “Recording Log.” Though this is not in a much readable format, the recording log will be the base for the generation log.
The option Regenerate script (Navigate to tools à Regenerate script) works purely using the recording log. If the recording log is missing, the script cannot be regenerated with different recording options
Generation Log:
Generation contains the information about the recording options used for the script, the request header, request body, response header and response body and the function that simulates the request. This function may be varied based on the recording options used.
The generation log content may be changed based on the recording options that are used and for the generation Log, recording log is input file
Once generated, the contents of the recording and generation logs are not altered
Replay Log
This log displays the output when the script is replayed. This log is helpful to debug the script and  customize the script. The contents of this log file can be controlled based on the run time settings (Vuser à Run Time settings à Log à either standard log or extended log)
The output functions like lr_output_message, lr_log_message() and lr_error_message() would write their content to the Replay Log.
Correlation Results
Once a script is recorded and replayed,  the script can be verified for the dynamic data.  The option “Scan for correlations” is used to compare the recording  and replay data and to highlight the dynamic data if any. The script can be correlated directly from this tab and this is one form of auto correlating the script.
As it compares the recording time data and the replay data, it is always necessary to have the “data” folder inside the script folder

I believe this article is informative and helpful.

1 comment: