JUnit and Selenium tests

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

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