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.
- 5 min connect: What’s an edge case
- 5 min concept: designing text-based tests
- 5 min demo: show them the starting position and approve the first test
- 30 min concrete: write some tests
- 10 min concrete: test the other vendor versions
- 5 min conclusions: note down learnings
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?