public class TestMethodWorker extends java.lang.Object implements IWorker<ITestNGMethod>
Modifier and Type | Field and Description |
---|---|
private ClassMethodMap |
m_classMethodMap |
private ConfigurationGroupMethods |
m_groupMethods |
private IInvoker |
m_invoker |
private java.util.List<IClassListener> |
m_listeners |
private java.util.List<IMethodInstance> |
m_methodInstances |
private java.util.Map<java.lang.String,java.lang.String> |
m_parameters |
private XmlSuite |
m_suite |
private ITestContext |
m_testContext |
private java.util.List<ITestResult> |
m_testResults |
Constructor and Description |
---|
TestMethodWorker(IInvoker invoker,
java.util.List<IMethodInstance> testMethods,
XmlSuite suite,
java.util.Map<java.lang.String,java.lang.String> parameters,
ConfigurationGroupMethods groupMethods,
ClassMethodMap classMethodMap,
ITestContext testContext,
java.util.List<IClassListener> listeners) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IWorker<ITestNGMethod> other) |
int |
getPriority()
The priority of a worker is the priority of the first method it's going to run.
|
java.util.List<ITestNGMethod> |
getTasks() |
java.util.List<ITestResult> |
getTestResults() |
long |
getTimeOut()
Retrieves the maximum specified timeout of all ITestNGMethods to
be run.
|
protected int |
indexOf(ITestNGMethod tm,
ITestNGMethod[] allTestMethods) |
protected void |
invokeAfterClassMethods(ITestClass testClass,
IMethodInstance mi)
Invoke the @AfterClass methods if not done already
|
protected void |
invokeBeforeClassMethods(ITestClass testClass,
IMethodInstance mi)
Invoke the @BeforeClass methods if not done already
|
protected void |
invokeTestMethods(ITestNGMethod tm,
java.lang.Object instance,
ITestContext testContext) |
void |
run()
Run all the ITestNGMethods passed in through the constructor.
|
java.lang.String |
toString() |
private java.util.List<IMethodInstance> m_methodInstances
private final IInvoker m_invoker
private final java.util.Map<java.lang.String,java.lang.String> m_parameters
private final XmlSuite m_suite
private java.util.List<ITestResult> m_testResults
private final ConfigurationGroupMethods m_groupMethods
private final ClassMethodMap m_classMethodMap
private final ITestContext m_testContext
private final java.util.List<IClassListener> m_listeners
public TestMethodWorker(IInvoker invoker, java.util.List<IMethodInstance> testMethods, XmlSuite suite, java.util.Map<java.lang.String,java.lang.String> parameters, ConfigurationGroupMethods groupMethods, ClassMethodMap classMethodMap, ITestContext testContext, java.util.List<IClassListener> listeners)
public long getTimeOut()
getTimeOut
in interface IWorker<ITestNGMethod>
public java.lang.String toString()
toString
in class java.lang.Object
public void run()
run
in interface java.lang.Runnable
Runnable.run()
protected void invokeTestMethods(ITestNGMethod tm, java.lang.Object instance, ITestContext testContext)
protected void invokeBeforeClassMethods(ITestClass testClass, IMethodInstance mi)
testClass
- mi
- protected void invokeAfterClassMethods(ITestClass testClass, IMethodInstance mi)
testClass
- mi
- protected int indexOf(ITestNGMethod tm, ITestNGMethod[] allTestMethods)
public java.util.List<ITestResult> getTestResults()
public java.util.List<ITestNGMethod> getTasks()
getTasks
in interface IWorker<ITestNGMethod>
public int compareTo(IWorker<ITestNGMethod> other)
compareTo
in interface java.lang.Comparable<IWorker<ITestNGMethod>>
public int getPriority()
getPriority
in interface IWorker<ITestNGMethod>