This post is to explain how to test your cfc to make sure they are working the way that you meant. I am wondering if it is possible to test a cfc directly using cfdump? However, since you don’t run a cfc directly, this may not work.


    <cffunction name="getArtist" access="remote" returntype="query">
        <cfset var qRead = "" />

        <cfquery datasource="cfartgallery" name="qRead">
            SELECT artistid, firstname, lastname, email
            FROM artists

        <cfreturn qRead />


to test the cfc I create a test file and invoke the cfc and then use cfdump to see the results


     <!--- dump the output--->
     <cfdump  var = "#qRead#">

Happy Coding

By |2009-12-20T21:39:54+00:00December 20th, 2009|