public class RetryTest extends Object implements org.testng.IRetryAnalyzer
| Modifier and Type | Class and Description |
|---|---|
static class |
RetryTest.ReportType |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
enableRetry |
static List<String> |
errorList |
static List<ExcelObject> |
exceList |
static int |
login_success_withError |
static String[] |
PageErrors |
int |
retryCount |
static int |
userIndex |
| Constructor and Description |
|---|
RetryTest() |
| Modifier and Type | Method and Description |
|---|---|
int |
errorHandling(Throwable t)
error handling When test fails if any of the defined errors specified by
PageErrors exists, Then the test will be retried
|
com.aventstack.extentreports.ExtentTest |
getStep() |
com.aventstack.extentreports.ExtentTest |
getTest() |
String |
getTestId(org.testng.ITestResult iTestResult) |
void |
logError(String error) |
void |
logReport(RetryTest.ReportType type,
String value,
Throwable t) |
boolean |
pageHasError(Throwable t)
returns true if any of the error types specified is caught
|
int |
processTestResult()
if the max retry has not been reached, log the failure And quite the browser
|
void |
randomFailStack(ArrayList<String> FailTrace) |
boolean |
retry(org.testng.ITestResult iTestResult) |
void |
setExtendReport() |
void |
setExtendReport(com.aventstack.extentreports.ExtentTest test,
com.aventstack.extentreports.ExtentTest step) |
public static final String[] PageErrors
public static int userIndex
public static int login_success_withError
public static List<ExcelObject> exceList
public int retryCount
public static boolean enableRetry
public void setExtendReport(com.aventstack.extentreports.ExtentTest test,
com.aventstack.extentreports.ExtentTest step)
public void setExtendReport()
public com.aventstack.extentreports.ExtentTest getTest()
public com.aventstack.extentreports.ExtentTest getStep()
public boolean retry(org.testng.ITestResult iTestResult)
retry in interface org.testng.IRetryAnalyzerpublic String getTestId(org.testng.ITestResult iTestResult)
public int processTestResult()
public void logReport(RetryTest.ReportType type, String value, Throwable t)
public void logError(String error)
public boolean pageHasError(Throwable t)
t - public int errorHandling(Throwable t)
t - Copyright © 2019. All rights reserved.