public interface ITestResult extends IAttributes, Comparable<ITestResult>
Modifier and Type | Field and Description |
---|---|
static int |
CREATED |
static int |
FAILURE |
static int |
SKIP |
static int |
STARTED |
static int |
SUCCESS |
static int |
SUCCESS_PERCENTAGE_FAILURE |
Modifier and Type | Method and Description |
---|---|
long |
getEndMillis() |
Object[] |
getFactoryParameters() |
String |
getHost() |
Object |
getInstance()
The instance on which this method was run.
|
String |
getInstanceName() |
ITestNGMethod |
getMethod() |
String |
getName() |
Object[] |
getParameters() |
default List<ITestNGMethod> |
getSkipCausedBy() |
long |
getStartMillis() |
int |
getStatus() |
IClass |
getTestClass() |
ITestContext |
getTestContext() |
String |
getTestName()
If this result's related instance implements ITest or use @Test(testName=...), returns its test
name, otherwise returns null.
|
Throwable |
getThrowable() |
boolean |
isSuccess() |
void |
setEndMillis(long millis) |
void |
setParameters(Object[] parameters) |
void |
setStatus(int status) |
void |
setTestName(String name) |
void |
setThrowable(Throwable throwable) |
void |
setWasRetried(boolean wasRetried) |
static boolean |
wasFailureDueToTimeout(ITestResult result) |
boolean |
wasRetried() |
getAttribute, getAttributeNames, removeAttribute, setAttribute
compareTo
static final int CREATED
static final int SUCCESS
static final int FAILURE
static final int SKIP
static final int SUCCESS_PERCENTAGE_FAILURE
static final int STARTED
int getStatus()
void setStatus(int status)
ITestNGMethod getMethod()
Object[] getParameters()
void setParameters(Object[] parameters)
IClass getTestClass()
Throwable getThrowable()
void setThrowable(Throwable throwable)
long getStartMillis()
long getEndMillis()
void setEndMillis(long millis)
String getName()
boolean isSuccess()
String getHost()
Object getInstance()
Object[] getFactoryParameters()
String getTestName()
String getInstanceName()
ITestContext getTestContext()
ITestContext
for this test result.void setTestName(String name)
name
- - The new name to be used as a test nameboolean wasRetried()
true
if the test was retried again by an implementation of IRetryAnalyzer
void setWasRetried(boolean wasRetried)
wasRetried
- - true
if the test was retried and false
otherwise.default List<ITestNGMethod> getSkipCausedBy()
static boolean wasFailureDueToTimeout(ITestResult result)
result
- - The test result of a methodtrue
if the test failure was due to a timeout.