# JUnit and Selenium tests

This topic describes how to use JUnit and Selenium tests in LoadRunner Enterprise.

In this topic:

## Prerequisites

- Configure the load generator machine the same way as the machine that is used to record or prepare the script or test.

- For running JUnit tests from LoadRunner Enterprise, JDK needs to be installed on the machine used as the load generator.

- If your test has dependencies, verify that they are available on the load generator machine with the same paths as defined under Runtime Settings > Classpath.

- You must have the JAVA_HOME environment variable included in the PATH variable on the load generator and Controller machines were applicable (to avoid displaying an error that Java is not installed).

- Create a JUnit or Selenium test, and save it on your file system.

  Note:

  - The file path inside a script folder must not exceed 260 characters.

  - You will need to convert the test to a VuGen script before uploading it to LoadRunner Enterprise (described in Convert and upload JUnit or Selenium tests below).

Back to top

## Develop a JUnit or Selenium test using Eclipse

Develop JUnit and Selenium tests in Eclipse using the LoadRunner Eclipse Add-in for Developers. This requires:

1. Installing the IDE for Eclipse Dev add-in for your Eclipse version.

2. Adding the LoadRunner API functions to your test.

For details, see Develop a Unit Test Using Eclipse (JUnit or Selenium test) in the LoadRunner Professional Help Center.

Back to top

## Convert and upload JUnit or Selenium tests

This topic describes how to use JUnit and Selenium tests in LoadRunner Enterprise.

1. Convert tests based on JUnit to a VuGen script.

   For details, see Scripts.

2. Upload the converted VuGen script to LoadRunner Enterprise.

   For details, see Upload a script.

3. Create a test using the script.

   Assign as the load generator a machine that has JUnit and the relevant prerequisites installed on it.

   For details, see Design a test.

4. Run the test.

   For details, see Run performance tests.

Back to top

https://admhelp.microfocus.com LoadRunner Enterprise 8942
Tips to improve your search results... LoadRunner Enterprise Help Center LoadRunner Enterprise Help LR Enterprise Help 2020_SP2-SP3 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: