0

My goal is to run TestBox scripts on Jenkins. But using the Ant script from https://testbox.ortusbooks.com/content/running_tests/ant_runner.html
as a template, I get this error

BUILD FAILED C:\public\data\trunk\AutomatedTesting\Box_Unit_Tests\build.xml:38: The reference to entity "bundles" must end with the ';' delimiter.

with this script:

<?xml version="1.0" encoding="UTF-8"?>
<project name="testbox-ant-runner" default="init" basedir=".">

     <!-- THE URL TO THE RUNNER, PLEASE CHANGE ACCORDINGLY-->
     <property name="basedir"             value="C:\public\data\trunk\AutomatedTesting\Box_Unit_Tests" />
     <property name="url.runner"        value="C:\public\data\ColdBox\testbox\test-harness\runner.cfm?"/>
     <!-- FILL OUT THE BUNDLES TO TEST, CAN BE A LIST OF CFC PATHS -->
     <property name="test.bundles"      value="http://localhost/application/testing/TestBox/Hello.cfc?method=runRemote" />
     <!-- FILL OUT THE DIRECTORY MAPPING TO TEST -->
     <property name="test.directory"    value="test.specs" />
     <!-- FILL OUT IF YOU WANT THE DIRECTORY RUNNER TO RECURSE OR NOT -->
     <property name="test.recurse"      value="true" />
     <!-- FILL OUT THE LABELS YOU WANT TO APPLY TO THE TESTS -->
     <property name="test.labels"       value="" />
     <!-- FILL OUT THE TEST REPORTER YOU WANT, AVAILABLE REPORTERS ARE: ANTJunit, Codexwiki, console, dot, doc, json, junit, min, raw, simple, tap, text, xml -->
     <property name="test.reporter"     value="simple" />
     <!-- FILL OUT WHERE REPORTING RESULTS ARE STORED -->
     <property name="report.dir"        value="${basedir}\results" />
     <property name="junitreport.dir"   value="${report.dir}\junitreport" />

     <target name="init" description="Init the tests">
          <mkdir dir="${junitreport.dir}" />
          <tstamp prefix="start">
               <format property="TODAY" pattern="MM-dd-YYYY hh:mm:ss aa"/>
          </tstamp>
          <concat destfile="${report.dir}\Latestrun.log">Tests ran at ${start.TODAY}</concat>
     </target>

    <target name="run">
        <get dest="${report.dir}/results.html"
             src="${url.runner}&bundles=${test.bundles}&reporter=${test.reporter}"
             verbose="true"/>

        <-- Create fancy junit reports -->
      <junitreport todir="${junitreport.dir}">
           <fileset dir="${report.dir}">
                <include name="TEST-*.xml"/>
           </fileset>
           <report format="frames" todir="${junitreport.dir}">
                <param name="TITLE" expression="My Awesome TestBox Results"/>
           </report>
      </junitreport>
    </target>

</project>

Any thoughts?

ale
  • 6,369
  • 7
  • 55
  • 65
SC_Adams
  • 156
  • 1
  • 1
  • 13
  • 1
    Try encoding the ampersands `&` in your URL. `src="${url.runner}&bundles=${test.bundles}&reporter=${test.reporter}"` -- [Reference this answer](http://stackoverflow.com/a/6483908/1636917) – Miguel-F Apr 03 '17 at 20:16
  • Miguel, that was it! Thanks man! You should post it as an answer so I can check it! – SC_Adams Apr 04 '17 at 11:30
  • Well it was really answered by that other question I referenced. Glad it worked for you. This one may be closed as a duplicate. – Miguel-F Apr 04 '17 at 11:40
  • Possible duplicate of [The reference to entity "foo" must end with the ';' delimiter](http://stackoverflow.com/questions/6483807/the-reference-to-entity-foo-must-end-with-the-delimiter) – Miguel-F Apr 04 '17 at 11:40

0 Answers0