[tap-l] What's the best way to do logging?

Michael Moore mmoore at clusterresources.com
Wed Nov 14 15:53:42 EST 2007


Hello,

I'm glad to have found a TAP mailing list! If Perl specific questions 
aren't appropriate for this list, please let me know and forgive me.


I'm working on an automated test suite for some of our software using 
Perl,  I had been using Test::Harness and Test::Harness::Straps but saw 
just yesterday that Test::Harness::Straps won't be developed anymore.

Since we want to use these tests for some time, I'd like to move to 
something that's not discontinued. Could someone here tell me if 
TAP::Harness and TAP::Parser is what I should be looking at?

I need to do fairly extensive logging. Our tests will normally be run as 
nightly regression tests, and we want to be able to compare results from 
different nights.

On a test by test basis I am currently logging all of the Test::More 
functions. I log the test comment and the result. I also log the many 
external programs that are called, the STDOUT, STDERR, and return 
status. There are several hundred batch tests, which currently use 
Test::Harness's execute_tests. I log which test was called from the 
batch test, and what the result for each was.

I've added the logging functionality by overriding the functions, 
grabbing the results and logging them before returning them to the 
calling function.

I've done this by writing a module which I include instead of 
Test::More, Test::Harness and Test::Harness::Straps.

Is TAP::Harness and TAP::Parser what I should be looking at? Or is there 
an easier way to do logging?

Thank you,

Michael Moore



More information about the tap-l mailing list