/Script-Converter

Convert LoadRunner scripts to a NeoLoad Project.

Primary LanguageJavaMozilla Public License 2.0MPL-2.0

Script Converter

The Script Converter is a tool that converts LoadRunner Scripts into a NeoLoad project.

Installation as an Independent command line tool

Download

  1. Download the latest release
  2. Unzip in the folder of your choice

Requirement

Java 8 must be installed on the machine used to run the Script Converter. (Download Java).

Usage

The Script Converter converts LoadRunner Scripts from a folder previously created and including all the scripts to be processed. After the conversion process, the Script Converter creates a NeoLoad Project containing the Virtual User Paths corresponding to each LoadRunner script and provides a detailed summary of the events occurred during the process. The actions, functions and parameters processed can have 3 different status:

  • Supported: Compatible with NeoLoad.
  • Supported with a warning: Available in NeoLoad but some options or arguments are not supported.
  • Not supported: Cannot be processed by the converter.

For more information, see the Coverage section.

After the script conversion is done, it is recommended to verify the content of the migration log to manually process elements either partially supported, or not supported.

Executable

  • Windows: script-converter.bat
  • Linux/OSX: script-converter.sh

Arguments

Run a command prompt and enter the following line: -source <LR Scripts folder> -target <NeoLoad output directory> -project <NeoLoad Project name>

  • LR Scripts folder: Source directory where all scripts in each sub-directory will be converted into the output Project.
  • NeoLoad output directory: The folder of the created NeoLoad Project.
  • NeoLoad Project name: The name to assign to the NeoLoad project.

Examples

  • Windows: .\script-converter.bat -source "C:\LoadRunnerScripts\MyAppX" -target "C:\Users\Documents\NeoLoadProjects\MyAppX" -project "MyAppX"
  • Linux/OSX: ./script-converter.sh -source "/home/user/LoadRunnerScripts/MyAppX" -target "/home/user/NeoLoadProjects/MyAppX" -project "MyAppX"

Additional optional arguments

  • -help: Print the help.
  • -log: Print more information on the stdout.
  • -report: Generate a JSON report containing key statistics.
  • -debug: Write NeoLoad project configuration as XML format (for debugging purpose).
  • -mapping <file.yaml>: Add additional custom action mapping rule from YAML file with UTF-8 charset.
  • -projectVersion <product.version>: The NeoLoad project version stored in the NLP file. By default it is: 6.5.
  • -productVersion <project.version>: The NeoLoad product version stored in the NLP file. By default it is: 6.7.0.

Coverage

The script Converter supports 'Web - HTTP/HTML' and 'SAP GUI' protocols.

This section lists the LoadRunner functions and parameters covered by the Script Converter.

Functions

Below is the list of the LoadRunner functions that can be converted into a NeoLoad project:

Web functions

  • web_reg_find
  • web_reg_save_param
  • web_url
  • web_submit_data
  • web_custom_request
  • web_reg_save_param_ex
  • web_reg_save_param_regexp
  • web_reg_save_param_xpath
  • web_reg_save_param_json
  • web_add_cookie
  • web_cache_cleanup
  • web_cleanup_cookies
  • web_add_header
  • web_add_auto_header
  • web_submit_form
  • web_link

SAP GUI functions

See custom-action-mapping.yaml

LR functions

  • lr_start_transaction
  • lr_end_transaction
  • lr_think_time
  • lr_start_sub_transaction
  • lr_end_sub_transaction
  • lr_exit
  • lr_get_attrib_string
  • lr_save_string

String and numeric functions

  • atoi
  • sprintf
  • strcmp

Selection statements

if/then/else statement

Parameters

Below is the list of LoadRunner parameters that can be converted into a NeoLoad project:

  • File Parameter
  • Table Parameter
  • Custom
  • Unique Number

Not Covered

  • other functions
  • some attributes for method web_reg_save_param (HeaderNames, RequestURL, ContentType, DFEs, SaveOffset, Convert, RelFrameID, SaveLen, IgnoreRedirections)
  • other selection statements (while, do/while, for)
  • custom C code
  • actions other than in C language (.java, .vba...)

Logs

During the LoadRunner Scripts conversion, the tool creates two log files in the NeoLoad project folder:

  • migration_logs/migration.log: This file contains the migration results. It contains for example the information of all elements either partially supported or not supported.
  • migration_logs/debug.log: This file contains the debug results. It contains for example the stacktrace of any error encountered.

NeoLoad compatibility and ChangeLog

Script converter version NeoLoad compatibility ChangeLog
Version 1.3.0 Version 6.7+
  • Ability to specify NeoLoad project version and NeoLoad product version.
Version 1.2.2 Version 6.6+
  • Support of SAP GUI methods.
  • YAML file to declare mapping rules between LR method and NL custom action.
  • Support of method lr_exit.
  • Support of if/then/else statement.
Version 1.1.3 Version 6.6+
  • Fix Bug 12108 - Configure logging to write file directly in output project location.
  • Support of HTTP parameters with empty value.
  • Extend support of web_custom_request method.
Version 1.1.2 Version 6.6+
  • Support of method web_add_header.
  • Support of method web_add_auto_header.
  • Support of method web_submit_form.
  • Support of method web_link.
Version 1.1.1 Version 6.6+
  • Support of method web_reg_save_param_ex.
  • Support of method web_reg_save_param_regexp.
  • Support of method web_reg_save_param_xpath.
  • Support of method web_reg_save_param_json.
  • Support of method web_add_cookie.
  • Support of method lr_start_sub_transaction.
  • Support of method lr_end_sub_transaction.
  • Support of method web_cache_cleanup.
  • Support of method web_cleanup_cookies.
Version 1.1.0 Version 6.6+ Support All Search attribute (Headers or Body) for method web_reg_save_param.
Version 1.0 Version 6.4+ Initial version.

Feedbacks and bugs

Open an issue or contact Neotys support, and provide log files and/or LoadRunner Scripts.

How to contribute

See CONTRIBUTING.md file.