This is a cross-post with CF-Talk, but I figured this list is a bit more cfc 
oriented.  I am really trying to get into test driven development as the 
benefits are fairly obvious after having done development any other way.  
However, in terms of doing this with ColdFusion, I am either not getting it or 
there is a lot of talk going on regarding TDD, but not much in actual practice.

My biggest issue comes with object dependencies.  Ideally, your objects are as 
loosely coupled as possible, but it is simply not possible to have an 
application full of completely disjoint objects with no dependencies at all.  
One of the premises of unit testing though is to test only the functionality of 
one individual object or unit and not test all of its dependencies.  Other 
languages appear to handle this with mock objects which allow for simulating 
and testing any object dependencies.  However, the mock object frameworks for 
Java and other languages simply don't port to ColdFusion because of language 
construct differences.  Without a mock object framework, the only other option 
I see is to hand create and maintain stub or mock objects, and this just does 
not seem like a feasible practice in an application of any size. 

So, how do you test ColdFusion objects when there are dependencies involved?

Thanks. 


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to