org.testng.internal
Class TestResult
java.lang.Object
org.testng.internal.TestResult
- All Implemented Interfaces:
- java.io.Serializable, ITestResult
public class TestResult
- extends java.lang.Object
- implements ITestResult
This class represents the result of a test.
- Author:
- Cedric Beust, May 2, 2004
- See Also:
- Serialized Form
Constructor Summary |
TestResult(IClass testClass,
java.lang.Object instance,
ITestNGMethod method,
java.lang.Throwable throwable,
long start,
long end)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TestResult
public TestResult(IClass testClass,
java.lang.Object instance,
ITestNGMethod method,
java.lang.Throwable throwable,
long start,
long end)
- Parameters:
testClass
- instance
- method
- throwable
- start
- end
-
setEndMillis
public void setEndMillis(long millis)
- Specified by:
setEndMillis
in interface ITestResult
getName
public java.lang.String getName()
- Specified by:
getName
in interface ITestResult
- Returns:
- The name of this TestResult, typically identical to the name
of the method.
getMethod
public ITestNGMethod getMethod()
- Specified by:
getMethod
in interface ITestResult
- Returns:
- Returns the method.
setMethod
public void setMethod(ITestNGMethod method)
- Parameters:
method
- The method to set.
getStatus
public int getStatus()
- Specified by:
getStatus
in interface ITestResult
- Returns:
- Returns the status.
setStatus
public void setStatus(int status)
- Specified by:
setStatus
in interface ITestResult
- Parameters:
status
- The status to set.
isSuccess
public boolean isSuccess()
- Specified by:
isSuccess
in interface ITestResult
- Returns:
- true if if this test run is a SUCCESS
getTestClass
public IClass getTestClass()
- Specified by:
getTestClass
in interface ITestResult
- Returns:
- Returns the testClass.
setTestClass
public void setTestClass(IClass testClass)
- Parameters:
testClass
- The testClass to set.
getThrowable
public java.lang.Throwable getThrowable()
- Specified by:
getThrowable
in interface ITestResult
- Returns:
- Returns the throwable.
setThrowable
public void setThrowable(java.lang.Throwable throwable)
- Specified by:
setThrowable
in interface ITestResult
- Parameters:
throwable
- The throwable to set.
getEndMillis
public long getEndMillis()
- Specified by:
getEndMillis
in interface ITestResult
- Returns:
- Returns the endMillis.
getStartMillis
public long getStartMillis()
- Specified by:
getStartMillis
in interface ITestResult
- Returns:
- Returns the startMillis.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getHost
public java.lang.String getHost()
- Specified by:
getHost
in interface ITestResult
- Returns:
- The host where this suite was run, or null if it was run locally. The
returned string has the form: host:port
setHost
public void setHost(java.lang.String host)
getParameters
public java.lang.Object[] getParameters()
- Specified by:
getParameters
in interface ITestResult
- Returns:
- The parameters this method was invoked with.
setParameters
public void setParameters(java.lang.Object[] parameters)
- Specified by:
setParameters
in interface ITestResult
Copyright © 2010. All Rights Reserved.