DevOps Test Integrations and APIs 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 DevOps Test Integrations and APIs (Test Integrations and APIs) to run integration tests and test suites as part of your Maven build.

Introduction

To automate testing with Test Integrations and APIs 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 Test Integrations and APIs 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 Test Integrations and APIs or Test Integrations and APIs 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 Test Virtualization Control Panel during the Maven build, you must install Test Virtualization Control Panel in a server, verify whether it is accessible, and import the certificate into the JDK trust store. See Adding Test Virtualization Control Panel certificate to JDK trust store.

Maven plug-in

With the Test Integrations and APIs 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.

Samples

To facilitate working with your Maven integration project in Test Integrations and APIs, a set of sample POM files, a sample Test Integrations and APIs 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.