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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

46 views 0 4
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