parsarium

0x0000manual

Testing parsers, from one file to a thousand targets.

These chapters are my working notes on parser testing, written so I can come back to them and so others can learn from them. They start with what a parser does with its input and end with how to design an experiment across many targets. Every chapter ends with the key ideas, a five-question quiz, and three exercises on Parsarium, from warm-up to challenge, each with a hint and a solution. Your progress is saved in this browser.

0x0020setup

Before the exercises.

Install the command from PyPI. You need Python 3.11 or newer; running harnesses also needs Docker with Linux amd64 and arm64 support.

$ python3 -m pip install parsarium
$ parsarium list

Some exercises read files from the catalog, such as controls and receipts. They live in the folder parsarium home --path prints. Export it once per terminal, and the exercises refer to it as $PARSARIUM:

$ export PARSARIUM="$(parsarium home --path)"
$ ls "$PARSARIUM"

Results go to runs/ in the folder where you run the commands. If you work from a clone of the repository instead, set PARSARIUM_HOME to the clone and the command uses it.