Share this page

# Convert a Web script into a Java Vuser script

Note: This topic applies to Web - HTTP/HTML and Java Vuser scripts only.

VuGen provides a utility that enables you to convert a Web - HTTP/HTML Vuser script into a Java Vuser script. This also allows you to create a hybrid Vuser script for both web and Java.

1. Create an empty Java Vuser script and save it.

2. Create an empty Web - HTTP/HTML Vuser script and save it.

3. Record a session into the Web - HTTP/HTML Vuser script.

4. Replay the Web - HTTP/HTML Vuser script. When it replays correctly, cut and paste the entire script into a text editor and save it as a text file (.txt).
   In the text file, modify any parameter braces from the web type, `"{ }"` to the Java type, `"< >"`.

5. Open a DOS command window and go to the <Installation_folder>/ dat folder.

6. Type the following command:

       <Installation Folder>\bin\sed -f web_to_java.sed filename > outputfilename

   where filename is the full path and file name of the text file you saved earlier, and outputfilename is the full path and file name of the output file.

7. Open the output file, and copy its contents into your Java Vuser script action section at the required location.
   If you are pasting the contents into an empty custom Java template (Java Vuser type), modify the line containing `public int action()` as follows:

       public int action() throws Throwable

   This change is done automatically for recorded Java users (RMI and CORBA).

8. Parameterize and correlate the Vuser script as you would with an ordinary Java script, and run the script.

Back to top

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: