Rational® Integration Tester 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 Rational® Integration Tester to run integration tests and test suites as part of your Maven build.

Introduction

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

Maven plug-in

With the Rational® Integration Tester 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 Rational® Integration Tester, a set of sample POM files, a sample Rational® Integration Tester 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.