Workshop Overview
This hands-on, one-day workshop teaches developers how to effectively apply Test-Driven Development (TDD) in Spring Boot applications. Unlike theoretical TDD courses, this workshop focuses on practical, real-world examples that reflect the challenges of modern enterprise applications.
You’ll learn how to write tests first for Spring components, work with databases, handle external dependencies, and organize tests for maintainability and speed. Throughout the day, you’ll build a small but complete Spring Boot application using TDD principles, giving you a solid foundation to bring these practices back to your team.
Who Should Attend
This workshop is designed for:
- Java developers working with Spring Boot who want to adopt TDD
- Teams struggling with slow or brittle test suites
- Developers who understand testing basics but struggle to apply TDD in real-world Spring Boot scenarios
- Technical leads looking to improve their team’s testing practices
Participants should have basic familiarity with Spring Boot and Java. No prior TDD experience is required.
Workshop Format
The workshop is structured as a highly interactive, hands-on experience:
- Morning Session: Foundational concepts and initial exercises applying TDD to Spring Boot components
- Afternoon Session: Advanced topics and completion of a mini-project using TDD practices
- Throughout the Day: Coding exercises, discussions, and real-time feedback
The workshop can be delivered either on-site at your location or remotely via video conferencing software. All participants need a development environment with Java and an IDE.
Prerequisites
Technical requirements:
- Java 17 or later
- Your preferred IDE (IntelliJ IDEA recommended)
- Git client
- Maven or Gradle
Knowledge prerequisites:
- Basic Spring Boot concepts
- Fundamentals of Java programming
- Familiarity with REST APIs
Sample Workshop Outline
Morning Session (9:00 AM - 12:30 PM)
TDD Fundamentals in Spring Context (1 hour)
- The TDD cycle: Red, Green, Refactor
- Adapting TDD for Spring Boot applications
- Setting up a test-friendly Spring Boot project
- Hands-on: Creating your first Spring Boot component with TDD
Testing Spring Web MVC and REST Controllers (1.5 hours)
- Writing tests for REST endpoints before implementation
- Testing request validation and error handling
- Using MockMvc effectively
- Best practices for controller tests
- Hands-on: Building a REST API with TDD
Testing Database Access (1 hour)
- Testing JPA repositories
- Database-focused test slices
- Using test containers for realistic database tests
- Hands-on: Implementing data access with TDD
Afternoon Session (1:30 PM - 5:00 PM)
Testing Service Components and Business Logic (1 hour)
- Defining service contracts with tests
- Mocking dependencies in service tests
- Common patterns for service testing
- Hands-on: Building service layer components with TDD
Integration Testing Strategies (1 hour)
- When to use @SpringBootTest
- Building a test pyramid
- Managing external dependencies in tests
- Hands-on: Writing effective integration tests
Advanced Topics and Best Practices (1 hour)
- Test organization for maintainability
- Performance considerations for fast feedback
- Continuous testing in development workflow
- Common pitfalls and how to avoid them
Bringing TDD to Your Team (30 minutes)
- Strategies for introducing TDD
- Overcoming common resistance
- Building a test-focused development culture
- Q&A and final discussion