Make your unit tests and integration tests faster. Support to build executable JAR and JaCoCo Code Coverage.
- JUnit 5 (
junit-jupiter
) v5.10.0 - AssertJ (
assertj-core
) v3.24.2
- Maven Surefire (
maven-surefire-plugin
) v3.1.2 : add Unit Tests support - Maven Failsafe (
maven-failsafe-plugin
) v3.1.2 : add Integration Tests support - Maven JAR plugin (
maven-jar-plugin
) v3.3.0 : generate executable JAR - Maven JaCoCo plugin (
jacoco-maven-plugin
) v0.8.10 : add Code Coverage report
- Execute unit tests before package.
mvn clean package
- Execute without unit tests.
mvn clean package -DskipTests
- Example
java -jar target/maven-quickstart-junit5-1.0-SNAPSHOT.jar
Hello world!
This command will execute all Unit Tests and Integration Tests.
mvn clean verify
mvn clean verify -DskipITs
# or
mvn clean test
mvn clean verify -DskipTests
mvn clean verify -DskipTests -DskipITs
- Verify tests and Generate Report with JaCoCo
- JaCoCo Report path is
target/site/jacoco
mvn clean verify jacoco:report