###A narrative to a Java Spring Application We will use this for hosting our System Under Test.
#####Included in this application:
- Simple Java Application that demonstrates a little 'business logic', the meat of the operation.
We will use a few testing techniques to generate test coverage.
TDD and unit tests give us great confidence that our core business logic is
well protected and functional.
TDD in particular ensure that we build quality into our application at the lowest level possible.
By definition, a unit test is a small test. A fast responding test vs its larger integration and functional sigblings.
We want a faster response when we include quality checks in our build/deploy lifecycle.
Using JUnit we will test:
- Unit Test - Maven Surefire.
- Integration Test - Maven Failsafe.
#####Maven This is a maven springboot application. Using terminal,
Run mvn clean test - this will execute unit tests
run mvn clean verify - this will execute both unit and integration tests.
run mvn verify -Dskip.surefire.tests
#####TDD Using mockito, Junit and hamcrest. I built these simple methods using TDD. Mocking my way through and building with quliaty in mind. Give it try.