Share this page

# Run a Vuser script from a command prompt

This task describes how to replay a Vuser script from a command prompt or from the Windows Run dialog box—without the VuGen user interface.

To send command line parameters to a Vuser from within VuGen, add the attributes and their values in the runtime settings. For details, see the General > Additional Attributes view.

In this topic:

## Run scripts using command prompt

When you run a script from the command line, VuGen replays it in its basic form. The command line replay will not capture anything related to the UI, since it is absent in this type of run. This excludes the capturing of snapshots and similar runtime settings.

Note: The Linux command line utility, run_db_vuser, does not support many of the standard Windows command line options. For details, see Run a script from a Linux CLI.

To run a script from a command line or the Run dialog box:

1. In Windows, open a Command Prompt window, or select Start > Run to open the Run dialog box.

2. Type mdrv followed by the script name, using the following syntax:

       <installation_dir>\bin\mdrv.exe -usr <script_name>

   where script_name is the full path to the .usr script file, for example, c:\temp\mytest\mytest.usr.

3. Add other command line options and arguments.

4. Click Enter. The mdrv program runs a single instance of the script without the user interface. The output files provide the runtime information.

You can retrieve the command line values by parsing the command line during replay, using the parsing functions, such as lr_get_attrib_double. For details, see the Function Reference.

## Command line examples

The following examples provide common usages of a command line expression:

- You can specify the load generator, as well as indicate the number of times to run the script as indicated by the following example:

      script1  -host pc4  -loop 5

- Specify a location for the output files. For example:

      -out c:\tmp\vuser

- Specify arguments to pass to your script by using the following format:

      -usr script_name  -arg_name arg_value  -arg_name arg_value

  For example, in the following command:

  <installation_dir>\bin\mdrv.exe -usr myfile.usr -username Lisa

  you can use lr_get_attrib_string("username") in the script to retrieve the value Lisa.

Tip:

- You can generate the Host ID from the command line, by running licgencli.exe.

- To further customize your run, set the runtime settings for your script in the configuration files. For details, see Configure runtime settings manually.

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: