Paladin
Paladin copied to clipboard
Investigate how developers write tests for Haiku classes
Questions:-
- Which testing frameworks are used (Cppunit et al)
- Are there common test classes that can be templated?
- How are tests integrated in to Makefile builds? Separately make target? Separate script?
- What output is generated, and how do people act upon it?
I've incorporated UnitTest++ as the test library for Paladin already.
For Haiku itself, we use cppunit which is integrated in our jamfile system. The answer to your other questions is not that helpful, I'm afraid. The tests are run manually (jam -q unittests and then run the unittester command yourself), generate only a command-line output which is not easily machine parseable, and people usually don't act much upon it. We have work to do.
But there are other places we may look into:
- Qt has an XML output for their tests, which can be used for example with my framework here: https://github.com/viveris/qtestframework (an XSLT stylesheet will generate an HTML report)
- ctest (usually but not necessarily combined with cmake) also has something like this, and can publish results to cdash (but this sounds not as useful for a locally running IDE)