2009/3/17 Adrian Howard :
>
> On 16 Mar 2009, at 18:47, Michael G Schwern wrote:
>
>> Adrian Howard wrote:
>>>
>>> On 14 Mar 2009, at 05:57, Michael G Schwern wrote:
>>> [snip]
The test numbering exists to ensure that all your tests run, and in
the right
order. XUnit frameworks
On 16 Mar 2009, at 18:47, Michael G Schwern wrote:
Adrian Howard wrote:
On 14 Mar 2009, at 05:57, Michael G Schwern wrote:
[snip]
The test numbering exists to ensure that all your tests run, and in
the right
order. XUnit frameworks don't need to know the number of tests
because they
simply
On 16 Mar 2009, at 18:23, Fergal Daly wrote:
[snip]
Really? I know of at least one automated test runner (by this I mean
it runs all the test files it can find) for pyunit that would say
"everything
is fine" if I through a random sys.exit(0) into my test script.
[snip]
That's why I said "most"
On 16 Mar 2009, at 23:52, Fergal Daly wrote:
2009/3/16 Michael G Schwern :
[snip]
I hear where you're coming from, but there is some value in knowing
a test
still does what it did before. A regression test.
Consider the following:
my @things = $obj->things(3);
for my $thing (@thing
From: Michael G Schwern
> That said, I'm not fond of those folks with editor macros to set the count to
> whatever number just ran. Seems too easy to abuse.
++
More than once I've cut-n-drooled the output into the test because I *knew* it
was correct, only to
2009/3/16 Michael G Schwern :
> Fergal Daly wrote:
>> Alternatively, the plan is a meta-test, a test for your testing code.
>> It is the equivalent of putting
>>
>> is($tests_run_count, $tests_i_planned_count)
>>
>> at the end of your test script. Letting the computer calculate the
>> plan is the e
On Mar 16, 2009, at 6:25 PM, Michael G Schwern wrote:
Ok, write it.
Fair enough. http://www.perlfoundation.org/perl5/index.cgi?
test_counts is the start.
I don't mean to stomp on new discussion, just the rehashing of the
old. My apologies if my skimming of the thread conflated the two
Fergal Daly wrote:
> Alternatively, the plan is a meta-test, a test for your testing code.
> It is the equivalent of putting
>
> is($tests_run_count, $tests_i_planned_count)
>
> at the end of your test script. Letting the computer calculate the
> plan is the equivalent of putting
>
> is($tests_r
Eric Wilhelm wrote:
> # from Michael G Schwern
> # on Monday 16 March 2009 11:47:
>
>> I suppose what really covers their ass is that by being broken up into
>> test_* routines each test function is isolated and their code is
>> simpler and less likely to have a logic error that results in a test
Great idea. Why didn't someone think of it before and refer to that
page in the first posting in this thread and also in the middle...
F
2009/3/16 Andy Lester :
>
> How about we put up a page somewhere that discusses the pros and cons of
> counting tests, and then whenever the quarterly discussio
Andy Lester wrote:
>
> How about we put up a page somewhere that discusses the pros and cons of
> counting tests, and then whenever the quarterly discussion of LOLZ YOU
> ARE COUNTING YOUR TESTZ FOR NO REASON! vs. YOU DON'T KNOW WHAT HAPPENS
> WITHOUT A PLAN N00B! rears its head, we can refer peop
How about we put up a page somewhere that discusses the pros and cons
of counting tests, and then whenever the quarterly discussion of LOLZ
YOU ARE COUNTING YOUR TESTZ FOR NO REASON! vs. YOU DON'T KNOW WHAT
HAPPENS WITHOUT A PLAN N00B! rears its head, we can refer people there.
Some peopl
2009/3/16 Evgeny :
> Thing is. It just does not matter THAT much.
> The case you describe is fairly rare in the xUnit world, or in any
> world I would guess.
And as I said, I got bitten by it just last week. Another way I've
been bitten is when I've done slightly more complex xUnit stuff where
I c
# from Michael G Schwern
# on Monday 16 March 2009 11:47:
>I suppose what really covers their ass is that by being broken up into
> test_* routines each test function is isolated and their code is
> simpler and less likely to have a logic error that results in a test
> never being run.
Why is it
Evgeny wrote:
> The know:
> - how many unit tests were executed each run
> - how much time each unit test took to run (and the total time)
> - which unit tests passed, and which failed
> - the behavior of some tests over time (a bad test can randomly
> fail/pass for example)
As an aside, have a lo
Adrian Howard wrote:
>
> On 14 Mar 2009, at 05:57, Michael G Schwern wrote:
> [snip]
>> The test numbering exists to ensure that all your tests run, and in
>> the right
>> order. XUnit frameworks don't need to know the number of tests
>> because they
>> simply don't have this type of protection.
Thing is. It just does not matter THAT much.
The case you describe is fairly rare in the xUnit world, or in any
world I would guess.
The testing suite does not have a "will", it is only a tool.
When the testing suite works, it just works; When people have
confidence in it for some reason, then th
2009/3/15 Adrian Howard :
>
> On 14 Mar 2009, at 05:57, Michael G Schwern wrote:
> [snip]
>>
>> The test numbering exists to ensure that all your tests run, and in the
>> right
>> order. XUnit frameworks don't need to know the number of tests because
>> they
>> simply don't have this type of prote
On 14 Mar 2009, at 05:57, Michael G Schwern wrote:
[snip]
The test numbering exists to ensure that all your tests run, and in
the right
order. XUnit frameworks don't need to know the number of tests
because they
simply don't have this type of protection. [1]
[snip]
And, to some extent, ne
Just to pitch a small explanation about what Cucumber is :
It was born out of RSpec, the BDD framework, that replaced asserts with
should. And what it does it allow to specify XP stories in plain english and
then executes them to see that they pass/fail.
If you take a look at http://github.com/kes
# from Michael G Schwern
# on Friday 13 March 2009 22:57:
>The audio from the meeting should show up here shortly.
>http://pdxpm.podasp.com/archive.html
Well, now that you've gone and promised it, I guess I'll have to get
that uploaded 'shortly'. Looks like maybe another 30min at the current
t
Let's sum up.
The "why can't a program count its own tests" page refers to the problem of
counting the tests *without* running the code.
`use Test::More "no_plan";` is the most used way to run a test without having
to hard code the number of tests beforehand.
The test numbering exists to ensure
> If you still want to calculate a plan on the fly:
>
> use Test::More 'defer_plan';
> # run tests
> all_done($number_of_tests);
Just a note so as not to confuse Evgeny: Ovid meant to toot his own
horn, and that first line of code should have been:
use Test::Most 'defer_plan';
J
2009/3/13 Evgeny :
> I actually put a link to the FAQ at the very first mail I sent.It does not
> address my questions, it gives examples that say "we can't count tests ahead
> of time, its impossible". But I just want you to change the approach from
> "ahead of time" into "realtime" or something .
Gabor,
Since you are in the field of testing - then you probably know about the
other frameworks in other languages. Specifically what Ruby's Cucumber is
about.
I tried writing something similar in Perl, using Test::More no less. But I
believe you are a far better perl programmer than me, and I wo
I actually put a link to the FAQ at the very first mail I sent.It does not
address my questions, it gives examples that say "we can't count tests ahead
of time, its impossible". But I just want you to change the approach from
"ahead of time" into "realtime" or something ... like all the other testi
Hmm... to know that everything is ok? :)If someone put an "exit" in the
middle of the code, then yes - it's a problem in perl, since you cant make
Test::More catch that exit and replace it with "print test results and then
exit".
But other than that, if errors occur and the code runs "die" in the
I actually said "in other languages", like Ruby Test::Unit, or RSpec (also
Ruby). And out of all the xUnit frameworks, like JUnit, there is no "specify
amount of tests" in any of them. They just count them as you go, and display
the total amount of passed/failed/totals at the end.
I am not too fami
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 wrote:
> On Fri, Mar
Oh, then maybe the 'defer_plan' is actually what I wanted to do all along.
That might fit perfectly into my acceptance testing scenario tool. Since I
really don't know how many scenarios the "user" of the tool is going to
write, so I can't really specify a fixed amount of tests. But I DO want to
co
From: Evgeny
> I actually put a link to the FAQ at the very first mail I sent.
Oh, that's embarrassing :)
> It does not address my questions, it gives examples that say
> "we can't count tests ahead of time, its impossible". But I
> just want you to change the a
On Fri, Mar 13, 2009 at 2:53 PM, Evgeny wrote:
> I actually put a link to the FAQ at the very first mail I sent.
> It does not address my questions, it gives examples that say "we can't count
> tests ahead of time, its impossible". But I just want you to change the
> approach from "ahead of time"
On Fri, Mar 13, 2009 at 2:45 PM, Evgeny wrote:
> Gabor,
> Since you are in the field of testing - then you probably know about the
> other frameworks in other languages. Specifically what Ruby's Cucumber is
> about.
> I tried writing something similar in Perl, using Test::More no less. But I
> bel
- Original Message
> From: Gabor Szabo
> On Fri, Mar 13, 2009 at 2:40 PM, Evgeny wrote:
> > 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 scre
On Fri, Mar 13, 2009 at 2:40 PM, Evgeny wrote:
> 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.
Human?
Why
On Fri, Mar 13, 2009 at 2:04 PM, Evgeny 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
36 matches
Mail list logo