RE: Tests for the root framework

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 02 Mar 2006 01:57:02 -0600


> As far as I can gather, most of your tests are in the form of a script
> (possibly compiled), and have semantics like `please test that we can
> fit this kind of data, or we can do this and that.'

This is more historical than 'by design'. We gathered in roottest all the tests we have (and could automate). Note that in addition to roottest some of the packages (reflex, mathcore, etc.) also have a test subdirectory which contains test specific to these packages.

Any actual unit tests could be added to roottest very simply.

> Have you considered using some of the testing frameworks out
> there? Say DejaGNU, cunit, cxxunit, and what not?

Most of those (except maybe part of DejaGNU) are addressing a concern that is orthogonal to the infrastructure of roottest. Namely, CppUnit, etc. give you a good 'main' routine and a set of testing routines/comparators (like TS_ASSERT_DELTA (fnum, 2.0f, 0.0001f);)

On the other hand, roottest addresses the issue of how to compile and run a set of unrelated tests (that need to be in different executables) in a platform independent ways and provide proper caching of the result (to avoid redundant re-running of test when not needed).

> Maybe you want to formalize the testsuite a bit

Not really. The major feature I want in our testsuite is the ability to take a random piece of user code (the small examples reproducing the problems that users send us) and very quickly (minutes if possible) insert it into the framework. In first approximation, all it requires is that the test finish with the proper error code for gmake and have an output that match the a 'reference' output.

In general I would rather have any test that do run rather than wait for ever for a test with the 'right' structure.

However that said, I am all in favor, whenever practical, to use a specific test environment (at some point I picked CppUnit, it looks like CxxTest would be a better choice) to write individual test. (And the more we upload example of this, the more likely more will follow ;) so do not hesitate to contribute some tests).

Cheers,
Philippe. Received on Thu Mar 02 2006 - 09:00:44 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET