JUnit tests

This topic describes how to use JUnit tests.

Note: The following procedure is also applicable if you are using Selenium with your JUnit test.

Prerequisites

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

  • Make sure JDK/JRE is installed on the machine used as the load generator. For supported JDK/JRE versions, see the Supported Protocols guide (available fromSupport Matrix).

  • 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 test, and save it on your file system.

    Note:  

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

    • You must convert the test to a VuGen script before uploading it (described in Set up and run a JUnit test below).

Back to top

Develop a unit test using Eclipse

Develop unit tests in Eclipse using the Eclipse Add-in for Developers. This requires:

  1. Installing the IDE for Eclipse Dev add-in for your Eclipse version. For supported Eclipse versions, see the Support Matrix (System Requirements).

  2. Adding the API functions to your test.

For details, see Develop a unit test using Eclipse (JUnit test) in the OpenText Professional Performance Engineering Help Center.

Back to top

Set up and run a JUnit test

This topic describes how to use JUnit tests in performance tests.

  1. Convert JUnit tests to a VuGen script.

    For details, see Convert NUnit and JUnit based-tests to VuGen scripts.

  2. Upload the converted VuGen script to OpenText Enterprise Performance Engineering.

    For details, see Upload a script.

    After uploading the script, it is added to the test management tree. You can view and edit most scripts directly from within the user interface. For details, see Edit a script.

  3. Create a test using the converted script.

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

    For details, see Tests.

  4. Run the test.

    For details, see Manage a performance test run.

Back to top

See also: