It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Answer accepted

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
Community showcase
Posted in Jira

Watch Slack + Atlassian's Webinar: “Transform cross-functional collaboration with Slack + Atlassian

Hi Atlassian Community! We recently partnered together with Slack on a webinar, “ Transform cross-functional collaboration with Slack + Atlassian ”. Building fast, growing exponentially: all...

32 views 0 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you