Welcome to the full-day workshop "Testing Spring Boot Applications Demystified" during the DATEV Coding Festival 2025 at the 09th of October 2025.
This workshop helps developers become more confident and productive when implementing automated tests for Spring Boot applications.
Proudly presented by PragmaTech GmbH.
This workshop demystifies testing in Spring Boot applications through hands-on exercises, covering everything from basic unit testing to advanced integration testing techniques.
The workshop consists of four lab sessions, each focusing on different aspects of testing Spring Boot applications:
- Lab 1: Introduction to the Workshop & Unit Testing
- Lab 2: Sliced Testing: Working with a minimal Spring TestContext
- Lab 3: Integration Testing: Testing against a full Spring TestContext
- Lab 4: Pitfalls, Best Practices, Outlook and AI
Each lab concludes with hands-on tasks that are explained in the subsequent lab session.
Throughout the workshop, you'll learn to effectively use testing frameworks like JUnit 5, Mockito, Testcontainers, and WireMock in Spring Boot applications.
- You'll understand how to structure tests and when different test types provide the most value and confidence.
- We'll cover best practices for writing integration tests with the Spring TestContext, optimizing your test suite for fast & reliable results and explore the vast and mature Java testing ecosystem.
- Finally, we'll discuss common pitfalls and how to avoid them, plus how AI tools can assist in writing and maintaining tests.
The workshop will be held in either English or German, depending on the participants' preferences.
- Existing knowledge of Java and Spring Boot
- Familiarity with Maven and basic Java/Spring Boot testing concepts
- A laptop with Java 21 JDK installed
- Access to a Docker engine to use Testcontainers for integration tests (consider Podman)
- An IDE of your choice (preferably IntelliJ IDEA)
- To verify your setup, follow the instructions in Getting Started
- Alternative option to a local setup: Use GitHub Codespaces, this requires a personal GitHub Account
- 9:00 - 10:30: Lab 1 (90 minutes)
- 10:30 - 11:00: Coffee Break and time for exercises
- 11:00 - 12:30: Lab 2 (90 minutes)
- 12:30 - 13:30 Lunch
- 13:30 - 15:00: Lab 3 (90 minutes)
- 15:00 - 15:30 Coffee Break and time for exercises
- 15:30 - 16:30: Lab 4 (60 minutes)
- 16:30 - 17:00: Final Q&A and wrap-up
This repository is configured for use with GitHub Codespaces, which provides a complete, ready-to-use development environment in the cloud. To use GitHub Codespaces:
- Follow this link
- Continue with the default confiugration (
mainbranch, regionEurope West) and select at least 4 cores (120 hours are free per month) - Wait for the codespace to start and setup to complete
The codespace includes:
- Java 21
- Maven
- Docker (for Testcontainers)
- VS Code with Spring Boot extensions
For more information, see the Codespaces documentation.
See the content of the labs folder for the content per lab.
Each lab (lab-1 through lab-4) includes:
- Exercise files with instructions and TODO comments
- Solution files that show the complete implementation
- Supporting code and configurations
- Clone this repository:
git clone https://github.com/PragmaTech-GmbH/workshop-datev-coding-festival-2025.git-
Import the project at the root level into your IDE of choice.
-
Ensure you're using Java 21 for the project.
java -version
- Run all builds from the root level of the project with:
./mvnw verify- Spring Boot Testing Documentation
- Spring Test Documentation
- JUnit 5 User Guide
- Mockito Documentation
- Testcontainers Documentation
- WireMock Documentation
This project is licensed under the MIT License - see the LICENSE file for details.