Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Order of tests

by Tanktalus (Canon)
on Mar 13, 2016 at 02:38 UTC ( [id://1157577]=note: print w/replies, xml ) Need Help??


in reply to Order of tests

To be honest, it works both ways. Avoiding old tests that were passing to see when the new test passes may result in getting the new test passing even though you broke an old previously-working test three hours ago.

I generally try to build up my tests. Early in the test file tests things that later tests require. Testing that I never break fundamentals may not save me much time, but it sure saves me a lot of headache.

Also, I find that the more fundamental the test is, the more isolated it likely is. Things like standalone modules, code that doesn't rely on networking and external devices, that sort of thing. I find my fundamental tests are also usually my fastest, and that peace of mind in ensuring I don't break them is worth the extra couple seconds it takes the tests to run.

In practice, though, I'm usually somewhere in the middle. I put my fundamental tests in the 0[0-9]-* test files, and build up from there. Then, when I'm working on higher-level code, which relies on those low-level fundamentals, in the 5* range or whatever, I'm not usually making changes to the low level code, so I can bypass those by simply running "prove t/5*".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-29 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found