Hi,

Can I make a request to add junit reporting to nutch build.xml?
Currently it only generates txt output.
Here's the patch..

Thanks
-Hari
Index: build.xml
===================================================================
--- build.xml	(revision 158884)
+++ build.xml	(working copy)
@@ -167,7 +167,7 @@
       <sysproperty key="test.build.data" value="${test.build.data}"/>
       <sysproperty key="test.src.dir" value="${test.src.dir}"/>
       <classpath refid="test.classpath"/>
-      <formatter type="plain" />
+      <formatter type="xml" />
       <batchtest todir="${test.build.dir}" unless="testcase">
         <fileset dir="${test.src.dir}"
                  includes="**/Test*.java" excludes="**/${test.exclude}.java" />
@@ -181,6 +181,16 @@
 
   </target>   
 
+  <target name="generate-test-report" description="Generates Junit Test Reports in Html Format">   
+    <mkdir dir="${junit.report.dir}"/>
+    <junitreport todir="${junit.report.dir}">
+        <fileset dir="${test.build.dir}"> 
+	    <include name="TEST-*.xml"/> 
+	</fileset> 
+	<report format="frames" todir="${junit.report.dir}"/> 
+    </junitreport>
+  </target>   
+
   <target name="test-plugins" depends="compile">
     <ant dir="src/plugin" target="test" inheritAll="false"/>
   </target>

Reply via email to