A Developer's Playbook for Writing High-Quality Unit and Integration Tests
Designed for Mid-level software developers in agile teams who are challenged by flaky or unmaintainable automated test suites and are responsible for code quality in CI/CD pipelines. to spark real collaboration and high-energy learning.
A 90-minute virtual workshop attended by developers working remotely across multiple time zones, frustrated by unreliable test failures and unclear test boundaries. The session will blend concise theory with hands-on coding demonstrations and peer exchange.
Test Detective: Spot the Difference
Kick off with a playful challenge: flash two code snippets—one unit test, one integration test—and ask participants to jot down three quick differences. Follow up by revealing subtle clues and surprising overlaps. Everyone votes in a live poll to see if their guesses match the real distinctions.
Tap to view the full activity.
Why this works
Curiosity-driven comparison builds foundational schema for rapid recall and primes the group for nuanced discussion. Live polling raises engagement and surfaces hidden assumptions.
Busted! Common Testing Myths
Run a rapid-fire ‘myth or fact’ round, using statements like ‘Mocks always make tests faster’ or ‘Integration tests should cover everything.’ Participants vote, then the facilitator reveals why each is true or false with quick demos or data.
Tap to view the full activity.
Why this works
This method surfaces misconceptions and aligns everyone on evidence-based practices. It leverages surprise and peer learning to dispel persistent myths.
Silent Test Code Jam
Facilitator shares a purposely flawed unit test (e.g., over-mocked, hard to read). Participants, in silence, annotate the code with sticky notes or comments in a shared doc: what would they improve? No wrong answers—everyone’s input is anonymous.
Tap to view the full activity.
Why this works
Low-pressure, asynchronous participation encourages contributions from introverts and those new to testing. Silence stops groupthink and lets each voice surface.
Code Relay: Red-Green-Refactor Race
Divide into breakout teams for a fast-paced relay: each team writes a failing test (red), passes it (green), and then refactors for clarity. Teams compete for fastest completion and cleanest final code, then showcase their work and learnings.
Tap to view the full activity.
Why this works
High-energy collaboration drives engagement and mastery of the red-green-refactor cycle. Competition and time pressure spark adrenaline and focus.
Flaky Test Dilemma: What Would You Do?
Pose a real-world dilemma: a key integration test randomly fails on CI, delaying releases. Share the actual failure log and ask, ‘What would you do?’ Teams brainstorm fixes—ignore, quarantine, rewrite, or investigate root cause—and report back.
Tap to view the full activity.
Why this works
Anchoring complex concepts in authentic dilemmas links theory to practice, boosting transfer and retention. Brainstorming with real logs encourages diagnostic thinking.
Personal Test Habit Check-In
Wrap with a guided reflection: each participant privately answers, ‘What’s one testing habit you want to change this month?’ Use a poll or personal journal. Volunteers can share, and the facilitator links habits to long-term quality culture.
Tap to view the full activity.
Why this works
Reflection connects learning to personal context, increasing transfer and motivation. Sharing builds psychological safety and collective accountability.
Sign up to unlock 3 more activities
Get the full pack, facilitation flow, and more ready-to-run ideas.