com.beust.testng
Interface ITestContext

All Known Implementing Classes:
TestRunner

public interface ITestContext

This class defines a test context which contains all the information for a given test run. An instance of this context is passed to the test listeners so they can query information about their environment.

Author:
Cedric Beust, Aug 6, 2004

Method Summary
 ITestNGMethod[] getAllTestMethods()
           
 java.util.Date getEndDate()
          When this test stopped running.
 java.lang.String[] getExcludedGroups()
           
 java.util.Map<ITestNGMethod,ITestResult> getFailedButWithinSuccessPercentageTests()
           
 java.util.Map<ITestNGMethod,ITestResult> getFailedTests()
           
 java.lang.String[] getIncludedGroups()
           
 java.lang.String getName()
          The name of this test.
 java.lang.String getOutputDirectory()
           
 java.util.Map<ITestNGMethod,ITestResult> getPassedTests()
           
 java.util.Map<ITestNGMethod,ITestResult> getSkippedTests()
           
 java.util.Date getStartDate()
          When this test started running.
 ISuite getSuite()
           
 

Method Detail

getName

java.lang.String getName()
The name of this test.


getStartDate

java.util.Date getStartDate()
When this test started running.


getEndDate

java.util.Date getEndDate()
When this test stopped running.


getPassedTests

java.util.Map<ITestNGMethod,ITestResult> getPassedTests()
Returns:
A list of all the tests that run successfully.

getSkippedTests

java.util.Map<ITestNGMethod,ITestResult> getSkippedTests()
Returns:
A list of all the tests that were skipped

getFailedButWithinSuccessPercentageTests

java.util.Map<ITestNGMethod,ITestResult> getFailedButWithinSuccessPercentageTests()
Returns:
A list of all the tests that failed but are being ignored because annotated with a successPercentage.

getFailedTests

java.util.Map<ITestNGMethod,ITestResult> getFailedTests()
Returns:
A map of all the tests that passed, indexed by their ITextMethor.
See Also:
ITestNGMethod

getIncludedGroups

java.lang.String[] getIncludedGroups()
Returns:
All the groups that are included for this test run.

getExcludedGroups

java.lang.String[] getExcludedGroups()
Returns:
All the groups that are excluded for this test run.

getOutputDirectory

java.lang.String getOutputDirectory()
Returns:
Where the reports will be generated.

getSuite

ISuite getSuite()
Returns:
The Suite object that was passed to the runner at start-up.

getAllTestMethods

ITestNGMethod[] getAllTestMethods()
Returns:
All the test methods that were run.