Skip to content.

plope

Personal tools
You are here: Home » Members » chrism's Home » Writing Bad Unit Tests » Hard to do test isolation
 
 

Comment

Above in this comment thread: Writing Bad Unit Tests » Unit, integration, mock

Hard to do test isolation

Posted by alexg at 2008-05-30 03:29 AM
I really think test in isolation seems great but it depends on bit of codes.

Some bits of code are integration of your code in the framework. I don't think it make sense to test them in isolation, but rather do integration test. That is the case for object creation if you did not modify eg. __init__ on an Archetype content type.

Other bits are logics and you shall unit test them in isolation.

My feeling is that separing logic piece from integration code is the right way to be able to do good test. It's not always easy :-)