LoadRunner integration

LoadRunner script converter

AppMon can be used with HP LoadRunner. HTTP Requests generated by LoadRunner´s Virtual User Generator can be evaluated by the AppMon Server. The LoadRunner Script Converter in the AppMon Client modifies LoadRunner scripts to AppMon header-aware scripts.

Modifying LoadRunner scripts for AppMon

Step 1: Record a LoadRunner Script

Refer to the LoadRunner documentation for details.

LoadRunner script
LoadRunner script

Step 2: Modify the LoadRunner Script

Modify the LoadRunner script as needed. Run the script to make sure it does not contain errors.

The web requests are not listed in the Tagged Web Requests dashlet.

Tagged Web Requests dashlet
Tagged Web Requests dashlet

Step 3: Start the Script Converter

Open the AppMon Client and select Tools > LoadRunner Script Converter. The LoadRunner Script Converter appears.

Step 4: Select the Directory That Contains the LoadRunner Scripts

Click Browse and navigate to the directory that contains your LoadRunner scripts. When you click OK, the LoadRunner Script Converter automatically shows all *.c files and globals.h files that are present in the selected directory.

Step 5: Patch or Unpatch the LoadRunner Scripts

  1. Select the files to modify.

To select specific files, use the check boxes beside the file names in the LoadRunner Script Converter table. To select files with a specific extension or all files, use the radio buttons above the table.

  1. Modify the LoadRunner scripts.

To add the AppMon HTTP header to the selected LoadRunner scripts, click Patch.
To remove all modifications the LoadRunner Script Converter made previously, click Unpatch.

LoadRunner script converter
LoadRunner script converter

If you need to cancel the conversion, click the Cancel button. When you cancel, the LoadRunner Script Converter finishes working on the currently active file before ending the operation.

Information about the script conversion is displayed as the conversion proceeds:

  • Progress: The status icon of each file changes to indicate the status of the operation: currently working on this file, file successfully modified, or error occurred. The progress bar beneath the table shows the overall progress of the operation.
  • Errors: If the LoadRunner Script Converter was unable to modify a file or encountered any other error, the Log Messages field displays the error.

Some common error messages are:

  • Could not find the file: The file may have been renamed or deleted while you were configuring the LoadRunner Script Converter. Try reloading the directory by clicking Browse and selecting the same directory again.
  • Was not able to restore the backup file:The original file may be opened by another user, or you may not have the permissions to delete the file.
  • The file is already modified: This message only applies to the globals.h file, and only if you previously modified it with the Script Converter. In most cases, this is not an error and you can safely ignore it. If you want to be sure, click Unpatch and then click Patch again. This time the message should not be displayed.
  • Access denied: Check your permissions for this file. If the filename ends with .tmp, make sure you have write permissions for this directory.

Your LoadRunner script is now ready to use with AppMon.

Script modified by script converter
Script modified by script converter

Step 6: Run the Load Test Again

This time, the web requests are listed in the Tagged Web Request dashlet.

Tagged Web Request dashlet
Tagged Web Request dashlet

Conversion result

The LoadRunner Script Converter inserts a short method in your globals.h file that populates the AppMon header. It also parses your .c files and automatically adds a call to this method before one of the following methods is called:

  • web_url
  • web_link
  • web_image
  • web_submit_form
  • web_submit_data
  • web_custom_request

The TimerName is set to the name of the currently running transaction; if the transactions are nested, the transaction names are concatenated. The PageContext contains the value of the first parameter passed to the previously listed functions.

The addDynaTraceHeader function determines the ID of the vuser and the current timestamp, and appends this information to the header. It also adds a call in front of the following methods, but it does not contain a PageContext:

  • web_browser
  • web_button
  • web_check_box
  • web_edit_field
  • web_elementweb_file
  • web_image_link
  • web_image_submit
  • web_list
  • web_map_area
  • web_radio_group
  • web_reg_dialog
  • web_static_image
  • web_table
  • web_text_area
  • web_text_link