org.fest.swing.testng.listener
Class AbstractTestListener

java.lang.Object
  extended by org.fest.swing.testng.listener.AbstractTestListener
All Implemented Interfaces:
ITestListener, ITestNGListener
Direct Known Subclasses:
ScreenshotOnFailureListener

public abstract class AbstractTestListener
extends Object
implements ITestListener

Understands a base class for TestNG listeners.

Author:
Alex Ruiz

Constructor Summary
AbstractTestListener()
           
 
Method Summary
 void onFinish(ITestContext context)
          Invoked after all the tests have run and all their Configuration methods have been called.
 void onStart(ITestContext context)
          Invoked after the test class is instantiated and before any configuration method is called.
 void onTestFailedButWithinSuccessPercentage(ITestResult result)
          Invoked each time a method fails but has been annotated with successPercentage and this failure still keeps it within the success percentage requested.
 void onTestFailure(ITestResult result)
          Invoked each time a test fails.
 void onTestSkipped(ITestResult result)
          Invoked each time a test is skipped.
 void onTestStart(ITestResult result)
          Invoked each time before a test will be invoked.
 void onTestSuccess(ITestResult result)
          Invoked each time a test succeeds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTestListener

public AbstractTestListener()
Method Detail

onStart

public void onStart(ITestContext context)
Invoked after the test class is instantiated and before any configuration method is called.

Specified by:
onStart in interface ITestListener
Parameters:
context - test context containing all the information for a given test run.

onFinish

public void onFinish(ITestContext context)
Invoked after all the tests have run and all their Configuration methods have been called.

Specified by:
onFinish in interface ITestListener
Parameters:
context - test context containing all the information for a given test run.

onTestFailedButWithinSuccessPercentage

public void onTestFailedButWithinSuccessPercentage(ITestResult result)
Invoked each time a method fails but has been annotated with successPercentage and this failure still keeps it within the success percentage requested.

Specified by:
onTestFailedButWithinSuccessPercentage in interface ITestListener
Parameters:
result - contains information about the run test.

onTestStart

public void onTestStart(ITestResult result)
Invoked each time before a test will be invoked. The ITestResult is only partially filled with the references to class, method, start millis and status.

Specified by:
onTestStart in interface ITestListener
Parameters:
result - the partially filled test result.

onTestSuccess

public void onTestSuccess(ITestResult result)
Invoked each time a test succeeds.

Specified by:
onTestSuccess in interface ITestListener
Parameters:
result - contains information about the run test.

onTestFailure

public void onTestFailure(ITestResult result)
Invoked each time a test fails.

Specified by:
onTestFailure in interface ITestListener
Parameters:
result - contains information about the run test.

onTestSkipped

public void onTestSkipped(ITestResult result)
Invoked each time a test is skipped.

Specified by:
onTestSkipped in interface ITestListener
Parameters:
result - contains information about the run test.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.