Approaches to Automating Unit Testing
xUnit frameworks (like cfcUnit in ColdFusion) allow for the automated running of unit tests. This allows for regression testing (where you can easily run all of your unit tests after each code refactoring to ensure you're still all green).
However, cfcUnit is only as good as the tests created and while there are resources out there for writing good tests, it seems to me that if your model metadata is sufficiently rich, a lot of the tests should be able to be generated automatically to capture a lot of the likely failure points.
I was just wondering if anyone in the CF world had been doing anything in terms of automating the creation of unit tests?
From a slightly different direction, has anyone had any experience with JesTer? Looks like a very interesting tool . . .



I use Brian's generator as well, do you have your code posted anywhere?
I've been meaning to post something about this for the past few weeks I just haven't been able to find the time. Just to give you an idea of what I'm doing, I modified the core MSSQL component to generate test values. Currently I only have one method which returns a _very_ simple value based on the database column type. I've been thinking of adding in additional methods to get values at and beyond the limits to better exercise my components, but even these very simple auto generated tests have been extremely helpful. I'll try to put something together to show what I'm doing.
@Peter:
I'm generating three components: %ObjectName%Test.cfc for the bean, %ObjectName%DAOTest.cfc for the DAO, and %ObjectName%GatewayTest.cfc for the gateway. This is my first attempt at unit testing so like I said, they could probably use some refactoring. For example my auto generated DAO test has only one test method, testLifecycle, which creates, reads, updates and deletes a bean. I really want to break this out into four separate tests. As for custom tests I've just been adding them to the auto generated components which really isn't the best approach (and which is why I can't just share the code I have right now). I like the idea of extending the auto generated test cases though - I'll have to look into that. Again, I'll try to put something together over the next couple of days so people can have a look.