public class TestMethodWorker extends Object implements IWorker<ITestNGMethod>
This class implements Runnable and will invoke the ITestMethod passed in its constructor on its run() method.
| Constructor and Description |
|---|
TestMethodWorker(ITestInvoker testInvoker,
IConfigInvoker configInvoker,
List<IMethodInstance> testMethods,
Map<String,String> parameters,
ConfigurationGroupMethods groupMethods,
ClassMethodMap classMethodMap,
ITestContext testContext,
List<IClassListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IWorker<ITestNGMethod> other) |
boolean |
completed() |
long |
getCurrentThreadId() |
int |
getPriority()
The priority of a worker is the priority of the first method it's going to run.
|
List<ITestNGMethod> |
getTasks() |
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,
Object instance) |
void |
run()
Run all the ITestNGMethods passed in through the constructor.
|
void |
setThreadIdToRunOn(long threadIdToRunOn) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetThreadIdToRunOnpublic TestMethodWorker(ITestInvoker testInvoker, IConfigInvoker configInvoker, List<IMethodInstance> testMethods, Map<String,String> parameters, ConfigurationGroupMethods groupMethods, ClassMethodMap classMethodMap, ITestContext testContext, List<IClassListener> listeners)
public long getTimeOut()
getTimeOut in interface IWorker<ITestNGMethod>public void run()
run in interface RunnableRunnable.run()protected void invokeTestMethods(ITestNGMethod tm, Object instance)
protected void invokeBeforeClassMethods(ITestClass testClass, IMethodInstance mi)
protected void invokeAfterClassMethods(ITestClass testClass, IMethodInstance mi)
protected int indexOf(ITestNGMethod tm, ITestNGMethod[] allTestMethods)
public List<ITestResult> getTestResults()
public List<ITestNGMethod> getTasks()
getTasks in interface IWorker<ITestNGMethod>public int compareTo(@Nonnull IWorker<ITestNGMethod> other)
compareTo in interface Comparable<IWorker<ITestNGMethod>>public int getPriority()
getPriority in interface IWorker<ITestNGMethod>public long getCurrentThreadId()
getCurrentThreadId in interface IWorker<ITestNGMethod>public void setThreadIdToRunOn(long threadIdToRunOn)
setThreadIdToRunOn in interface IWorker<ITestNGMethod>public boolean completed()
completed in interface IWorker<ITestNGMethod>Copyright © 2025. All rights reserved.