develooper Front page | | Postings from June 2008

testing for warnings during tests

Thread Next
Gabor Szabo
June 9, 2008 21:28
testing for warnings during tests
Message ID:
So apparently using Test::NoWarnings isn't that cool
and mandating it with CPANTS metric is even less cool.

The issue I am trying to solve is how to catch and report
when a test suit gives any warnings?

I wrote it in my blog too but here it is. Occasionally when I install
a module manually I see warnings. Sometimes I report them
but mostly I don't. I guess smokers will not see them as the
tests actually pass.

How could we catch those cases without using Test::NoWarnings ?

Could the harness catch them?

Catching anything on STDERR isn't good enough as diag() goes there.

Would catching and reporting any output (both STDOUT and STDERR)
that is not proper TAP help here?

Of course it would still miss if someone has

  print STDERR "# no cookies\n";

I know one of the features of TAP that a parser should ignore anything it
does not understand and it is especially important for forward compability.

Maybe the harness of the smokers could do that - assuming they have the latest
version of TAP - and then report the issues.


Gabor Szabo
Test Automation Tips

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About