This project shows a basic TDD example with some of the most common annotations.
This project used Java and Maven.
We have to declare the maven-surefire-plugin in the pom.xml file and configure the dependencies of this plugin.
We have to declare the following dependencies:
The junit-platform-surefire-provider dependency allows us to run tests that use either the โoldโ JUnit (3 or 4) or JUnit 5.
If we want to run tests that use either JUnit 3 or 4, we have to declare the junit-vintage-engine dependency.
If we want to run tests that use JUnit 5, we have to declare the junit-jupiter-engine dependency.
- Junit Jupiter Dependency graph
- JUnit Annotation
mvn clean test
mvn javadoc:javadoc
mvn javadoc:test-javadoc
mvn test jacoco:report
mvn test jacoco:check
mvn org.pitest:pitest-maven:mutationCoverage
mvn org.pitest:pitest-maven:mutationCoverage -DwithHistory
mvn test jacoco:report org.pitest:pitest-maven:mutationCoverage -DhistoryInputFile=target/fasterPitMutationTesting-history.txt -DhistoryOutputFile=target/fasterPitMutationTesting-history.txt -Dsonar.pitest.mode=reuseReport -Dthreads=4 -DtimestampedReports=false
- https://github.com/pitest/pitest-junit5-plugin
- https://mvnrepository.com/artifact/org.pitest/pitest-junit5-plugin
- required to work with JUnit5
- https://mvnrepository.com/artifact/org.pitest/pitest-junit5-plugin