Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Yatzy Approval Kata

This repo contains some code that could be used in a game of Yatzy. What the code should do is described in the file Your job is to write tests for the code, and identify bugs. To make it more interesting, there are actually three implemenentations of the yatzy rules. They get buggier as you go from version 1 to 2 and from 2 to 3. I suggest you start by writing lots of tests for version 1, then see how many bugs they catch in versions 2 and 3.

There is a version of the implementation in Python, a Java version is under development. Each language implementation includes all three versions of the code. To run the python version of yatzy1 and get the helptext:

cd python
python --help

This 'adapter' script adds a command-line interface to the business logic which is in the '' file.

Similar adapters exist for the yatzy2 and yatzy3 implementations.

Writing tests

You can write tests for whichever of the three implementations you wish, using whichever tool you wish. You are provided with an initial Approval Test using the tool (TextTest)[]. Other approval testing tools exist, for example ([Approval Tests].

There is another repo on github that contains a sample solution using TextTest. I suggest you do the exercise yourself though, before you look at it. (

Viewing and Running the texttests

(assuming you already have texttest installed, see

The simplest way is to open texttest in the same folder as this file:

cd Yatzy-Approval-Kata

You can switch version from yatzy1 to yatzy2 and yatzy3 by changing the 'executable' listed in texttests/config.yatzy.

If you prefer to start texttest in another folder, then set the environment variables TEXTTEST_CHECKOUT and TEXTTEST_HOME to the fully qualified path of the folder this README file is in.


Excercise to help you learn how to use approval testing and TextTest in particular




No releases published


No packages published
You can’t perform that action at this time.