|
|
Home / Groups / ColdFusion Talk (CF-Talk)
CFCUnit javax/xml/xpath/XPathExpressionException errorFinally 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
|
Latest Fusion Authority Articles
|