Test run considerations for JMeter tests

Before you can run JMeter tests on HCL OneTest Server, you must read the considerations that you must take into account and complete the tasks indicated.

When you want to run JMeter tests that you create in JMeter, you must have completed the following tasks:
  • You must have enabled the JMeter microservice on HCL OneTest Server either at the time of installation of the server software or before you add the repository that contains JMeter tests to the server project. See Prerequisites for installing the server software on Red Hat OpenShift or Prerequisites for installing the server software on Ubuntu.
  • You must have committed the following JMeter assets or resources as a JMeter project to the remote repository:
    Note: You must have created a project directory and added the associated tests or assets in sub directories, that might be required for the JMeter tests to run successfully.
    • The jmeterRoot.jprj project file in the project directory.
    • The JMeter tests in a sub directory with a name you provide within the project directory.
    • Optionally, the Java Key Store that is required at test run time in the certs sub directory.
    • Optionally, the JMeter properties files that are required at test run time in the properties sub directory.
    • Optionally, the library jar files that are required at test run time in the lib sub directory.
    • Optionally, the test dependencies that are required at test run time in the deps sub directory.
    For example, the project directory can be myproject that contains the jmeterRoot.jprj project file. In the project directory, you can create the following sub directories:
    • The mytests sub directory that contains the JMeter tests.
    • Optionally, the certs sub directory that contains the Java Key Store.

      For example, the path to the key store can be specified in the system.properties file as follows:

      Where <simpleStore.jks> is the Java Key Store and the <deploy.home> is the keyword to access the key store at the test run time.
    • Optionally, the properties sub directory that contains properties files such as system.properties, jmeter.properties, reportGenerator.properties, or user.properties.
    • Optionally, the lib sub directory that contains the lib and lib/ext content to be used at test run time. For example, the amq client and the plugins required to parse the jmx that contains amqp calls.
    • Optionally, the deps sub directory that contains the test dependencies.
    The resulting project directory can be as follows:
    myproject (that contains the jmeterRoot.jprj)
  • You can create the JMeter project file named as jmeterRoot.jprj.

    The project file is a java properties file. The JMeter project file is required so that HCL OneTest Server can identify the asset as a JMeter project. You can specify additional information in the project file. You can specify the names of the sub directories created and through keywords you can specify the path in the properties files whether they are relative to the root directory or to the tests sub directory.

    For example, if you have created the following sub directories in the project directory called myproject that contains the jmeterRoot.jprj project file:
    • myproject/mytests
    • myproject/properties
    If the JMeter tests are contained in the following path: myproject/mytests/testplan/test1.jmx, and some dependencies that are also required to be deployed at test run time exists in the following path: myproject/mytests/testplan/localdir. You must specify these file paths in the project file as follows: