JUnit and Selenium tests
This topic describes how to use JUnit and Selenium tests in LoadRunner Enterprise.
In this topic:
- Prerequisites
- Develop a JUnit or Selenium test using Eclipse
- Convert and upload JUnit or Selenium tests
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).
-
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:
-
Installing the IDE for Eclipse Dev add-in for your Eclipse version.
-
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.
Convert and upload JUnit or Selenium tests
This topic describes how to use JUnit and Selenium tests in LoadRunner Enterprise.
-
Convert tests based on JUnit to a VuGen script.
For details, see Scripts.
-
Upload the converted VuGen script to LoadRunner Enterprise.
For details, see Upload a script.
-
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.
-
Run the test.
For details, see Run performance tests.