[testbox-2.1.0] running with ant and report directory location

Working on my ColdBox app - I have a few simple services and have written some very basic tests for them as well.

I have TestBox working locally - both via the runner.cfm and via Ant (building JUnit reports).

I’m not trying to move the Ant file to my Jenkins box and having issues getting the generated JUnit XML files in the right location.

Locally if I run it - I get something like below. The get says it’s error but it does work, creates the TEST*.xml files and correctly created the JUnit HTML report file.

run-junit: [get] Getting: http://r.local/myproject/_tests/index.cfm?&directory=_tests.specs&recurse=true&reporter=ANTJunit&labels=&reportPath=c:/inetpub/wwwroot/railo/myproject/_tests/results&propertiesSummary=true [get] To: c:\inetpub\wwwroot\railo\myproject\_tests\results\results.xml [get] Can't get http://r.local/myproject/_tests/index.cfm?&directory=_tests.specs&recurse=true&reporter=ANTJunit&labels=&reportPath=c:/inetpub/wwwroot/railo/myproject/_tests/results&propertiesSummary=true to c:\inetpub\wwwroot\railo\myproject\_tests\results\results.xml [junitreport] Processing c:\inetpub\wwwroot\railo\myproject\_tests\results\junitreport\TESTS-TestSuites.xml to c:\inetpub\wwwroot\railo\myproject\_tests\results\junitreport\junit-noframes.html [junitreport] Loading stylesheet jar:file:/c:/ant/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-noframes.xsl [junitreport] Transform time: 408ms

Moving things to Jenkins I get:

[get] Getting: http://pp-qa/myproject/_tests/index.cfm?&directory=_tests.specs&recurse=true&reporter=ANTJunit&labels=&reportPath=d:/temp/reports/results&propertiesSummary=true
[get] To: d:\temp\reports\results\results.xml
[get] Can’t get http://pp-qa/myproject/_tests/index.cfm?&directory=_tests.specs&recurse=true&reporter=ANTJunit&labels=&reportPath=d:/temp/reports/results&propertiesSummary=true to d:\temp\reports\results\results.xml

D:\Jenkins\workspace\myproject\Tests\myproject-UnitTests_tests\test.xml:59: Build failed as d:/temp/reports/results/TEST.properties was not found!


I can hit my QA box and generate a report for example using:


So that works… I just can’t seem to get the results to save back to my Jenkins box.

I’ve set ${report.dir} to all sorts of things with no results.

Anyone got this working? I’m using the text.xml Ant file from the latest Testbox download.

Should this work or should I be running CF on the Jenkins box? I know I did this ages ago but it was using MXUnit…


OK Digging into this a bit it’s trying to write to a path that doesn’t exist on my CFML box…

The Error Occurred in
C:\inetpub\wwwroot\common\com\framework\testbox\system\runners\HTMLRunner.cfm: line 47
45: total.skipped=#testResult.getTotalSkipped()#" );
46: }
47: fileWrite( url.reportpath & “/” & url.propertiesFilename, propertiesReport );
48: }

What’s this bit here?

Build failed as d:/temp/reports/results/TEST.properties was not found!



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I got this working over the weekend. When I first glanced at the Ant file I thought it was doing a GET to the Testbox runner which would return the .xml files back to the Jenkins box but that wasn’t the case. So I ended up setting up a share on my Jenkins box and sending the files back that way but I don’t really like that. Will revisit when I have more time and maybe see if I can hack the runner or something. I also want to revisit how MXUnit was doing this…