House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 05, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home / Groups / ColdFusion Talk (CF-Talk)

CFCUnit javax/xml/xpath/XPathExpressionException error

Author:
Janet MacKay
09/29/2007 06:11 PM

Finally got it working. I wasn't able to reproduce the error, but it was obviously a syntax problem in my build.xml file.   I'm posting this in case anyone is looking for a sample build.xml file for CFCUnit. This is what worked for me. My test project\cfc structure c:\cfusionmx\wwwroot\CFCUnit_Example\com\AllTests.cfc <?xml version="1.0" encoding="UTF-8"?> <project default="test" name="MyTest" basedir="." >    <property name="cfcUnitLib" value="c:\cfusionmx\wwwroot\cfcunit\lib" />    <property name="hostname" value="127.0.0.1" />    <property name="port" value="8500" />         <echo message="cfcUnitLib ${cfcUnitLib}" />    <echo message="hostname ${hostname}" />    <echo message="port ${port}" />    <taskdef resource="org/cfcunit/ant/antlib.xml">       <classpath>         <pathelement location="${cfcUnitLib}\ant-cfcunit.jar"/>       </classpath>     </taskdef>    <target name="test">    <cfcunit          verbose="true"          haltonfailure="true"          haltonerror="true"          showstacktrace="true">     <service hostname="${hostname}" port="${port}"/>       <testclass name="CFCUnit_Example.com.AllTests"/>     </cfcunit>    </target> </project>   Hope this helps someone


Mailing Lists