[ds6-devel] merged i18n & testing

Chris Leishman chris at leishman.org
Sun Jan 19 17:02:04 CET 2003


On Sunday, January 19, 2003, at 04:25 PM, Simone Piunno wrote:

> On Sun, Jan 19, 2003 at 03:12:54PM +0200, Chris Leishman wrote:
>
>> What I was wondering is what sort of test harness we should use.
>> There's dejagnu, which is mostly for system testing, but can also do
>> unit tests - and provides the framework for managing the test results,
>> but it's really heavy and not very well documented.  Otherwise we just
>> roll our own simple version, or use something like perl Test::Harness.
>> But your right - it can wait till a later release.
>
> look at this


Yup - I've seen (and written) stuff like that.  But I'm actually 
talking about the test harness - code that runs the test cases and 
monitors the output and gives a report.

As an example, the perl Test::Harness module provides a way to run a 
set of test scripts, and monitor the output.  Each test script 
indicates how many test cases it will execute and how they are expected 
to succeed, then runs the results.  For example, the output of a 
typical test script might be:

1..3 todo 2
ok 1
not ok 2
ok 3

The first line says there will be tests 1 through 3, and that the 2nd 
one shouldn't actually succeed.  The test harness then runs all of 
these, collects the results, and gives a summary of which tests scripts 
failed and which individual tests in those scripts gave the wrong 
result.

Thats one example, which is particularly suited to unit tests.  The 
other is dejagnu, which is pretty heavy and I'm still trying to work 
out exactly what it does do - but I gather its good for doing system 
testing, and automating the testing over multiple platforms, and for 
keeping a permanent record of test results.

Automake contains a very simple test harness.  Programs/scripts that 
are mentioned in the TESTS directive are run, and if any return a false 
error code then they are deemed a failure.  This might be good enough 
for us.

Regards,
Chris



More information about the ds6-devel mailing list