public class TestResult extends Object implements ITestResult
CREATED, FAILURE, SKIP, STARTED, SUCCESS, SUCCESS_PERCENTAGE_FAILUREclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwasFailureDueToTimeoutpublic static TestResult newEmptyTestResult()
public static TestResult newTestResultFor(ITestNGMethod method)
public static TestResult newContextAwareTestResult(ITestNGMethod method, ITestContext ctx)
public static TestResult newTestResultWithCauseAs(ITestNGMethod method, ITestContext ctx, Throwable t)
public static TestResult newEndTimeAwareTestResult(ITestNGMethod method, ITestContext ctx, Throwable t, long start)
public static TestResult newTestResultFrom(TestResult result, ITestNGMethod method, ITestContext ctx, long start)
public void setEndMillis(long millis)
setEndMillis in interface ITestResultpublic String getTestName()
getTestName in interface ITestResultpublic String getName()
getName in interface ITestResultpublic ITestNGMethod getMethod()
getMethod in interface ITestResultpublic void setMethod(ITestNGMethod method)
method - The method to set.public int getStatus()
getStatus in interface ITestResultpublic void setStatus(int status)
setStatus in interface ITestResultstatus - The status to set.public boolean isSuccess()
isSuccess in interface ITestResultpublic IClass getTestClass()
getTestClass in interface ITestResultpublic Throwable getThrowable()
getThrowable in interface ITestResultpublic void setThrowable(Throwable throwable)
setThrowable in interface ITestResultthrowable - The throwable to set.public long getEndMillis()
getEndMillis in interface ITestResultpublic long getStartMillis()
getStartMillis in interface ITestResultpublic String getHost()
getHost in interface ITestResultpublic void setHost(String host)
public Object[] getParameters()
getParameters in interface ITestResultpublic void setParameters(Object[] parameters)
setParameters in interface ITestResultpublic Object getInstance()
getInstance in interface ITestResultpublic Object[] getFactoryParameters()
getFactoryParameters in interface ITestResultpublic Object getAttribute(String name)
getAttribute in interface IAttributesname - The name of the attribute to returnpublic void setAttribute(String name, Object value)
IAttributessetAttribute in interface IAttributesname - The attribute namevalue - The attribute valuepublic Set<String> getAttributeNames()
getAttributeNames in interface IAttributespublic Object removeAttribute(String name)
IAttributesremoveAttribute in interface IAttributesname - The attribute namepublic ITestContext getTestContext()
getTestContext in interface ITestResultITestContext for this test result.public void setContext(ITestContext context)
public int compareTo(@Nonnull ITestResult comparison)
compareTo in interface Comparable<ITestResult>public String getInstanceName()
getInstanceName in interface ITestResultpublic void setTestName(String name)
setTestName in interface ITestResultname - - The new name to be used as a test namepublic void setParameterIndex(int parameterIndex)
public int getParameterIndex()
public boolean wasRetried()
wasRetried in interface ITestResulttrue if the test was retried again by an implementation of IRetryAnalyzerpublic void setWasRetried(boolean wasRetried)
setWasRetried in interface ITestResultwasRetried - - true if the test was retried and false otherwise.public List<ITestNGMethod> getSkipCausedBy()
getSkipCausedBy in interface ITestResultpublic String id()
id in interface ITestResultpublic static void copyAttributes(ITestResult source, ITestResult target)
Copyright © 2025. All rights reserved.