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.
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.
Figure 02 – Registration is enabled
The remaining options in the tabs become inactive if you uncheck the “Enable logging” 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.
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…”
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.
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.
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.
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.
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.
Figure 11: Extended registration
I. Parameter Substitution – Records parameter values to the log file.
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.
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?
- Message displayed on the screen: “Enable logging” should not be checked.
- 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.
- 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.