If you haven't used the the component browser in CF at /CFIDE/componentutils/componentdoc.cfm then I recommend you take a look. Here is a utility that goes beyond the component browser by letting you invoke methods on the component. Basically a test utility. Here is a screenshot
It was originally written by Mike Collins and I added a few things. We plan on adding more functionality in the future. If you have any comments post them in the comments section below. Click Here to download this utility.
Branden thanks for this. I have been wanting to build one for awhile now, never had the time.
Awesome! I blogged it and I'll probably check it into our CVS tree as a useful debugging tool. Thanx!
Brandon, excellent. It can crash on component method invocation:
110: <cfinvoke returnvariable="rc" component="#c#" method="#url.fname#" argumentcollection="#ac#"/> 111 : Invoked: #url.cname# - #url.fname#<br> 112 : <cfdump var="#rc#">
Not all cffunctions return something, and if they don't you get Variable RC is undefined. from the cfdump.
You should probably check isDefined("rc") and else print "Method did not return anything".
Functions that never return anything should declare their returnType as "void", but CFMX 6.1 doesn't consider this an error (I guess the default returnType="any" includes "nothing").
Thanks for the feedback. I added your suggestion and added some other error handling. Let me know if you think anything else should be added/changed.
Excellent work, Branden. Thanks for sharing it.
Just a heads up to others that it sets it's own application up with <cfapplication>, so if any of your classes require stuff setup by your app/session, they go missing :-)
Commenting out the cfapplication line doesn't seem to harm things in this case.
it seems a nice tool but i have a problem. i downloaded the utility and hosted it under the following path C:\Inetpub\wwwroot\CFIDE\componentutils , but each time i called a method it gave me the same error "The user is not authorised to use this method " any help please.