Skip to content
/ maven Public

Examples of how to run Integration Tester assests from maven

License

Notifications You must be signed in to change notification settings

ibm-rtvs/maven

Repository files navigation

Integration Tester Maven Plugin

This plugin enables you to execute Integration Tester assets as part of your Maven build.

Samples

To run these samples you need to:

  1. Install Maven 3.2+
  2. Install either Integration Tester v9.1.1.1+ or Integration Tester Agent v9.1.1.1+
  3. Install RTCP 9.1.1.1+ and start the server
  4. Fetch these resources:
  • pom-stub-junit-test.xml (sample pom to run a stub while running a junit)
  • pom-test.xml (sample pom to run a test)
  • pom-stub-test.xml (sample pom to run a stub while running a test)
  • src/ (sample junit integration test used to hit a running stub)
  • Sample/ (sample project built from QueryPhoneBook)
  1. Put them in a directory.
  2. Open a command window in the same directory.
  3. To enable Maven to execute the resources on the machine, set an environment variable to the install directory of either Integration Tester or Integration Tester Agent:
set INTEGRATION_TESTER_HOME=<integration tester installation path>
or
set INTEGRATION_TESTER_AGENT_HOME=<integration tester agent installation path>
  1. To enable Maven to download Maven plugins from RTCP you must add the certificate used by RTCP to the JDKs trust store. To get the certificate used by RTCP browse to RTCP (eg. https://localhost:5443). If a security warning is shown add an exception to ignore it and click the HTTPS certificate chain next to the web address. If you are using FireFox you can then click "More Information" > "Security" > "View Certificate" > "Details" > "Export.." and then click save in the "File Save" dialog to save the certificate file (eg. integration_tester.crt) in your machine. If you are using another browser, please check the browser steps to export the certificate to file.
  2. Find where the JDK, that Maven uses, is installed. We will assume the JDK is installed at %JAVA_HOME%
  3. Next import the certificate file (eg. integration_tester.crt) into 'cacerts' file. This command must be run by an Administrator in a Command Prompt.
%JAVA_HOME%\jre\bin\keytool -import -alias integration_tester -keystore %JAVA_HOME%\jre\lib\security\cacert -file integration_tester.crt
  1. You will be asked for password and the default value is: changeit
  2. If the alias 'integration_tester' already exists in the keystore, enter the following command to remove the old alias and repeat the above two steps (9) & (10), then continue onto the next step (12).
%JAVA_HOME%\jre\bin\keytool -delete -alias integration_tester -keystore %JAVA_HOME%\jre\lib\security\cacert
  1. Run Maven to update the pom file(s) to use the plugin version currently available on RTCP.
mvn versions:update-properties -Dincludes=com.hcl.products.test.it -f <POM_FILE>

eg.

mvn versions:update-properties -Dincludes=com.hcl.products.test.it -f pom-test.xml
  1. You can then run Maven for the pom files.
mvn verify -f <the-pom-file.xml> -X

eg.

mvn verify -f pom-test.xml -X
  1. If the pom file runs both tests and stubs you can improve performance (by using a single instance of RunTests for both stubs and tests in the same project) by setting the following environment variable. (This assumes the plugin version pulled to the local filesystem from RTCP as a result of running Maven previously.)
set MAVEN_OPTS=-Xbootclasspath/a:%HOMEDRIVE%%HOMEPATH%\.m2\repository\com\hcl\products\test\it\it-comms\1.911.1\it-comms-1.911.1.jar

About

Examples of how to run Integration Tester assests from maven

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages