Technically Correct

Customer: I would like a fruit cake
Requirements: Bake a cake with fruit
Delivered: A cake full of fruit
Unit Tests (ingredients per recipe?): ✅
Integration (batter mixed?): ✅
End-to-End (cake leavened and baked to temperature?): ✅
User Acceptance Tests (is the customer satisfied?): Rejected ❌

What happened? We made a cake per requirements! We tested it!

… but did you really test it?

Lets look at those requirements:

2 cups packed brown sugar
3 cups flour
1 tablespoon baking soda
2 tablespoons ground cinnamon, or to taste
2 tablespoons ground cloves, or to taste
2 tablespoons ground allspice, or to taste
2 tablespoons ground nutmeg, or to taste
4 large eggs
2 tablespoons lemon zest
2 tablespoons vanilla extract
½ cup brandy
1 ½ cups raisins
1 ½ cups chopped nuts
1 cup dried mixed fruit
1 ½ cups butter, melted

Hmmm…
“dried mixed fruit”? Lets open that story
Story: Add dried mixed fruit to the batter
Acceptance Criteria:
– ¼ cup dried grapes
– ¼ cup sun-dried tomatoes
– ¼ cup dried kiwi
– ¼ cup dried pineapple

… technically correct – the worst kind of correct for UAT…
Just because something is a ‘dried fruit’ does not mean it belongs in a fruit cake.

We can check that the fruit was added, the batter will mix, the and cake will bake… but no one will want to eat it.

Testing is about more then being technically correct. Shift Left, along with continuous feedback and review, allows you to catch misalignment, ambiguities, and general communication issues before your cake is relegated to being a doorstop this holiday season.

Note: there’s actually a lot of ambiguity in this recipe:
– Is the customer gluten-sensitive? Or any other allergies?
– there are many kinds of ‘flour’ on the market, how do we choose?
– ‘to taste’ is extremely subjective, are we getting rapid feedback?
– Is alcohol (brandy) an acceptable ingredient for our customer?
– Why did we add raisins twice? (… did you notice?)