public class RetryTest extends Object implements org.junit.rules.TestRule
| Modifier and Type | Class and Description |
|---|---|
static class |
RetryTest.ReportType |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
enableRetry |
static String[] |
PageErrors |
static int |
RETRYCOUNTER |
org.openqa.selenium.WebDriver |
webDriver |
| Constructor and Description |
|---|
RetryTest(int retryCount) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
void |
errorHandling(Throwable t)
error handling When test fails if any of the defined errors specified by
PageErrors exists, Then the test will be retried
|
static ArrayList<String> |
getAllFiles(File curDir) |
int |
getCurrentTestRun() |
void |
getPageSource()
print page source
|
int |
getRetryCount() |
static String |
getStackTrace(Throwable throwable)
gets the stack trace of the failure
|
com.aventstack.extentreports.ExtentTest |
getStep() |
com.aventstack.extentreports.ExtentTest |
getTest() |
void |
logReport(RetryTest.ReportType type,
String value,
Throwable t) |
boolean |
pageHasError(Throwable t)
returns true if any of the error types specified is caught
|
void |
processTestResult(org.junit.runner.Description description) |
void |
randomFailStack(ArrayList<String> FailTrace,
org.junit.runner.Description description) |
void |
setExtendReport(com.aventstack.extentreports.ExtentTest test,
com.aventstack.extentreports.ExtentTest step,
com.aventstack.extentreports.ExtentReports extent) |
void |
setRetryCount(int retryCount) |
void |
setTestId(org.junit.runner.Description description) |
void |
setWebDriver(org.openqa.selenium.WebDriver driver) |
void |
takeAppcenterScreenshot(String label) |
void |
writeToTestReport() |
public static final String[] PageErrors
public static final int RETRYCOUNTER
public static boolean enableRetry
public org.openqa.selenium.WebDriver webDriver
public void setRetryCount(int retryCount)
public int getRetryCount()
public int getCurrentTestRun()
public void setExtendReport(com.aventstack.extentreports.ExtentTest test,
com.aventstack.extentreports.ExtentTest step,
com.aventstack.extentreports.ExtentReports extent)
public com.aventstack.extentreports.ExtentTest getTest()
public com.aventstack.extentreports.ExtentTest getStep()
public void setWebDriver(org.openqa.selenium.WebDriver driver)
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRulepublic void getPageSource()
public void setTestId(org.junit.runner.Description description)
public void takeAppcenterScreenshot(String label)
public void processTestResult(org.junit.runner.Description description)
throws Throwable
Throwablepublic void writeToTestReport()
public void logReport(RetryTest.ReportType type, String value, Throwable t)
public boolean pageHasError(Throwable t)
t - public void errorHandling(Throwable t)
t - public void randomFailStack(ArrayList<String> FailTrace, org.junit.runner.Description description)
public static String getStackTrace(Throwable throwable)
throwable - Copyright © 2021. All rights reserved.