Scripting with Visual Studio Code
This topic describes how to build and run DevWeb scripts using the Visual Studio Code (VS Code) editor.
Create DevWeb scripts in VS Code
When creating a DevWeb script using VS Code, you can use the existing VsCodeTemplate script as a base.
To set up the VS Code environment:
- Copy the VsCodeTemplate folder from <DevWeb root folder>\examples\ to a location on the same machine as DevWeb.
- Rename the folder, for example, MyDevWebProject.
- In VS Code, open the script folder: Select File > Open Folder and open the relevant folder.
- Select Terminal > Run Tasks (in older versions of VS Code, select Tasks > Run Tasks), then select one of the options to record or generate the DevWeb script.
Note: The tasks use the environment variable DEVWEB_PATH, which should point to the DevWeb installation path. The environment variable is created automatically when DevWeb is installed with LoadRunner Professional or LoadRunner Enterprise.
Run DevWeb scripts from VS Code
You can run your DevWeb script for up to 50 Vusers, using the DevWeb plug-in.
To run a script:
- Select Terminal > Run Tasks (in older versions of VS Code, select Tasks > Run Tasks).
- Select one of the run options.
-
If any errors are discovered during the run, press CTRL+left mouse button to jump to the line where the error occurred.
See also:
- Scripting with your IDE
- Scale up your tests: Run scripts from your IDE on other LoadRunner products
- Run scripts