HCL OneTest™ API and Apache Maven

Apache Maven is a software build tool that is based on the concept of a Project Object Model (POM). You can use the Maven plug-in that is provided for HCL OneTest™ API to run integration tests and test suites as part of your Maven build.


To automate testing with HCL OneTest™ API for your Maven build project, you must configure a POM file that points to the integration test or project and launch the test from the command line using Maven commands. You must be familiar with working with Maven and the build life cycle. For more information about Maven, see Maven.

You can get a complete picture of the tasks you must complete by using HCL OneTest™ API integration tests in your Maven project by referring to Task flow: Working with Apache Maven.

Before you proceed with the following task install the requisite software. See Installing software.

You can run integration tests by using HCL OneTest™ API or HCL OneTest API Agent and you must configure the path to the installed location of these components as environment variables. See Setting up environment variables.

For enabling Maven to access the Maven plug-in from HCL Quality Server during the Maven build, you must install HCL Quality Server in a server, verify whether it is accessible, and import the certificate into the JDK trust store. See Adding HCL Quality Server certificate to JDK trust store.

Maven plug-in

With the HCL OneTest™ API Maven plug-in, you can run tests and test suites, as well as starting and stopping stubs as part of your Maven build. Each of these tasks is represented by a specific goal in Maven as follows:
  • start-stubs
  • run-tests
  • stop-stubs

You can run integration tests as part of your Maven project builds by running the Maven commands. See Running Maven commands.

The build results after successful runs are found as reports in the Maven target folder. See Viewing Maven build results.


To facilitate working with your Maven integration project in HCL OneTest™ API, a set of sample POM files, a sample HCL OneTest™ API starter project, and a sample unit test for that project are provided for you to download from the sample project site at https://github.com/ibm-rtvs/maven. You can also refer to the README.md file from the sample project site for instructions about using the samples in your Maven project build.