• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Log only junit failed tests to text file

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
---------------------------------------------------------------------------------------------------------
 
reply
    Bookmark Topic Watch Topic
  • New Topic