Write a Test

In a dream-like scenario every feature of the framework should be backed up by tests. As we know this will never happen, we at least try to have some test verifying the higher level functionalities in order to ensure that nothing breaks with further development.

Writing your test

A template for a test suite is available at DeepDIVA/template/test_RunMe.py.

As it can be easily see in the code of that file, the main idea is to build an argument string with the desired properties and then run the framework with it. Upon completion, the results can be checked to be as expected. We know this is not a safe way to test components, but its a quick way and we hope users will at least implement that.

The best way to write your own test is to copy that file and modify it as necessary.

Runing the test

The tests are supposed to be run with pytest (see the pytest documentation). For PyCharm users there is a run configuration dedicated for it and you only need to provide the path to your script folder.