Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: What is the largest number of tests you have created for a single project you have worked on?

by Herkum (Parson)
on Jun 10, 2010 at 15:03 UTC ( [id://844017]=note: print w/replies, xml ) Need Help??


in reply to Re: What is the largest number of tests you have created for a single project you have worked on?
in thread What is the largest number of tests you have created for a single project you have worked on?

It is the number of tests executed that counts, not the number of statements. So for planning purposes in your first loop your test plan should be 3. The second test plan should be 8.

That being said, I run tests with no_plan simply because counting the number of tests can be annoying to keep up with and I don't think it really adds much to the tests anyways. I rather put more time into test code coverage instead.

Replies are listed 'Best First'.
Re^3: What is the largest number of tests you have created for a single project you have worked on?
by Tux (Canon) on Jun 11, 2010 at 05:52 UTC

    Then switch to a newer Test::More, and use - as I did in my example - to the use of done_testing () and you don't have to count or use plans no more.

    done_testing () was first released in version 0.88 in May 2009, so it should be available to you too.

    Once you're comfortable with this new way of writing tests, you can even spend more time writing them without worrying if you missed count. Next step could be writing subtests :)


    Enjoy, Have FUN! H.Merijn
Re^3: What is the largest number of tests you have created for a single project you have worked on?
by leocharre (Priest) on Jun 12, 2010 at 10:54 UTC
    Oh dear, I took a test to mean one test script.. Hmm.. what's a hundred times fifty? I feel that - really- tests should be relatively small- because stuff should be broken up into pieces of code- so.. if your project consists of ten classes, maybe each should be separated and tested into its own module/distro/package. I have a couple of packages that have maybe forty or fifty different test files, and i feel today that this is a failure in development.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://844017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found