Christian, Thanks for filling in the blanks. I may implement my own version at some point or begrudgingly hand over some money to get the DRK as it also appears to have some other great stuff.
Regarding my comments on CFUnit's apparent simplicity compared to JUnit, these comments were not meant to be taken as criticisms (just in case you thought so!) On the contrary, the ability to implement a unit testing "framework" with just 2 tag based "objects" is one of the most blinding testaments to ColdFusion's power and ease of use! Nice work. André -----Original Message----- From: Christian Cantrell [mailto:[EMAIL PROTECTED] Sent: 04 July 2003 16:25 To: CF-Talk Subject: Re: CFUnit On Friday, July 4, 2003, at 04:55 AM, Andre Mohamed wrote: > Although I haven't got the DRK or seen the code for CFUnit, what I > gather from Christian's article is that the CFUnit "framework" is > merely > just one single CFC There are two components: test_case.cfc and test_suite.cfc. Test case is the base component for all cfunit tests, and test_suite allows you to bundle multiple test cases into a set, and run them all together. > it is vastly simplified compared with JUnit. ColdFusion components are vastly simplified compared to Java objects, therefore I think a vastly simplified testing framework is appropriate. > These assertion methods are presumably fairly > trivial and comprise of things like assertEquals, assertTrue etc. There are about 10 assert functions. > Obviously you can add your own assert methods to the base class as > needed. Absolutely. They are very easy to add. > I could be way off because as I said I haven't seen the implementation > of CFUnit but I think that's pretty much it You're pretty close! > i.e. ONE CFC! And no where > near as complex as JUnit. No, it is not nearly as complex as JUnit. JUnit is designed to solve much more complex problems. CFUnit is designed to introduce the concept of unit testing to ColdFusion developers and provide them with a sound, straightforward implementation which can be extended as necessary. However I doubt many ColdFusion developers would have a need to extend it much beyond what it already provides. > On your point about having an "equals" method: This would be feasible > if > the CFC you were testing implemented and "equals" method which was able > to tell whether it was equal to another CFC by way of comparing > instance > variables/object state etc. i.e. it would require a custom > implementation of an equals() method for every CFC that you built This is exactly right, which is why CFUnit does not provide this type of equals method. It certainly wouldn't be difficult to add, however, if you were inclined to do that level of unit testing. Christian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4