Clean Tests
Workshop to work on Unit Tests Practices and Anti-patterns
Last updated
Workshop to work on Unit Tests Practices and Anti-patterns
Last updated
Connect participants to the topic by making them relate on Facts and Myths regarding Unit Tests
Debriefing is available in the slide deck
Before going further regarding the concepts, invite them to reflect on they define :
What is a Unit ?
Which tests they would write on the giving piece of code ?
How they would write it ?
Then explain all those concepts :
Schools of testing
Pillars of Good Unit Tests
FIRST Principles
Anatomy of Unit Tests
How to name your Unit Tests
Styles of Code
In groups, make them identify Unit Tests anti-patterns by using Code snippets or the repository provided in this page.
You can debrief it directly on the Miro board or from the slides :
My identification logic and refactoring are explained in this step-by-step guide :
Repository is available here : https://github.com/ythirion/clean-tests
You can use the miro board here to facilitate this session : https://miro.com/app/board/o9J_lpq9YGo=/?invite_link_id=764775433309
Slides are available here on speakerdeck :
A lot of stuff from this workshop comes from the book "Unit Testing : Principles, Practices, and Patterns"by Vladimir Khorikov