To help keep you in a good flow when you are learning or practising the TDD test first approach, it can be useful to use a simple kanban board to manage your flow. Here is a guide to this simple technique.
The TDD kanban helps you to focus on each step, helping you to stick to test-code-refactor.
The TDD kanban board has three lanes as follows
Test - you are writing a single test
Code - you are writing code to pass a particular test that is failing
Refactor - you are changing the internal workings of your code
You only have one card on your kanban board (this is your work in progress limit), this reminds you which activity you should be working on and should help you get into the test-code-refactor routine.
The card itself is blank and does not refer to any required behaviour or example code.
To start, place your one and only card on the test lane of the kanban board.
Once you have written a failing test and run your tests, move the card on the kanban board to the code lane and write just enough code to make the test pass.
Once you have written enough code to make the test pass (running all tests), move the card on the kanban board to the refactor lane.
When you have finished your refactor work and have run the tests, move the card back to the test lane and write another failing test.
This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket