Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Does anybody write tests first?

by cLive ;-) (Parson)
on Feb 22, 2008 at 07:44 UTC ( #669476=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Does anybody write tests first?
in thread Does anybody write tests first?

"Human testing doesn't scale"? Maybe I should have linked to another of his slide presentations that has more background info than practical code.

But for me, from experience, leaving smoke running hourly as a cronjob (that emails me if there's errors) when I'm developing has saved me a pile of debugging. Quite a few times, I've assumed something, only to find that that assumption broke another assumption elsewhere in the code.

I know I'm far too lazy to manually test every time I add new functionality or optimizations, so knowing that I'm going to get an email if there's either something wrong with my code - or that a test is wrong because functionality has changed - is invaluable.

But, if it's just you on the code and it's never going to grow to become a monster(say 10,000 lines or more), then you might not reap the full benefits, or think it's worthwhile. On the other hand, you might be pleasantly surprised at how much it can help :)


Comment on Re^3: Does anybody write tests first?
Re^4: Does anybody write tests first?
by dsheroh (Parson) on Feb 22, 2008 at 08:17 UTC
    Saying that "it didn't convince me" in my last post was a deliberate choice of phrasing, because I already was pretty much convinced, even though most of my projects are just me. :) And I absolutely agree that the code in there is a big plus, although personally I wouldn't use the auto-smoke because I do run tests manually, usually (much) more than once an hour, because, if something goes wrong, I find it easier to debug the code immediately after writing it.

    My point was just that the presentation you linked to isn't going to convince anyone that they should use tests because it focuses entirely on how you should test and assumes you already know why you should test, which pretty well negates your earlier comment that "If [this presentation] doesn't convince you of the benefits of a good testing strategy, I don't think anything will".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-04-16 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (413 votes), past polls