Bamboo does not finde the reports

I have following the Ant build script:

<?xml version="1.0"?>

<project name="Clover" default="" basedir=".">
	<description>Build file</description>
	
	<property name="src_dir" location="./src"/>
	<property name="srcTest_dir" location="./srcTest"/>
	<property name="bin_dir" location="./bin"/>	
	<property name="report_dir" location="./reports"/>
	
	<property name="clover.jar" location="C:/Programme/Clover/lib/clover.jar"/>
	<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
		
    <target name="CloverSetup">
		<clover-setup initstring="CloverDB/clover_coverage.db"/>
    </target>

	<target name="Cleanup">
		<delete verbose="true">
			<fileset dir="${bin_dir}">				
	    		<include name="*.class"/>	    
			</fileset>
		</delete>
	</target>
	
	<target name="BuildProject">
		<mkdir dir="${bin_dir}"/>
		<javac destdir="${bin_dir}" verbose="true">			
			<src>
				<pathelement location="${src_dir}"/>
				<pathelement location="${srcTest_dir}"/>
			</src>				
		</javac>
	</target>		
	
	<target name="UnitTests">		
		<junit printSummary="true" showOutput="true">			
			<!-- <formatter type="brief" usefile="false"/> -->
			<formatter type="xml"/>
			<classpath >
				<pathelement location="${bin_dir}"/>
				<pathelement path="${clover.jar}"/>
			</classpath>
			<batchtest>
				<fileset dir="${bin_dir}">
					<include name="*Test.class"/>
				</fileset>
			</batchtest>				
		</junit>
	</target>
	
	<target name="CloverReportHTML">
		<clover-report>
			<current outfile="${report_dir}/clover/html">
				<format type="html"/>
			</current>
		</clover-report>
	</target>
	
	<target name="CloverReportXML">
			<clover-report>
				<current outfile="${report_dir}/clover/xml/report.xml">				
					<format type="xml"/>
				</current>
			</clover-report>
	</target>
</project>

It generates mit Clover XML and HTML reports as is intended. Plus Junit generates an XML Report in the root directory of the project with the filename TEST-CalcTest.xml. I don't know why. Anyway.

With Bamboo I execute the following targets: Cleanup BuildProject UnitTests CloverReportXML

The problem is, that bamboo neither accepts the clover report nor the report in the project's root directory. I get the following error message:

Could not find ant Junit test results in the C:\Dokumente und Einstellungen\mp\bamboo-home\xml-data\build-dir\JUTBA-AC-JOB1 directory.

The custom result directory is:

C:\Dokumente und Einstellungen\mp\bamboo-home\xml-data\build-dir\JUTBA-AC-JOB1

or

C:\Dokumente und Einstellungen\mp\bamboo-home\xml-data\build-dir\JUTBA-AC-JOB1\reports\clover\xml

Both directory specifications result in the same error message. But there are reports. That confuses me a bit.

2 answers

1 accepted

1 vote

The paths to test results should be relative to working directory (which is C:\Dokumente und Einstellungen\mp\bamboo-home\xml-data\build-dir\JUTBA-AC-JOB1)

so e.g. for JUnit file you should put sth. like **/TEST-CalcTest.xml (meaning file with name TEST-CalcTest.xml in any subdirectory)

(or even simply: TEST-CalcTest.xml)

OK. That solves the problem. Again thank you very much.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

166 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you