http://www.perlmonks.org?node_id=425869


in reply to Test/ Code Ratio

We spend at least as much time writing unit tests as writing the functional code. In many cases, we spend two or three times as much time working on unit tests as we spend writing the code to be tested.

And we still could use more unit tests in some cases (usually the cases that are harder to test).

- tye        

Replies are listed 'Best First'.
Re^2: Test/ Code Ratio (1x..3x)
by moot (Chaplain) on Jan 28, 2005 at 14:54 UTC
    I haven't even got to the use cases yet! This is still testing basic object interaction ("does Zobcrack auto-populate correctly when Fribnortz is instantiated?"). My worry is that I'll spend so long making sure the objects work that I'll run out of time on the project, or conversely will miss some object test that bites me later and proves difficult to track down.

    I have a lot of semi-deterministic behaviour to model that is very sensitive to input conditions, and many object dependencies. *ponder* wouldn't it be great if there were some magic module that could take test harnesses and turn them into working code? Then all we'd have to do is write the test cases!

    package Test::ToCode;
    Any takers? :)