public class TestNGMethod extends BaseTestMethod
Modifier and Type | Field and Description |
---|---|
private IDataProviderMethod |
dataProviderMethod |
private boolean |
isDataDriven |
private CustomAttribute[] |
m_attributes |
private int |
m_invocationCount |
private int |
m_successPercentage |
private int |
m_threadPoolSize |
m_afterGroups, m_annotationFinder, m_beforeGroups, m_currentInvocationCount, m_date, m_groups, m_groupsDependedUpon, m_id, m_method, m_methodClass, m_methodsDependedUpon, m_testClass
Modifier | Constructor and Description |
---|---|
private |
TestNGMethod(java.lang.reflect.Method method,
IAnnotationFinder finder,
boolean initialize,
XmlTest xmlTest,
java.lang.Object instance) |
|
TestNGMethod(java.lang.reflect.Method method,
IAnnotationFinder finder,
XmlTest xmlTest,
java.lang.Object instance)
Constructs a
TestNGMethod |
Modifier and Type | Method and Description |
---|---|
private boolean |
classNameMatcher(XmlClass xmlClass) |
BaseTestMethod |
clone()
Clones the current
TestNGMethod and its @BeforeMethod and @AfterMethod methods. |
private static ITestNGMethod[] |
clone(ITestNGMethod[] sources) |
private static IRetryAnalyzer |
cloneInstance(IRetryAnalyzer instance) |
private static boolean |
doesTestAnnotationHaveADataProvider(ITestAnnotation testAnnotation) |
private java.lang.String |
findDescription(ITestAnnotation testAnnotation,
XmlTest xmlTest) |
CustomAttribute[] |
getAttributes() |
IDataProviderMethod |
getDataProviderMethod() |
int |
getInvocationCount() |
int |
getSuccessPercentage()
Default value for successPercentage.
|
int |
getThreadPoolSize() |
private void |
init(XmlTest xmlTest) |
boolean |
isDataDriven() |
boolean |
isTest() |
private boolean |
methodNameMatcher(XmlInclude xmlInclude) |
void |
setDataProviderMethod(IDataProviderMethod dataProviderMethod) |
void |
setInvocationCount(int counter)
Sets the number of invocations for this method.
|
void |
setThreadPoolSize(int threadPoolSize)
Sets the number of threads on which this method should be invoked.
|
addFailedInvocationNumber, addMethodDependedUpon, canRunFromClass, equals, findMethodParameters, getAfterGroups, getAnnotationFinder, getBeforeGroups, getConstructorOrMethod, getCurrentInvocationCount, getDate, getDescription, getEnabled, getFactoryMethodParamsInfo, getFailedInvocationNumbers, getGroups, getGroupsDependedUpon, getIClass, getId, getInstance, getInstanceHashCodes, getInterceptedPriority, getInvocationNumbers, getInvocationTimeOut, getMethodName, getMethodsDependedUpon, getMissingGroup, getParameterInvocationCount, getPriority, getQualifiedName, getRealClass, getRetryAnalyzer, getRetryAnalyzer, getRetryAnalyzerClass, getSignature, getSimpleName, getStringArray, getTestClass, getTimeOut, getXmlTest, hashCode, hasMoreInvocation, ignoreMissingDependencies, incrementCurrentInvocationCount, initBeforeAfterGroups, initGroups, isAfterClassConfiguration, isAfterGroupsConfiguration, isAfterMethodConfiguration, isAfterSuiteConfiguration, isAfterTestConfiguration, isAlwaysRun, isBeforeClassConfiguration, isBeforeGroupsConfiguration, isBeforeMethodConfiguration, isBeforeSuiteConfiguration, isBeforeTestConfiguration, setAlwaysRun, setDate, setDescription, setEnabled, setGroups, setGroupsDependedUpon, setId, setIgnoreMissingDependencies, setInterceptedPriority, setInvocationNumbers, setInvocationTimeOut, setMethodsDependedUpon, setMissingGroup, setMoreInvocationChecker, setParameterInvocationCount, setPriority, setRetryAnalyzer, setRetryAnalyzerClass, setSkipFailedInvocations, setTestClass, setTimeOut, setXmlTest, skipFailedInvocations, stringify, toString
private int m_threadPoolSize
private int m_invocationCount
private int m_successPercentage
private boolean isDataDriven
private CustomAttribute[] m_attributes
private IDataProviderMethod dataProviderMethod
public TestNGMethod(java.lang.reflect.Method method, IAnnotationFinder finder, XmlTest xmlTest, java.lang.Object instance)
TestNGMethod
private TestNGMethod(java.lang.reflect.Method method, IAnnotationFinder finder, boolean initialize, XmlTest xmlTest, java.lang.Object instance)
public int getInvocationCount()
getInvocationCount
in interface ITestNGMethod
getInvocationCount
in class BaseTestMethod
public int getSuccessPercentage()
getSuccessPercentage
in interface ITestNGMethod
getSuccessPercentage
in class BaseTestMethod
public boolean isTest()
isTest
in interface ITestNGMethod
isTest
in class BaseTestMethod
private void init(XmlTest xmlTest)
private static boolean doesTestAnnotationHaveADataProvider(ITestAnnotation testAnnotation)
private java.lang.String findDescription(ITestAnnotation testAnnotation, XmlTest xmlTest)
private boolean classNameMatcher(XmlClass xmlClass)
private boolean methodNameMatcher(XmlInclude xmlInclude)
public int getThreadPoolSize()
getThreadPoolSize
in interface ITestNGMethod
getThreadPoolSize
in class BaseTestMethod
public void setThreadPoolSize(int threadPoolSize)
setThreadPoolSize
in interface ITestNGMethod
setThreadPoolSize
in class BaseTestMethod
public void setInvocationCount(int counter)
setInvocationCount
in interface ITestNGMethod
setInvocationCount
in class BaseTestMethod
public BaseTestMethod clone()
TestNGMethod
and its @BeforeMethod and @AfterMethod methods.clone
in interface ITestNGMethod
clone
in class BaseTestMethod
BaseTestMethod.clone()
private static ITestNGMethod[] clone(ITestNGMethod[] sources)
private static IRetryAnalyzer cloneInstance(IRetryAnalyzer instance)
public boolean isDataDriven()
public CustomAttribute[] getAttributes()
CustomAttribute
that represents the custom attributes associated
with a test.public IDataProviderMethod getDataProviderMethod()
IDataProviderMethod
for a data provider powered test method and
null
otherwise.public void setDataProviderMethod(IDataProviderMethod dataProviderMethod)