Share this page

# Protocol-specific Vuser functions

In addition to the general Vuser functions, VuGen also generates and inserts protocol-specific functions into the Vuser script while you record.

The protocol-specific functions are particular to the type of Vuser that you are recording. For example, LRS functions are inserted into a Windows Sockets script.

By default, VuGen's automatic script generator creates Vuser scripts in C for most protocols, and in Java for Java type protocols. You can instruct VuGen to generate code in Visual Basic or JavaScript. For more information, see General > Script recording options.

All standard conventions apply to the scripts, including control flow and syntax. You can add comments and conditional statements to the script just as you do in other programming languages.

Note: The C Interpreter used for running Vuser scripts written in C only supports the ANSI C language. It does not support the Microsoft extensions to ANSI C.

The following segment from a web Vuser script shows several functions that VuGen recorded and generated in a script:

    #include "as_web.h"
    Action1()
    {
        web_add_cookie("nav=140; DOMAIN=dogbert");
        web_url("dogbert",
            "URL=http://dogbert/",
            "RecContentType=text/html",
            LAST);
        web_image("Library",
            "Alt=Library",
            LAST);
        web_link("1 Book Search:",
            "Text=1 Book Search:",
            LAST);
        lr_start_transaction("Purchase_Order");
    ...

Back to top

See also:

- Function Reference
- Java Vuser protocol

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 All View Local Help Center View Online Help Center Version: