Unit Test FIRST properties

Introducing Tim Ottinger & Brett Schuchert’s FIRST properties from “Agile in a Flash”.

Learning Goals

Session Outline

Connect

Use the “Three facts and a question” format with the topic “Designing Good Unit Tests”.

Concept

Explain the FIRST properties. Get people to actively review the properties by asking them to match these characteristics of a test with the FIRST property they are missing:

Concrete

Write some unit tests that have FIRST properties. Suggested exercise: LeapYears or FizzBuzz or ClosestToZero. The idea is to choose an exercise where the code under test is a pure function and relatively easy to write tests for.

You could use FIRST Test Design Kata as a starting position.

Conclusions

Review your facts and questions from the first part of the session. Can you answer any of the questions? Do any of the facts need reviewing? Annotate the notes you made with new notes detailing things you learnt during the session.