Get started (quickly)

This should not take much time. testkraut contains no compiled code. It should run with Python 2.6 (or later) – although Python 3x hasn’t been tested (yet). If you are running Python 2.6 you should install the argparse package, otherwise you won’t have much fun. Here is a list of things the make life more interesting:

not strictly required, but strongly recommended. There should be no need to have any particular version.
will improve the test result reporting – any reasonably recent version should do
helps to provide more meaningful information on file types
for more beautiful console output – but monochrome beings don’t need it

Download ...

testkraut is available from PyPi, hence it can be installed with easy_install or pip – the usual way. pip seems to be a little saner than the other one, so we’ll use this:

% pip install testkraut

This should download and install the latest version. Depending on where you are installing you might want to call sudo for additional force.

pip will tell you where it installed the main testkraut script. Depending on your setup you may want to add this location to your PATH environment variable.

... and run

Now we’re ready to run our first test. The demo test requires FSL to be installed and configured to run (properly set FSLDIR variable and so on...). The main testkraut script supports a number of commands that are used to prepare and run tests. A comprehensive listing is available form the help output:

% testkraut --help

To run the demo test, we need to obtain the required test data first. This is done by telling testkraut to cache all required files locally:

% testkraut cachefiles demo

It will download an anatomical image from a webserver. However, since the image is the MNI152 template head that comes with FSL, you can also use an existing local file to populate the cache – please explore the options for this command.

Now we are ready to run:

% testkraut execute demo

If FSL is functional, this command will run a few seconds and create a subdirectory testbeds/demo with the test in/output and a comprehensive description of the test run in JSON format:

% ls testbeds/demo
brain_mask.nii.gz  brain.nii.gz  head.nii.gz  spec.json

That is it – for now...