Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.53 KB

QUICKSTART.md

File metadata and controls

62 lines (44 loc) · 1.53 KB

Codice ITest Quickstart

Create the ITest project

  1. Clone the codice-itest repository:
git clone git@github.com:codice/codice-itest.git
  1. Build the component:
cd codice-itest && mvn clean install
  1. The command below will create a hello world version of a codice-itest application. You can change the groupId, artifactId and version to values that make sense for your use-case. The archetype* values must be used as-is.
mvn archetype:generate -DinteractiveMode=false \
                       -DarchetypeCatalog=local \
                       -DarchetypeGroupId=org.codice \
                       -DarchetypeArtifactId=codice-itest-archetype \
                       -DarchetypeVersion=1.0.0 \
                       -DgroupId=com.foo.bar \
                       -DartifactId=hello-world-test \
                       -Dversion=1.0.0
  1. Add ITests.
  • An example is given at src/main/java/mil/af/soaesb/tests/IntegrationTestConfiguration.java. This class can be deleted once you've added your own.
  • In essence, each ITest is a Spring Bean that implements the org.codice.itest.api.IntegrationTest interface.

Build and run your ITest project

  1. Build the project:
mvn clean install
  1. Run the project:
java -jar target/hello-world-test-1.0.0.jar

[Optional] Build and run as a docker container:

  1. Build container:
mvn jib:dockerBuild
  1. Run container:
docker images | grep hello-world | tr -s ' ' | cut -d " " -f3 | uniq