com.beust.testng
Class TestListenerAdapter

java.lang.Object
  extended by com.beust.testng.TestListenerAdapter
All Implemented Interfaces:
ITestListener

public class TestListenerAdapter
extends java.lang.Object
implements ITestListener

Simple ITestListener adapter.

Author:
Cedric Beust, Aug 6, 2004

Constructor Summary
TestListenerAdapter()
           
 
Method Summary
protected  ITestNGMethod[] getAllTestMethods()
           
 java.util.List<ITestResult> getFailedButWithinSuccessPercentageTests()
           
 java.util.List<ITestResult> getFailedTests()
           
 java.util.List<ITestResult> getPassedTests()
           
 java.util.List<ITestResult> getSkippedTests()
           
 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 tr)
          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 tr)
          Invoked each time a test fails.
 void onTestSkipped(ITestResult tr)
          Invoked each time a test is skipped.
 void onTestSuccess(ITestResult tr)
          Invoked each time a test succeeds.
 void setAllTestMethods(java.util.List<ITestNGMethod> allTestMethods)
           
 void setFailedButWithinSuccessPercentageTests(java.util.List<ITestResult> failedButWithinSuccessPercentageTests)
           
 void setFailedTests(java.util.List<ITestResult> failedTests)
           
 void setPassedTests(java.util.List<ITestResult> passedTests)
           
 void setSkippedTests(java.util.List<ITestResult> skippedTests)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestListenerAdapter

public TestListenerAdapter()
Method Detail

onTestSuccess

public void onTestSuccess(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time a test succeeds.

Specified by:
onTestSuccess in interface ITestListener

onTestFailure

public void onTestFailure(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time a test fails.

Specified by:
onTestFailure in interface ITestListener

onTestSkipped

public void onTestSkipped(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time a test is skipped.

Specified by:
onTestSkipped in interface ITestListener

onTestFailedButWithinSuccessPercentage

public void onTestFailedButWithinSuccessPercentage(ITestResult tr)
Description copied from interface: ITestListener
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

getAllTestMethods

protected ITestNGMethod[] getAllTestMethods()

onStart

public void onStart(ITestContext context)
Description copied from interface: ITestListener
Invoked after the test class is instantiated and before any configuration method is called.

Specified by:
onStart in interface ITestListener

onFinish

public void onFinish(ITestContext context)
Description copied from interface: ITestListener
Invoked after all the tests have run and all their Configuration methods have been called.

Specified by:
onFinish in interface ITestListener

getFailedButWithinSuccessPercentageTests

public java.util.List<ITestResult> getFailedButWithinSuccessPercentageTests()
Returns:
Returns the failedButWithinSuccessPercentageTests.

getFailedTests

public java.util.List<ITestResult> getFailedTests()
Returns:
Returns the failedTests.

getPassedTests

public java.util.List<ITestResult> getPassedTests()
Returns:
Returns the passedTests.

getSkippedTests

public java.util.List<ITestResult> getSkippedTests()
Returns:
Returns the skippedTests.

setAllTestMethods

public void setAllTestMethods(java.util.List<ITestNGMethod> allTestMethods)
Parameters:
allTestMethods - The allTestMethods to set.

setFailedButWithinSuccessPercentageTests

public void setFailedButWithinSuccessPercentageTests(java.util.List<ITestResult> failedButWithinSuccessPercentageTests)
Parameters:
failedButWithinSuccessPercentageTests - The failedButWithinSuccessPercentageTests to set.

setFailedTests

public void setFailedTests(java.util.List<ITestResult> failedTests)
Parameters:
failedTests - The failedTests to set.

setPassedTests

public void setPassedTests(java.util.List<ITestResult> passedTests)
Parameters:
passedTests - The passedTests to set.

setSkippedTests

public void setSkippedTests(java.util.List<ITestResult> skippedTests)
Parameters:
skippedTests - The skippedTests to set.