Log

LoadRunner – Runtime Settings – Log

Automatically creates logs and timestamped records of transactions, errors, parameter values, Vuser requests, and server responses in LoadRunner. The VuGen and Controller “Runtime Settings” contain registry settings. The logs are very useful:

  • To debug scripts
  • To connect the dynamic value
  • receive outgoing message

Please refer to the screenshot below, which shows the logging option of the runtime configuration window. Standard logging is enabled by default but can be disabled if required.

LoadRunner - Runtime Settings - Log

         Figure 01 shows the LoadRunner registry settings

Settings for the LoadRunner “Registry”:

The third tab, titled “Logging”, in the General category of LoadRunner runtime settings, helps you enable or disable LoadRunner logging. The option to log logs at different levels, including simple and complex trace logs, is available in LoadRunner. The following registry settings are available in LoadRunner:

1. Enable logging:

Selecting this option tells VuGen to create logs and display them in the output window.

LoadRunner - Runtime Settings - Enable `Log

Figure 02 – Registration is enabled

The remaining options in the tabs become inactive if you uncheck the “Enable logging” option.

LoadRunner - Runtime Settings - Log Option

Figure 03 – Registration is disabled

It doesn’t matter if ‘Enable logging’ is checked or not, the output message will always appear in the output window.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Output-Message.png

Image 04

2. Log options:

Specifies the time of log capture. You have two options under “Log Options”: “Always” or “Log when an error occurs…”

LoadRunner - Runtime Settings - Log Options

Figure 05 – Optional Log

Always – This option logs all messages to the log file, resulting in a large log file and lots of log data. In theory, this option should only be used for debugging scripts.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Always.png

Image 06

Log errors and limit log cache to XX KB – This setting only logs the log when a test-related problem occurs. LoadRunner only records bad events to the log file, which helps identify bottlenecks during output analysis. The log file produced by this option is smaller than the log file produced by Always. Registry cache checking is another feature of this configuration. To improve LoadRunner performance, you can define the size of the log cache. Older messages are overwritten if the log size exceeds the cache size. Use this parameter if the application is likely to fail during testing and you want to capture error messages for analysis.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Log-When-Error.png

Image 07

3. Level of detail:

The “Level of Detail” describes the types of logs that will be logged. Standard and extended logs are the two main categories of logs. The three subtypes of verbose logging are parameter substitution, server-returned data, and advanced tracing.

LoadRunner - Runtime Settings - Detail Level

Image 08

1. Standard logging – In the log file, standard logging records a selection of the functions and messages sent during the execution of the script.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Standard-Log.png

Image 09

2. Verbose logging – The execution log receives verbose script execution messages from the verbose log. Verbose logging can be used to help you troubleshoot problems with the script. Records logging at the Advanced, Server Details, and Parameters level.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Standard-Log-Example-533x1024.png

Figure 11: Extended registration

I. Parameter Substitution – Records parameter values to the log file.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Extended-Log-Example.png

Figure 12: Expanded registration results

ii. Information sent by the server: Records the entire response from the server, which makes it easier to detect volatile values in the script. The “Data returned by the server” setting is very useful for mapping.

https://www.perfmatrix.com/wp-content/uploads/2020/03/LoadRunner-Runtime-Settings-Log-Setting-Data-Return-by-server.png

Figure 13: Extended registration results

Advanced Trace (Option iii): This method captures the log at a very detailed level. It provides logs of every message sent by a Vuser, every function call, etc.

Optionally, you can enable “Include environment information” to get environment-specific information and “Print timestamp for message function” to record the time of the event.

What parameters are used for mapping, output display, and debugging?

  1. Message displayed on the screen: “Enable logging” should not be checked.
  2. Script Debugging: Choose the default logging level, enable logging, and check the box next to the Log on error. Besides that Click “Enable logging” and select “Always” as the logging level and “Server-bound data” as the logging option.
  3. Correlation: Check β€˜Enable logging’ and select β€˜Always’ as the log option along with β€˜Data Returned by server’ as log level.

Note: To get all the minimum messages collected at once, check all three options in the extended log. 

Scroll to Top