develooper Front page | perl.perl5.porters | Postings from June 2001

Re: on testing

Thread Previous | Thread Next
From:
John Peacock
Date:
June 4, 2001 09:38
Subject:
Re: on testing
Message ID:
3B1BB995.D779A706@rowman.com
schwern@pobox.com wrote:
> 
> On Mon, Jun 04, 2001 at 10:29:44AM -0400, John Peacock wrote:
> > ASSUMPTION 1:
> > All tests will eventually be rewritten to use Test::Harness
> 
> Umm, they already do.  t/TEST mirrors most of Test::Harness's
> functionality, even TODO tests.  We can't use Test::Harness for basic
> testing since if certain parts of perl are broken the tests will break
> as well.  t/TEST is kept around for that.

Obviously there are always going to be some bootstrap issues.

> 
> Have you got Test::Harness mixed up with Test?

No, I meant that all test scripts will use a common framework for
everything, especially the ok() sub.  Currently, there are many tests
which do not encapsulate the ok (mine included) and many other tests
that have a wide variety of what sub ok{} does.

> 
> > MODIFICATION:
> > Change Test::Harness to accept an additional parameter which signifies
> > which tests are "interesting" and suppress _all_ output for other
> > tests, then kick into verbose for the flagged tests.  The parameter
> > should accept strings like "1-3,45" and deal with that.
> 
> Problem with this, as was the problem with the original skip
> interface, is that if you add a test in the middle of your script you
> have to reorder your list of interesting tests.

I meant that when running verbose, after some tests failed, then we 
should be able to specify which tests to run and have ok() stub out
all others (i.e. don't eval() them at all).  I'll take a look at 
Test::Simple to see if this is the direction I want to head in for my
own code.

> 
> Instead, I'm planning on having Test::Harness simply dump the verbose
> output to a file on each test run.  test.out or something.  That way
> you always have the verbose output to look at if you're interested.
> Sort of brute force, but covers all the bases without extra work for
> the test author.

Good, but not far enough.  If we make it REAL EASY for authors to 
write tests using Test::Simple, then we can deal with converting the
old tests to use the T::S framework (if that becomes core).

John

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

Thread Previous | 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