Scripting with Eclipse

This topic describes how to build and run DevWeb scripts using the Eclipse IDE.

Write DevWeb scripts in Eclipse

The existing EmptyScript template is available to use as a base for your script.

To set up and write a script:

  1. Copy the EmptyScript folder from <DevWeb root folder>\examples\ to a location on the same machine as DevWeb.
  2. In Eclipse, select File > Import Projects from File System or Archive. The Import Projects from File System or Archive wizard opens.

  3. In the Import source field, enter the path to the EmptyScript folder, or click Directory and browse to the folder. Click Finish.

  4. From Project Explorer, open EmptyScript > main.js to start writing your code.

Back to top

Run DevWeb scripts from Eclipse

You can run your DevWeb script for up to 50 Vusers. To run the script in Eclipse, you set up Eclipse to use the DevWeb executable.

To run a script:

  1. Select Run > External Tools > Eternal Tools Configurations and click the New Configuration button.
  2. Enter a name for the configuration in the Name field, for example, DevWebSingleRun.
  3. Under Location, enter the path to DevWeb. If relevant, you can use the DEVWEB_PATH environment variable using ${env_var:DEVWEB_PATH}, as in the example below.
  4. Under Working Directory, enter the path to the script.
  5. Under Arguments, add the following arguments, separated with a blank space:

    • -ide=eclipse
    • The path to the script, for example: C:\Scripts\EmptyScript

    Example:

  6. Click Run.

Back to top

See also: