develooper Front page | perl.qa | Postings from June 2008

testing for warnings during tests

Thread Next
From:
Gabor Szabo
Date:
June 9, 2008 21:28
Subject:
testing for warnings during tests
Message ID:
d8a74af10806092128g504d3c40q8bfbf2ced6fca48d@mail.gmail.com
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


-- 
Gabor Szabo http://szabgab.com/blog.html
Test Automation Tips http://szabgab.com/test_automation_tips.html

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About