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 votes

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 Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

523 views 1 15
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot