• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log only junit failed tests to text file

 
Leo Aug
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


I have four tests, executed junit on it. 2 and 4 tests are failed. I need to log only failed test cases in to text file.

So that I can send email of only failed test log.
---------------------------------------------------------------------------------------------------------
<target name="RunUnitTests" >
<junit printsummary="yes" fork="yes" maxmemory="256M" haltonfailure="no" failureproperty="junit.failure" showoutput="yes" >
<!-- <classpath refid="java.class.path" /> -->

<classpath>
<pathelement pssath="${basedir}\bin\java" />
</classpath>

<batchtest fork="yes" todir="${result.dir}">
<formatter type="xml" usefile="true" />
<formatter type="brief" usefile="true" />
</batchtest>
</junit>
</target>
---------------------------------------------------------------------------------------------------------
The log should not contain any data of successful test , it should only have brief data of failed test cases.
---------------------------------------------------------------------------------------------------------
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic