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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.