Appendix: Testing Ilastik¶
ilastik comes with a set of unit/regression tests. You must have nosetests installed to run the tests.
To run all the non-gui tests in one go, use nosetests:
$ cd ilastik/tests $ nosetests --nologcapture
ilastik and lazyflow make extensive use of the python logger. Unfortunately, nosetests sets the default
logging level to DEBUG, which causes a lot of unecessary output for failed tests.
--nologcapture option to disable logger output.
Sometimes it’s convenient to run the test scripts one at a time. A convenience script for that is included in the tests directory:
$ cd ilastik/tests $ ./testeach.sh .
testeach.sh script MUST be run from within the tests directory. It takes an optional argument for the subdirectory to run.
The ilastik GUI tests cannot be run using nosetests. You must run them directly as python scripts (they use nosetests internally, but from a different thread).
$ cd ilastik/tests $ python test_applets/pixelClassification/testPixelClassificationGui.py $ python test_applets/pixelClassification/testPixelClassificationMultiImageGui.py
Because of this limitation, the GUI tests are not executed using the travis-CI tool.