develooper Front page | perl.qa | Postings from March 2009

Re: Counting tests

Thread Previous | Thread Next
From:
Evgeny
Date:
March 13, 2009 09:21
Subject:
Re: Counting tests
Message ID:
b6840c770903130540t725cefdex2d67b20190ec9098@mail.gmail.com
If my script ended early, because maybe even a core dump ... the I wont
care. It's just another case of a failed test that cant be reported by
Test::More, but a human looking at the screen will hopefully understand what
happened.

On Fri, Mar 13, 2009 at 2:34 PM, Gabor Szabo <szabgab@gmail.com> wrote:

> On Fri, Mar 13, 2009 at 2:04 PM, Evgeny <evgeny.zislis@gmail.com> wrote:
> > I have seen the page :
> >
> http://perl-qa.hexten.net/wiki/index.php/Why_can%27t_a_program_count_its_own_tests
> >
> > And I still don't understand, why can't a perl program count its test and
> > then when all the tests are done write something like:
> >
> > I ran 45976347563873456 tests and 587643873645 of then failed and
> > 234598634875634 of them passed.
> >
> > (dont mind that the numbers dont add up)
> >
> >
> > Then you dont really need to "count" the amount of tests before hand, you
> > "count" them as you go, and will only know the final amount of tests at
> the
> > very end.
> >
>
> They can, just say
>
> use Test::More 'no_plan';
>
>
> The problem is that what happens if you constantly
> get 100 success reports while in fact you had 300
> tests, just you test script exited early?
>
> e.g. because you added an exit; in the middle to shortcut
> your test running while you were debugging some failing test.
>
>
> Gabor
> http://szabgab.com/test_automation_tips.html
>

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