Test driven development is an iterative development process.
In TDD, developers write a test before they write just enough production code to fulfill that test and the subsequent refactoring. Developers use the specifications and first write test describing how the code should behave. It is a rapid cycle of testing, coding, and refactoring.
- You have a better understanding of a feature you implement
- 100% testable code
- You have robust indicators of feature completeness
- Low maintenance cost
- Code is covered with tests and has less chance to be corrupted by fixes or new features
- Java 11
- Spring Boot
- Maven
- JUnit 5
- Mockito
- TestContainers
For building and running the application you need:
docker run -d --name dev-postgres -e POSTGRES_USER=root -e POSTGRES_PASSWORD=123456 -e POSTGRES_DB=tdd -p 5433:5432 postgres
CREATE DATABASE tdd;
mvn clean install && mvn --projects tdd spring-boot:run
http://localhost:8080