public class TestListener extends Object implements org.testng.ITestListener, org.testng.IClassListener, org.testng.ISuiteListener, org.testng.IConfigurationListener
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSOLE_PAGESOURCE_ON_FAIL |
static String |
FAILED_RERUN_OPTION |
static String |
FAILED_RERUN_SUITE_NAME |
static List<String> |
FAILED_RERUN_SUITE_PASSED_TESTS |
static String |
GLOBAL_SKIP_TESTS |
static String |
GLOBAL_SKIP_TESTS_MESSAGE |
static boolean |
isTestNG |
static String |
PARALLEL_TEST_TYPE |
| Constructor and Description |
|---|
TestListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupProcessess()
kills all process for clean start
|
String |
generateTestMessage(org.testng.ITestContext iTestContext) |
void |
onAfterClass(org.testng.ITestClass testClass) |
void |
onBeforeClass(org.testng.ITestClass testClass) |
void |
onConfigurationFailure(org.testng.ITestResult itr) |
void |
onConfigurationSkip(org.testng.ITestResult itr) |
void |
onConfigurationSuccess(org.testng.ITestResult itr) |
void |
onFinish(org.testng.ISuite suite) |
void |
onFinish(org.testng.ITestContext iTestContext)
After ending all tests, below method runs.
|
void |
onStart(org.testng.ISuite suite)
onStart (suite) runs before onStart(ItestContext)
|
void |
onStart(org.testng.ITestContext iTestContext) |
void |
onTestFailedButWithinSuccessPercentage(org.testng.ITestResult iTestResult) |
void |
onTestFailure(org.testng.ITestResult iTestResult) |
void |
onTestSkipped(org.testng.ITestResult iTestResult) |
void |
onTestStart(org.testng.ITestResult iTestResult) |
void |
onTestSuccess(org.testng.ITestResult iTestResult) |
void |
runFailedTests(org.testng.ISuite suite)
runs failed tests at end of suite
updates junit report and extent test report
areas affected: JunitReportReporter.java, ExtentManager.java
|
void |
setTestClassName(org.testng.ITestResult iTestResult) |
public static boolean isTestNG
public static final String PARALLEL_TEST_TYPE
public static final String CONSOLE_PAGESOURCE_ON_FAIL
public static final String GLOBAL_SKIP_TESTS
public static final String GLOBAL_SKIP_TESTS_MESSAGE
public static final String FAILED_RERUN_SUITE_NAME
public static final String FAILED_RERUN_OPTION
public void onStart(org.testng.ITestContext iTestContext)
onStart in interface org.testng.ITestListenerpublic void onFinish(org.testng.ITestContext iTestContext)
onFinish in interface org.testng.ITestListenerpublic void onTestStart(org.testng.ITestResult iTestResult)
onTestStart in interface org.testng.ITestListenerpublic void onTestSuccess(org.testng.ITestResult iTestResult)
onTestSuccess in interface org.testng.ITestListenerpublic void onTestFailure(org.testng.ITestResult iTestResult)
onTestFailure in interface org.testng.ITestListenerpublic void onTestSkipped(org.testng.ITestResult iTestResult)
onTestSkipped in interface org.testng.ITestListenerpublic void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult iTestResult)
onTestFailedButWithinSuccessPercentage in interface org.testng.ITestListenerpublic void cleanupProcessess()
public String generateTestMessage(org.testng.ITestContext iTestContext)
public void onBeforeClass(org.testng.ITestClass testClass)
onBeforeClass in interface org.testng.IClassListenerpublic void onAfterClass(org.testng.ITestClass testClass)
onAfterClass in interface org.testng.IClassListenerpublic void onConfigurationSuccess(org.testng.ITestResult itr)
onConfigurationSuccess in interface org.testng.IConfigurationListenerpublic void onConfigurationFailure(org.testng.ITestResult itr)
onConfigurationFailure in interface org.testng.IConfigurationListenerpublic void onConfigurationSkip(org.testng.ITestResult itr)
onConfigurationSkip in interface org.testng.IConfigurationListenerpublic void setTestClassName(org.testng.ITestResult iTestResult)
public void onStart(org.testng.ISuite suite)
onStart in interface org.testng.ISuiteListenerpublic void onFinish(org.testng.ISuite suite)
onFinish in interface org.testng.ISuiteListenerpublic void runFailedTests(org.testng.ISuite suite)
Copyright © 2020. All rights reserved.