Talk Overview
Your tests are green, your coverage is high, but bugs still slip through to production. Sound familiar?
This session exposes five critical testing mistakes that even experienced Spring Boot developers make - mistakes that look innocent but create unreliable test suites and false confidence.
Through real-world code examples and debugging sessions, you’ll learn to spot these dangerous patterns and transform your tests from liability to asset.
The Five Testing Traps
1. Transaction Rollback Confusion
The Trap: Tests pass with @Transactional, but production code fails because the database state isn’t what you expected.
What You’ll Learn:
- How Spring’s test transaction management differs from production
- When rollback hiding real issues
- Patterns for reliable database testing without surprises
2. Context Pollution Between Tests
The Trap: Tests pass individually but fail when run together. Your CI randomly fails, but you can’t reproduce it locally.
What You’ll Learn:
- How shared application context state leaks between tests
- Why @DirtiesContext is a symptom, not a solution
- Techniques for true test isolation
3. Incorrect WebMvcTest Usage
The Trap: Your @WebMvcTest passes, but the real controller fails in integration tests with cryptic errors.
What You’ll Learn:
- Common @WebMvcTest configuration mistakes
- What Spring actually mocks in slice tests
- When to use @WebMvcTest vs @SpringBootTest
4. Time-Dependent Test Failures
The Trap: Tests fail at midnight, on certain dates, or after running for a few minutes. Flaky tests that erode team confidence.
What You’ll Learn:
- Hidden time dependencies in your tests
- How to make tests deterministic regardless of when they run
- Patterns for testing time-sensitive business logic
5. The Over-Mocking Trap
The Trap: You have 100% coverage, but your mocks hide integration issues. Production fails because components don’t work together.
What You’ll Learn:
- When mocking does more harm than good
- The balance between unit and integration tests
- How to test component interactions reliably
Session Format
This is an interactive code-focused session that combines:
- Live code examples showing each mistake in action
- Debugging sessions to understand why tests fail
- Before/after comparisons with practical solutions
- Real production scenarios that each mistake enables
The session includes audience participation and Q&A throughout.
Why This Matters
- Save Time: Stop chasing phantom bugs that tests should have caught
- Build Confidence: Deploy on Fridays without anxiety
- Improve Quality: Catch real issues before production
- Team Impact: Share knowledge to prevent mistakes across the team
Who Should Attend
Perfect for developers who:
- Have experienced production bugs despite passing tests
- Struggle with flaky or unreliable tests
- Want to improve their testing skills beyond the basics
- Are tired of “hope and pray” deployments
What You’ll Leave With
- A mental checklist of testing anti-patterns to avoid
- Practical code patterns you can apply immediately
- Understanding of why your tests might not be as reliable as you think
- Confidence to critically evaluate your test suite
Delivery History
This talk addresses the most common issues teams face when testing Spring Boot applications - patterns I’ve seen repeatedly in consulting engagements and code reviews across dozens of projects.
The content is drawn from real production incidents and testing failures, making it immediately relevant and practical for working developers.