- “An application without tests, is a dead-born application.”
- Someone very serious
Writing tests is important, maybe more important than coding.
And this for a lot of reasons, but I’m not here to convince you about the benefits of software testing, some prophets will do it better than me.
Of course Zinnia is tested using the unittest approach. All the tests belong in the directory zinnia/tests/.
If you have run the Buildout script bundled in Zinnia, the tests are run under nose by launching this command:
$ ./bin/test
But the tests can also be launched within a django project with the default test runner:
$ django-admin.py test zinnia --settings=zinnia.testsettings
Despite my best efforts, some functionnalities are not yet tested, that’s why I need your help !
As I write these lines the 121 tests in Zinnia cover 96% of the code bundled in Zinnia. A real effort has been made to obtain this percentage, for ensuring the quality of the code.
I know that a coverage percent does not represent the quality of the tests, but maintaining or increasing this percentage ensures the quality of Zinnia and his future evolutions.
You can check the actual coverage percent at this url:
http://django-blog-zinnia.com/documentation/coverage/
I hope that you will write some tests and find some bugs. :)