Scale your test from VS Code
You can use LoadRunner Developer, together with any IDE, to scale up your DevWeb tests on LRC and LRE. This topic describes working with the Visual Studio Code (VS Code) IDE.
For information on using predefined tasks for DevWeb tests in VS Code, see Scripting with Visual Studio Code.
Set up a task in VS Code
The LoadRunner Developer ScaLRD tool works with VS Code. Use the tool to set up a tasks.json file to run your DevWeb script.
Tip: A predefined tasks.json template for VS Code is provided for use with LoadRunner Developer. The template is based on running a test on LRC, and is available here: <DevWeb root folder>\examples\VsCodeTemplate
To set up a task for ScaLRD in VS Code:
- Create your DevWeb script, and test it in LoadRunner Developer.
- Open the script in VS Code.
Either open an existing tasks.json file, or add a new task.
To add a new task:
- Select Terminal > Configure Tasks (in older versions of VS Code, select Tasks > Configure Tasks).
- Select Create tasks.json file from template from the task list.
- In the Select a Task Template list, select Others. VS Code creates a tasks.json file as a basic template.
Add the relevant content to the tasks.json file, as follows:
Property name Value task Define your own label to identify the task. type Define as shell. panel Define as new. Every run will be in a new panel. <Platform> You can run the task on Windows, Mac, or Linux OS (windows, osx, linux). command Define the path to the ScaLRD executable file, for the specified platform. args Add the path to the relevant script folder, and the flags you want to include (these flag definitions override the settings in the lrc_uploader.yml or lre_uploader.yml file).
Example (for LRC):
- Save the file.
Run a test from VS Code
When you run the task that you defined in VS Code, your DevWeb script is uploaded and executed in LRC or LRE.
To run the test:
- In VS Code, select Terminal > Run Task.
- In the Select the task to run list, select your task (the label you defined previously).
In the displayed list of options, select Continue without scanning the task output. The task starts running, and the script is uploaded to LRC or LRE. Progress is displayed in the Terminal pane.
A brief replay summary is displayed, providing information on the run and a transaction summary. It also provides the path to the report, containing the full details and graphs for the test run.