13. Testing and CoverageΒΆ

“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 are in zinnia/tests.py.

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.

Despite my best efforts, some functionnalities are not yet tested, that’s why I need your help !

As I write these lines the 92 tests in Zinnia cover 87% of the code bundled in Zinnia. It’s not bad, but the goal (realistic) is to reach a 95% coverage.

I know that a coverage percent does not represent the quality of the tests, but increasing this percent will ensure the quality of Zinnia and his future evolutions.

You can check the actual coverage percent at this url:


I hope that you will write some tests and find some bugs. :)

Previous topic

12. Upgrading Zinnia

Next topic

14. Compatibility

This Page