• Elad Kaplan
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

We're using Bamboo OnDemand  to run code testing (RunAllTests) every time we're committing and pushing our code to a remote depository .

 

I want to add the possibility to automatically produce test results at the end of every run, using an extension com.salesforce.ant.DeployTask 

 to accept an optional junitreportdir argument that defines the folder that a JUnitReport XML file is output into.

 

The code is running on Amazon server and it suppose to create a virual directory in which it will create the test reports.

 

When running tests , I'm getting an error massage "Could not find test result reports in the C:\build-dir\TEST-TTR-JOB1 directory."

 

Did anybody get a chance to try it at some point and can look at my build.xml file and why it is failng ? 

 

Here's the build.xml file I'm using :

 

<project name="Run_All_Tests" basedir=".." xmlns:sf="antlib:com.salesforce">

<property file="${basedir}/build/build.properties"/>
<property environment="env"/>

<property name="lib.dir" value="${basedir}/lib" />
<property name="src.dir" value="${basedir}/src" />

<target name="RunAllTests">
<taskdef uri="antlib:com.salesforce"
resource="com/salesforce/antlib.xml"
classpath="${basedir}/build/lib/ant-salesforce.jar"/>
<record name="TestOutput.log" action="start" />
<sf:compileAndTest
username="${sf.username}"
password="${sf.password}${sf.token}"
serverurl="${sf.serverurl}">
<runTests Alltests="true"/>
</sf:compileAndTest>
<record name="TestOutput.log" action="stop" />
</target>

<path id="ant.additions.classpath">
<fileset dir="ant"/>
</path>

<target name="deployAndTestAndReport">
<taskdef
name="sfdeploy"
classname="com.claimvantage.force.ant.DeployWithXmlReportTask"
classpathref="ant.additions.classpath"
/>
<delete dir="test-reports" quiet="true"/>
<sfdeploy
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
deployRoot="src"
runalltests="true"
junitreportdir="test-reports">
</sfdeploy>
</target>
</project>

 

 

Thank's in advance 

 

Elad Kaplan