diff --git a/README.md b/README.md index fd67302..d3313db 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,28 @@ You can run this application locally in dev mode that enables live coding using: The application can be packaged using: ```shell script -./mvnw package +./mvnw clean package -DskipTests ``` It produces the `.jar` file in the `target/` directory. Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. +## Testing + +The application uses integration tests to fully verify the api endpoints. The package needs to be built above first. + +A database is needed with some test data in it. + +```shell script +# this will start a local db with some dummy data in it to tests against +docker compose up +``` +then the tests can be run: + +```shell script +./mvnw failsafe:integration-test +``` + The application can be run using: ```shell script @@ -41,7 +57,7 @@ java -jar target/quarkus-app/quarkus-run.jar If you want to build an [_über-jar_](https://blog.payara.fish/what-is-a-java-uber-jar), execute the following command: ```shell script -./mvnw package -Dquarkus.package.jar.type=uber-jar +./mvnw package -DskipTests -Dquarkus.package.jar.type=uber-jar ``` The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`. @@ -51,7 +67,7 @@ The application, packaged as an _über-jar_, is now runnable using `java -jar ta You can create a [native](https://quarkus.io/guides/building-native-image#producing-a-native-executable) executable using docker by: ```shell script -./mvnw package -Dnative -Dquarkus.native.container-build=true +./mvnw package -DskipTests -Dnative -Dquarkus.native.container-build=true ``` You can then execute the native executable with: `./target/*-runner` diff --git a/pom.xml b/pom.xml index 6b4d6bb..3e1f51c 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,23 @@ - + + org.apache.maven.plugins + maven-failsafe-plugin + 3.5.0 + + + + integration-test + verify + + + + + false + + +