Share this page

# Program a Vuser script on Linux

You can use a base template for manually programming and compiling a Vuser script on Linux.

In this topic:

## Create a script from the template

The product installation includes a utility on Linux that copies a template into your working directory. The utility is called mkdbtest, and is located in $M_LROOT/bin. You run the utility by typing:

    mkdbtest  name

This creates a directory using the defined name, containing the template script file name.c, plus additional files.

For example, `mkdbtest test` creates a directory called test, which contains the template script file test.c, and the files test.usr, test.cfg, and makefile.

Back to top

## Manually compile the script

After you modify the template, you compile it with the appropriate Makefile in the script's directory. The compiler creates a dynamic library called libtest.so.

You can modify the Makefile and assign additional compiler flags and libraries by modifying the appropriate sections.

If you are working with a general template, you must include your application's libraries and header files. For example, if your application uses a library called testlib, include it in the LIBS section.

    LIBS         = \
        -testlib \
        -lLrun50 \
        -lm

After you modify the Makefile, type `make` from the command line in the working directory, to create the dynamic library files for the Vuser script.

After you create a script, you check its functionality from the command line. Check that your script communicates with the server and performs all the required tasks. For details, see Run a script from a Linux CLI in the VuGen Help Center.

Back to top

See also:

- Vuser scripts on Linux

https://admhelp.microfocus.com Professional Performance Engineering,VuGen 8942
Tips to improve your search results... OpenText™ Professional Performance Engineering Help Center OpenText™ Professional Performance Engineering Help 25.1-25.3 All View Local Help Center View Online Help Center Version: