org.easetech.easytest.runner
Class EasyTestRunListener

java.lang.Object
  extended by org.junit.runner.notification.RunListener
      extended by org.easetech.easytest.runner.EasyTestRunListener
Direct Known Subclasses:
TestRunDurationListener

public class EasyTestRunListener
extends org.junit.runner.notification.RunListener

Currently just a placeholder class that will be used later to factor out some common logic from the Runner class.

Author:
Anuj Kumar

Field Summary
protected static org.slf4j.Logger LOG
          An instance of logger associated with the test framework.
 
Constructor Summary
EasyTestRunListener()
           
 
Method Summary
 void testAssumptionFailure(org.junit.runner.notification.Failure failure)
          Called when an atomic test flags that it assumes a condition that is false
 void testFailure(org.junit.runner.notification.Failure failure)
          Called when an atomic test fails.
 void testFinished(org.junit.runner.Description description)
          Called when an atomic test has finished, whether the test succeeds or fails.
 void testIgnored(org.junit.runner.Description description)
          Called when a test will not be run, generally because a test method is annotated with Ignore.
 void testRunFinished(org.junit.runner.Result result)
          Called when all tests have finished
 void testRunStarted(org.junit.runner.Description description)
          Called before any tests have been run.
 void testStarted(org.junit.runner.Description description)
          Called when an atomic test is about to be started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
An instance of logger associated with the test framework.

Constructor Detail

EasyTestRunListener

public EasyTestRunListener()
Method Detail

testRunStarted

public void testRunStarted(org.junit.runner.Description description)
                    throws Exception
Called before any tests have been run.

Overrides:
testRunStarted in class org.junit.runner.notification.RunListener
Parameters:
description - describes the tests to be run
Throws:
Exception

testRunFinished

public void testRunFinished(org.junit.runner.Result result)
                     throws Exception
Called when all tests have finished

Overrides:
testRunFinished in class org.junit.runner.notification.RunListener
Parameters:
result - the summary of the test run, including all the tests that failed
Throws:
Exception

testStarted

public void testStarted(org.junit.runner.Description description)
                 throws Exception
Called when an atomic test is about to be started.

Overrides:
testStarted in class org.junit.runner.notification.RunListener
Parameters:
description - the description of the test that is about to be run (generally a class and method name)
Throws:
Exception

testFinished

public void testFinished(org.junit.runner.Description description)
                  throws Exception
Called when an atomic test has finished, whether the test succeeds or fails.

Overrides:
testFinished in class org.junit.runner.notification.RunListener
Parameters:
description - the description of the test that just ran
Throws:
Exception

testFailure

public void testFailure(org.junit.runner.notification.Failure failure)
                 throws Exception
Called when an atomic test fails.

Overrides:
testFailure in class org.junit.runner.notification.RunListener
Parameters:
failure - describes the test that failed and the exception that was thrown
Throws:
Exception

testAssumptionFailure

public void testAssumptionFailure(org.junit.runner.notification.Failure failure)
Called when an atomic test flags that it assumes a condition that is false

Overrides:
testAssumptionFailure in class org.junit.runner.notification.RunListener
Parameters:
failure - describes the test that failed and the AssumptionViolatedException that was thrown

testIgnored

public void testIgnored(org.junit.runner.Description description)
                 throws Exception
Called when a test will not be run, generally because a test method is annotated with Ignore.

Overrides:
testIgnored in class org.junit.runner.notification.RunListener
Parameters:
description - describes the test that will not be run
Throws:
Exception


Copyright © 2013. All Rights Reserved.