You can use supported versions of Eclipse to take advantage of additional tools that enable you to view, edit, and debug your Java Vuser (Java Record Replay, and Java over HTTP) scripts. You can add breakpoints, view variable values, add references, and edit the script using IntelliSense. You can also run the script in a step-by-step mode for debugging.
When you save your script, VuGen creates Java source files in your script's folder. You can open the solution file in Eclipse and view all of its components in the Projects Explorer.
To open the Vuser script in Eclipse, click the Open Script in Eclipse button on the VuGen toolbar.
- If this is your first time using Eclipse from within VuGen, it will automatically install the Eclipse plugin.
- Before opening a script in Eclipse, you need to set the location of the Eclipse IDE in the Java node of the VuGen's Scripting options. If you do not set this value, VuGen prompts you to select its location. For details, see Scripting Options Tab.
For details on supported Eclipse versions, see the System Requirements.
An additional toolbar menu provides access to common VuGen commands, such as Runtime Settings, Parameter List, Run, and Stop.
VuGen also has an add-in for Eclipse developers that allows you to create JUnit tests that can be called directly from the testing application, such as the LoadRunner Controller, without having to open them in VuGen. The add-ins are located in your LoadRunner installation package's /Additional Components folder. For details, see Additional Components.
To open the Vuser script in Eclipse:
- Make sure you have Eclipse 4.2 or higher on your machine, running with JDK 1.7 or later.
- Set the location of the Eclipse IDE in the Scripting > Java node in VuGen's Options dialog box. For details, see Scripting Options Tab.
- Create a Java script (Java Vuser, Java Record Replay, Java over HTTP, and so forth).
- Click the Open Script in Eclipse button on the VuGen toolbar. If this is your first time using Eclipse from within VuGen, it will automatically install the VuGen Eclipse plugin.
- Double-click the appropriate section, such as Actions.java, to edit the code.
- Use the Vuser menu to define parameters, configure runtime settings, and run the script directly from the Eclipse IDE.