Text-based Approval Tests for Yatzy

Write some text-based tests. Define input in a text file, approve output in a text file. Design which dice and categories are interesting to test and how to arrange them into test cases.

Session Outline

Connect: What’s an edge case

How do you choose criteria for testing an application? Imagine the input is a text file. What would you try putting in it?

Concept: designing text-based tests

Explain what texttest is and the philosophy

Demo: show them the starting position and approve the first test

We’ll work on the Yatzy-Approval-Kata. Show the help text. This should help you to design input to give the program. Show how to approve the Chance test.

Concrete: write some tests

They work to add test cases with various inputs.

Concrete: test the other vendor versions

Switch over to test one of the other implementations. How many bugs do you find? Compare with the number of bugs found by the sample solution.

Conclusions: note down learnings

Is text-based testing a good way to test yatzy? What about other applications?