A „Hello World!” sample written in Java using Maven for the build, that showcases a few very simple tests.
This example demonstrates:
- A simple Java 8 application with tests
- Unit tests written with JUnit 5
- Integration tests written with JUnit 5
- Code coverage reports via JaCoCo
- A Maven build that puts it all together
- To run the unit tests, call
mvn test - To run the integration tests as well, call
mvn verify - Code coverage reports are generated when
mvn verify(or a fullmvn clean install) is called. Point a browser at the output intarget/site/jacoco-both/index.htmlto see the report.
This example follows the following basic conventions:
