Installing software
Depending on the operating system of the system where you intend to install the software, refer to the relevant OS documentation for the procedure.
You must configure environment variables for the installed software components.
Setting up environment variables
You can configure an environment variable for the installed software components to enable Maven find the location of the installed components during its build process, if it is not done already.
You must set up the integration test resources.
Setting up integration test resources
Before you can run Maven commands, you must set up the integration test resources that Maven uses in its build.
You must set up your own project resources that you want to test by using Test Integrations and APIs. Alternatively, you can use the samples that you can download from https://github.com/ibm-rtvs/maven.
- The integration test project with the file extension as .ghp and opens in Test Integrations and APIs.
- A JUnit integration test used to test a running stub.
- POM files to run stubs or tests.
Communication with Test Virtualization Control Panel uses the HTTPS protocol. If the server certificate used by Test Virtualization Control Panel is not trusted by your system, Maven cannot connect and download files from Test Virtualization Control Panel. To enable Maven to use the Java installation you must add the certificate used by Test Virtualization Control Panel to the JDK trust store.
Adding Test Virtualization Control Panel certificate to JDK trust store
You must add the Test Virtualization Control Panel certificate to the JDK trust store so that Maven can download the Maven plug-ins from Test Virtualization Control Panel.
You must have verified whether Test Virtualization Control Panel is accessible.
You must first export the Test Virtualization Control Panel certificate by using the browser interface, and then add the exported certificate to the certificate in the JDK trust store.
You have added the Test Virtualization Control Panel certificate and enabled Maven to use the Test Virtualization Control Panel plug-in.
You can run the Maven project commands. Optionally, you can edit the existing POM files in your Maven project to run the integration tests.
Modifying the POM files
You must modify the existing POM files in your Maven project to point to the integration test project and tests in Test Integrations and APIs. You need not modify the POM files if you are running your Maven project using the samples provided.
You can skip the steps in this task if you are using the sample project, tests, and POM files or if you have generated the POM file by using the Test Integrations and APIs UI.
Running Maven commands
You can run Maven commands in your project build to perform integration tests by using Test Integrations and APIs and the Maven plug-in from Test Virtualization Control Panel.
- You must have set up the project and tests in Test Integrations and APIs.
- You must have generated the POM files from Test Integrations and APIs.
- You must have imported the Test Virtualization Control Panel certificate into the JDK trust store.
- If you have existing POM files that you use in your Maven build project, you must have modified the POM files to point to Test Integrations and APIs project and tests, and also point to the installed Test Virtualization Control Panel.
Viewing Maven build results
You can view the generated failsafe-report.html report after Maven builds are run in the Maven created folder target\site.
- Navigate to the Maven folder that contains the POM file and project files. For example, ${USER_HOME}\bin.
- Open target\site folder.
- Open failsafe-report.html report to view the Maven build report.