|
Sammy,
I use CFUnit for unit testing my model layer. I
ran into 'testing issues' when trying to test the CRUD (DAO) & Gateway
layers. By testing issues, I mean how I loaded the test values into the
test cases and checked the results. I did not want to write all these
cases into the actual test b/c my long range plan is to be able to add more test
cases and scenerios w/out modifying the testing code. So I created an XML
file that I use to load the test cases. My 'tester' CFC class loads the
XML data and pushes it through the testing process. The XML file
store the expected results so the test condition can be easily changed as
well. Here's a quick sample of the XML file:
<create
name="insert1">
<Prefix>Mr.</Prefix> <FirstName>Jason</FirstName> <LastName>Daiger</LastName> <Company>Attendee Interactive</Company> <Email1>[EMAIL PROTECTED]</Email1> <Result value="true"/> <Description>Standard insert</Description> </create> The Result is the condition w/in CFUnit. This
approach is working for me but I still have issues when reading multiple
rows back since the state of my test db is always changing.
However at John Ashenfelter's CFUnited talk he mentioned DBUnit which sounds
like it will address that aspect of my testing plann. Now to learn
how to use DBUnit, CFUnit and Ant to automate the setup and running of
my unit testing. And then after that is to use CFUnit to test
the display layer and then Selenium for the functional layer.
-Jason
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sammy Larbi Sent: Saturday, July 22, 2006 12:00 PM To: [email protected] Subject: [CFCDev] unit testing in CF Do any of you practice unit testing your cf code, for example with cfunit? If so (or not- why not?), how have you handled unit testing the model layer, for example. I'm finding it tedious to test, and wondering if anyone's got any good ideas they wouldn't mind floating my way. Thanks, Sammy Larbi ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
- Re: [CFCDev] Static CFC methods Steve Runyon
- Re: [CFCDev] Static CFC methods Matt Woodward
- [CFCDev] Scoping Question Brian Peddle
- RE: [CFCDev] Scoping Question Bryan F Hogan
- Re: [CFCDev] Scoping Question Cody Caughlan
- Re: [CFCDev] Scoping Question Andrew Powell
- Re: [CFCDev] Static CFC methods Sammy Larbi
- [CFCDev] unit testing in CF Sammy Larbi
- Re: [CFCDev] unit testing in CF Dustin Tinney
- Re: [CFCDev] unit testing in CF Dave Shuck
- RE: [CFCDev] unit testing in CF Jason Daiger
- RE: [CFCDev] Static CFC methods Dave Watts
- RE: [CFCDev] Static CFC methods hal helms
- [CFCDev] Re: Static CFC methods Robert Munn
- RE: [CFCDev] Static CFC methods Vince Bonfanti
- Re: [CFCDev] Static CFC methods Cody Caughlan
- RE: [CFCDev] Static CFC methods Dave Watts
- RE: [CFCDev] Static CFC methods Dave Watts
