com.carrotsearch.ant.tasks.junit4.listeners
Class TextReport

java.lang.Object
  extended by com.carrotsearch.ant.tasks.junit4.listeners.TextReport
All Implemented Interfaces:
AggregatedEventListener

public class TextReport
extends Object
implements AggregatedEventListener

A listener that will subscribe to test execution and dump informational info about the progress to the console or a text file.


Constructor Summary
TextReport()
           
 
Method Summary
 void onQuit(AggregatedQuitEvent e)
           
 void onStart(AggregatedStartEvent e)
           
 void onSuiteResult(AggregatedSuiteResultEvent e)
           
 void onTestResult(AggregatedTestResultEvent e)
           
 void setFile(File outputFile)
          Set an external file to write to.
 void setOuter(JUnit4 junit)
          Link to the container.
 void setShowErrorStream(boolean showErrorStream)
          Show error stream from tests.
 void setShowOutputStream(boolean showOutputStream)
          Show output stream from tests.
 void setShowStackTraces(boolean showStackTraces)
          Show stack trace information.
 void setShowStatusError(boolean showStatusError)
           
 void setShowStatusFailure(boolean showStatusFailure)
           
 void setShowStatusIgnored(boolean showStatusIgnored)
           
 void setShowStatusOk(boolean showStatusOk)
           
 void setShowSuiteSummary(boolean showSuiteSummary)
          If enabled, shows suite summaries in "maven-like" format of:
 void setShowThrowable(boolean showThrowable)
          If enabled, displays extended error information for tests that failed (exception class, message, stack trace, standard streams).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextReport

public TextReport()
Method Detail

setShowStatusError

public void setShowStatusError(boolean showStatusError)

setShowStatusFailure

public void setShowStatusFailure(boolean showStatusFailure)

setShowStatusIgnored

public void setShowStatusIgnored(boolean showStatusIgnored)

setShowStatusOk

public void setShowStatusOk(boolean showStatusOk)

setShowThrowable

public void setShowThrowable(boolean showThrowable)
If enabled, displays extended error information for tests that failed (exception class, message, stack trace, standard streams).

See Also:
setShowStackTraces(boolean), setShowOutputStream(boolean), setShowErrorStream(boolean)

setShowStackTraces

public void setShowStackTraces(boolean showStackTraces)
Show stack trace information.


setShowErrorStream

public void setShowErrorStream(boolean showErrorStream)
Show error stream from tests.


setShowOutputStream

public void setShowOutputStream(boolean showOutputStream)
Show output stream from tests.


setShowSuiteSummary

public void setShowSuiteSummary(boolean showSuiteSummary)
If enabled, shows suite summaries in "maven-like" format of:
 Running SuiteName
 [...suite tests if enabled...]
 Tests: xx, Failures: xx, Errors: xx, Skipped: xx, Time: xx sec [<<< FAILURES!]
 


setFile

public void setFile(File outputFile)
             throws IOException
Set an external file to write to.

Throws:
IOException

onTestResult

public void onTestResult(AggregatedTestResultEvent e)

onSuiteResult

public void onSuiteResult(AggregatedSuiteResultEvent e)

onStart

public void onStart(AggregatedStartEvent e)

onQuit

public void onQuit(AggregatedQuitEvent e)

setOuter

public void setOuter(JUnit4 junit)
Description copied from interface: AggregatedEventListener
Link to the container. Listener can throw BuildException if parameter validation doesn't succeed, for example.

Specified by:
setOuter in interface AggregatedEventListener


Copyright © 2011-2012 Carrot Search s.c.. All Rights Reserved.