For those 11 folks...

...who so far downloaded the code. I'd be pleased to hear from you, if you have had a chance to install it and run it. I am especially interested in the experience so far, any issues, such as unclear install instructions, config problems, calling the CFC and of course any bugs.

Feel free to comment here, use the forums or even log an issue with the tracker!

Comments
Janet's Gravatar Hi Greg,

First I want to say thanks for creating this tool! I'm new to unit testing, so keep that in mind. Since *you* asked for it here goes ;) ...

I downloaded Stubbie and tested it with MX6.1. I was curious if its 6.1 compatible.

- The installation was easy but it wasn't obvious to me that the "appPath" value in config.xml should be a physical path. Its windows-centric I know, but when I see "/Full/Path/..." my first thought is virtual path.

- I found one line (#60) in Stubbie.cfc is not supported in MX6. Its a cfdirectory call with the "recurse" attribute, which wasn't added until MX7. So I replaced it with a call to DirectoryList() and it worked fine.
http://cflib.org/udf.cfm?ID=615

- I did receive an error in the Stubbie.writeMethods() function. I think this was because my project already contained a few test CFC's I'd created manually. Those cfc's did not contain the "tearDown" method. Here is what fixed it for me

component: Stubbie.cfc
function: writeMethods
line: 183-192


<cfset var listPos = ListFind(methodList,"setUp")/>
<cfif listPos gt 0>
    <!--- Let's sort this list of methods a little --->
    <cfset methodList = ListDeleteAt(methodList,listPos)/>
    <cfset methodList = ListPrepend(methodList,"setUp")/>
   </cfif>
<cfset listPos = ListFind(methodList,"tearDown")/>
<cfif listPos gt 0>
    <cfset methodList = ListDeleteAt(methodList,listPos)/>
    <cfset methodList = ListAppend(methodList,"tearDown")/>
</cfif>

- The project summary says Stubbie works with CFUnit and CFCUnit. The default seems to be CFCUnit test files. Is there a setting I need to change to generate stubs for CFUnit instead?

- Overall the instructions were good, but maybe you could add a line for beginners. Something to indicate what to expect when you call stubbie.build(). ie Stubbie should generate one file for each CFC in your application. The generated files will be located in directory X, etc...

Good work though. Thanks again.

Janet
# Posted By Janet | 10/1/07 3:47 PM
Greg Stewart's Gravatar Thanks for the feedback, much appreciated. I'll try and add your recommendations into the code base. I have a number of commits ready to be synched up, but sadly just have been completely swamped with work.

Now about your question re swapping out unit testing frameworks. If you open up the config.xml file you can change the framework by editing this line:

<unitTestFramework value="cfcUnit"/>

And changing the value to cfunit. That should do the trick. I say should, because I vaguely remember fixing a bug a while back relating to frameworks. I just wish I had more time to keep this project rolling. If there's anything else I can help with, do let me know!

Cheers
Greg
# Posted By Greg Stewart | 10/1/07 7:29 PM
jM's Gravatar Thanks for the quick response.

I thought I'd tried "cfUnit" but there was no change. So I'm thinking that setting might not be supported in the version I have. Also config.xml does contain a note that "cfcUnit is currently the only allowed option here". But since the project description differs, I just thought I'd ask.

Btw, is there any documentation for the project? I ask because I've being reviewing a few projects on RIAforge and often thought that I would like to contribute documentation (or at least submit some updates) but wasn't sure how that worked.

Janet

When you do get time to commit
# Posted By jM | 10/1/07 8:20 PM
jM's Gravatar Arg. That last post got cut off. I was going to say I'll look for the next version when you do get time to commit :)

Cheers
# Posted By jM | 10/1/07 8:23 PM
Greg Stewart's Gravatar Ah I should read my own comments :)

It is supported in the version on my machine. I just need to do some more testing and hopefully I'll be able to commit things for you. Probably closer to the end of this week.

As far as documentation goes... What you currently have is all that's there. :S Another thing on the todo list I am afraid.

Cheers
G
# Posted By Greg Stewart | 10/1/07 8:29 PM
jM's Gravatar No problems :)

Your instructions were great. But if you ever want help with the formal documentation side of things, let me know. I'd be happy to contribute if I'm not swamped with work too ;)

Cheers
# Posted By jM | 10/1/07 8:36 PM
Greg Stewart's Gravatar Hi Janet,

I have made a few commits to the repository that incorporate your suggestions/fixes. I don't have access to a cfmx 6.1 any longer, so would you mind testing these? cfUnit should also be supported in this release.

I also have tried to simply the config process. Hopefully it's self explanatory, if not just let me know.

If you don't know how to use SVN or can't get access, just let me know and I'll create a new zip file for easy download.

Thanks again for your input!
# Posted By Greg Stewart | 10/8/07 2:04 AM
Janet's Gravatar Thanks for the update. I'll test it out with 6.1 and will let you know.

I haven't used SVN, but I'll give it a shot. If I can't access it, I'll let you know.

Janet
# Posted By Janet | 10/12/07 5:47 PM
# Posted By krosafcheg | 10/19/07 12:23 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006.