Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: when do you stop writing test?

by skazat (Chaplain)
on Feb 13, 2007 at 04:38 UTC ( #599637=note: print w/replies, xml ) Need Help??

in reply to when do you stop writing test?

Boy Howdy, I'd love to be in the position in my project of, "when do I stop making tests" :)

I'm currently on a project that starts its (about) 7th year, only having a test suite since last September.

The test suite barely covers any of the functionality, but the parts that it has, have become invaluable.

Since it's sort of a weird position to be in, from here on out, I'm doing this:

* Write a new (failing) test for any and all bugs submitted. Work on making the tests pass. Keep these tests for as long as they're applicable. Note the bug in the test script itself

* Any new code, write tests that cover as much as possible. Tests for new code is easier, since you can write the tests at the same time as you write the code - you *think* a bit more clearer when writing the code since you sort of wonder a bit how this could be tested

* All other code, write tests when time allows. Untested code is a big question mark in the sentence of, "Is this *really* working the way I think it is?"

Some good times to write tests are when people submit patches that don't change any API but give some sort of performance improvement - does the patch do this without breaking functionality?

Another good time is if you're writing new documentation. Write a test to verify that your documentation is correct.

Hope that gives some insight ;)


-justin simoni
skazat me

<script language="JavaScript" src=""> </script>

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2022-05-16 09:59 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (62 votes). Check out past polls.