Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: when do you stop writing test?

by GrandFather (Saint)
on Feb 10, 2007 at 21:58 UTC ( [id://599400]=note: print w/replies, xml ) Need Help??


in reply to when do you stop writing test?

The short answer? When no more bugs are found and you've stopped writing code, or when the code stops being used.

I find there are two modes for writing tests: proactive and reactive. In reactive testing you write a test when a bug is found (and before it is fixed) that fires for the buggy code and succeeds when the bug has been fixed.

Proactive testing checks against coding issues, edge cases in the data and unusual interactions with the user interface. The data tests are generated by code inspection and knowledge of the problem domain. The interaction tests are generated by inspecting the UI and by doing "silly stuff" (idiot proofing tests).

Proactive tests tend to be written as the code is written (before if you are writing test driven code) and reactive tests are obviously written after the code. Reactive tests may often be written to further test issues found by proactive tests.

Writing proactive tests tends to finish when you have finished writing the code. Reactive test writing finishes when bugs stop being detected.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: when do you stop writing test?
by smahesh (Pilgrim) on Feb 11, 2007 at 07:46 UTC
    Just to add my 2 cents to above excellent summary.

    Write the proactive tests either before writing the code or in parallel with coding. The proactive tests should test against the requirements **NOT** the implementation. The requirements doc is the bible for the proactive tests.

    Write the reactive tests when a bug/issue/broken functionality is detected and add it to the test suite so that a repeat offence is automatically caught.

    When to stop is an open-ended question. In practice, you stop when there are no more defects in the system. In reality, you stop when no more defects are found (or when the cost of testing outweighs the benefits/number of bugs found).

    Mahesh

Re^2: when do you stop writing test?
by izut (Chaplain) on Feb 11, 2007 at 00:40 UTC

    I think, based in GrandFather's thoughts, is you can start writing tests for all functional and not functional requirements because it is everything you know about your system at the planning moment.

    That's my two cents :-)

    Igor 'izut' Sutton
    your code, your rules.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found