Paladin icon indicating copy to clipboard operation
Paladin copied to clipboard

Investigate how developers write tests for Haiku classes

Open adamfowleruk opened this issue 7 years ago • 2 comments

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?

adamfowleruk avatar Sep 25 '18 21:09 adamfowleruk

I've incorporated UnitTest++ as the test library for Paladin already.

adamfowleruk avatar Dec 15 '19 00:12 adamfowleruk

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)

pulkomandy avatar Dec 15 '19 09:12 pulkomandy