Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Testing: Fun for the family

by rkg (Hermit)
on Mar 13, 2004 at 09:38 UTC ( #336349=note: print w/replies, xml ) Need Help??

in reply to Re: Testing: Fun for the family
in thread Testing: Fun for the family

I am a big fan of TDD -- and I agree with sfink's post. In particular,
I then discover that some fundamental piece of my design needs to be changed slightly. Theoretically, this should be no big deal since I have the test cases to allow me to change things drastically without worrying about breaking something subtle. In practice, that is true -- but I end up spending far too much time making the change, fixing things up so that all the old tests work, then making use of the change to implement the new tests.
Right on.

The refactoring and XP folks make a big distinction between refactoring (improving the design of existing code) and adding new functionality. And often it is claimed you can refactor safely because 'your tests protect you'. Agreed, but like sfink, I find refactoring requires you to recode (often nearly all) the tests as well.

This recoding is well worth it, of course. And TDD as a whole is very much worth it. But still, the tests -- necessarily so -- are very dependent on the specifics of the code tested. I find my tests break and need rebuilding (not just fail, and require the module to be changed) when the module goes through large revision.

My current testing challenge is adding application or user tests -- so far I've been living the easier world of unit tests.... app tests (particularly in a web environment) take more effort. I'm plan is to continue using extensive unit testing to confirm each module behaves as it should, then confine my app tests to one or two simple basic run-thrus of the web app's main funtion. I've noticed when the apps break, it is no longer due to the objects (which are well tested), but to the thin (Mason) glue holding them together. That said, I've not done much app test writing yet, and (unklike unit tests), can't seem to get into the rythm of writing app tests.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://336349]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2017-08-19 21:57 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (312 votes). Check out past polls.