public abstract class BaseTestMethod extends Object implements ITestNGMethod, IInvocationStatus
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
m_afterGroups |
protected IAnnotationFinder |
m_annotationFinder |
protected String[] |
m_beforeGroups |
protected AtomicInteger |
m_currentInvocationCount |
protected long |
m_date |
protected String[] |
m_groups |
protected String[] |
m_groupsDependedUpon |
protected String |
m_id |
protected ConstructorOrMethod |
m_method |
protected Class<?> |
m_methodClass |
protected String[] |
m_methodsDependedUpon |
protected ITestObjectFactory |
m_objectFactory |
protected ITestClass |
m_testClass
The test class on which the test method was found.
|
| Constructor and Description |
|---|
BaseTestMethod(ITestObjectFactory objectFactory,
String methodName,
ConstructorOrMethod com,
IAnnotationFinder annotationFinder,
Object instance) |
finalize, getClass, notify, notifyAll, wait, wait, waitgetAttributes, getDataProviderMethod, hasAfterGroupsConfiguration, hasBeforeGroupsConfiguration, isDataDrivenprotected ITestClass m_testClass
protected final Class<?> m_methodClass
protected final ConstructorOrMethod m_method
protected String m_id
protected long m_date
protected final IAnnotationFinder m_annotationFinder
protected String[] m_groups
protected String[] m_groupsDependedUpon
protected String[] m_methodsDependedUpon
protected String[] m_beforeGroups
protected String[] m_afterGroups
protected AtomicInteger m_currentInvocationCount
protected final ITestObjectFactory m_objectFactory
public BaseTestMethod(ITestObjectFactory objectFactory, String methodName, ConstructorOrMethod com, IAnnotationFinder annotationFinder, Object instance)
public boolean isAlwaysRun()
isAlwaysRun in interface ITestNGMethodprotected void setAlwaysRun(boolean alwaysRun)
public Class<?> getRealClass()
getRealClass in interface ITestNGMethodpublic ITestClass getTestClass()
getTestClass in interface ITestNGMethodpublic void setTestClass(ITestClass tc)
setTestClass in interface ITestNGMethodtc - The test class having this method.public String getMethodName()
getMethodName in interface ITestNGMethodpublic Object getInstance()
getInstance in interface ITestNGMethodpublic long[] getInstanceHashCodes()
getInstanceHashCodes in interface ITestNGMethodpublic String[] getGroups()
getGroups in interface ITestNGMethodpublic String[] getGroupsDependedUpon()
getGroupsDependedUpon in interface ITestNGMethodpublic String[] getMethodsDependedUpon()
getMethodsDependedUpon in interface ITestNGMethodpublic boolean isTest()
isTest in interface ITestNGMethodpublic boolean isBeforeSuiteConfiguration()
isBeforeSuiteConfiguration in interface ITestNGMethodpublic boolean isAfterSuiteConfiguration()
isAfterSuiteConfiguration in interface ITestNGMethodpublic boolean isBeforeTestConfiguration()
isBeforeTestConfiguration in interface ITestNGMethodtrue if this method is a @BeforeTest (@Configuration beforeTest=true)public boolean isAfterTestConfiguration()
isAfterTestConfiguration in interface ITestNGMethodtrue if this method is an @AfterTest (@Configuration afterTest=true)public boolean isBeforeGroupsConfiguration()
isBeforeGroupsConfiguration in interface ITestNGMethodpublic boolean isAfterGroupsConfiguration()
isAfterGroupsConfiguration in interface ITestNGMethodpublic boolean isBeforeClassConfiguration()
isBeforeClassConfiguration in interface ITestNGMethodpublic boolean isAfterClassConfiguration()
isAfterClassConfiguration in interface ITestNGMethodpublic boolean isBeforeMethodConfiguration()
isBeforeMethodConfiguration in interface ITestNGMethodpublic boolean isAfterMethodConfiguration()
isAfterMethodConfiguration in interface ITestNGMethodpublic long getTimeOut()
getTimeOut in interface ITestNGMethodpublic void setTimeOut(long timeOut)
setTimeOut in interface ITestNGMethodpublic int getInvocationCount()
getInvocationCount in interface ITestNGMethodpublic void setInvocationCount(int counter)
setInvocationCount in interface ITestNGMethodpublic int getSuccessPercentage()
getSuccessPercentage in interface ITestNGMethodpublic String getId()
getId in interface ITestNGMethodpublic void setId(String id)
setId in interface ITestNGMethodpublic long getDate()
getDate in interface ITestNGMethodpublic void setDate(long date)
setDate in interface ITestNGMethoddate - The date to set.public boolean canRunFromClass(IClass testClass)
canRunFromClass in interface ITestNGMethodtestClass - The test classpublic boolean equals(Object obj)
public int hashCode()
protected void initGroups(Class<? extends ITestOrConfiguration> annotationClass)
protected void initBeforeAfterGroups(Class<? extends ITestOrConfiguration> annotationClass, String[] groups)
protected IAnnotationFinder getAnnotationFinder()
protected IClass getIClass()
public String getSimpleName()
protected String getSignature()
protected void setGroups(String[] groups)
protected void setGroupsDependedUpon(String[] groups, Collection<String> xmlGroupDependencies)
protected void setMethodsDependedUpon(String[] methods)
public void addMethodDependedUpon(String method)
addMethodDependedUpon in interface ITestNGMethodpublic String getMissingGroup()
getMissingGroup in interface ITestNGMethodpublic void setMissingGroup(String group)
setMissingGroup in interface ITestNGMethodpublic int getThreadPoolSize()
getThreadPoolSize in interface ITestNGMethodpublic void setThreadPoolSize(int threadPoolSize)
setThreadPoolSize in interface ITestNGMethodpublic void setDescription(String description)
setDescription in interface ITestNGMethodpublic String getDescription()
getDescription in interface ITestNGMethodpublic void setEnabled(boolean enabled)
public boolean getEnabled()
getEnabled in interface ITestNGMethodpublic String[] getBeforeGroups()
getBeforeGroups in interface ITestNGMethodpublic String[] getAfterGroups()
getAfterGroups in interface ITestNGMethodpublic void incrementCurrentInvocationCount()
incrementCurrentInvocationCount in interface ITestNGMethodpublic int getCurrentInvocationCount()
getCurrentInvocationCount in interface ITestNGMethodpublic void setParameterInvocationCount(int n)
setParameterInvocationCount in interface ITestNGMethodpublic int getParameterInvocationCount()
getParameterInvocationCount in interface ITestNGMethodpublic void setMoreInvocationChecker(Callable<Boolean> moreInvocationChecker)
setMoreInvocationChecker in interface ITestNGMethodpublic boolean hasMoreInvocation()
hasMoreInvocation in interface ITestNGMethodpublic abstract ITestNGMethod clone()
clone in interface ITestNGMethodclone in class Objectpublic IRetryAnalyzer getRetryAnalyzer(ITestResult result)
getRetryAnalyzer in interface ITestNGMethodpublic void setRetryAnalyzerClass(Class<? extends IRetryAnalyzer> clazz)
setRetryAnalyzerClass in interface ITestNGMethodpublic Class<? extends IRetryAnalyzer> getRetryAnalyzerClass()
getRetryAnalyzerClass in interface ITestNGMethodpublic boolean skipFailedInvocations()
skipFailedInvocations in interface ITestNGMethodpublic void setSkipFailedInvocations(boolean s)
setSkipFailedInvocations in interface ITestNGMethodpublic void setInvocationTimeOut(long timeOut)
public long getInvocationTimeOut()
getInvocationTimeOut in interface ITestNGMethodpublic boolean ignoreMissingDependencies()
ignoreMissingDependencies in interface ITestNGMethodpublic void setIgnoreMissingDependencies(boolean i)
setIgnoreMissingDependencies in interface ITestNGMethodpublic List<Integer> getInvocationNumbers()
ITestNGMethod<include invocationNumbers="...">
tag.getInvocationNumbers in interface ITestNGMethodpublic void setInvocationNumbers(List<Integer> numbers)
setInvocationNumbers in interface ITestNGMethodpublic List<Integer> getFailedInvocationNumbers()
getFailedInvocationNumbers in interface ITestNGMethodpublic void addFailedInvocationNumber(int number)
ITestNGMethodaddFailedInvocationNumber in interface ITestNGMethodnumber - The invocation number that failedpublic int getPriority()
ITestNGMethodgetPriority in interface ITestNGMethodpublic void setPriority(int priority)
setPriority in interface ITestNGMethodpublic int getInterceptedPriority()
getInterceptedPriority in interface ITestNGMethodpublic void setInterceptedPriority(int priority)
setInterceptedPriority in interface ITestNGMethodpublic XmlTest getXmlTest()
getXmlTest in interface ITestNGMethodpublic void setXmlTest(XmlTest xmlTest)
public ConstructorOrMethod getConstructorOrMethod()
getConstructorOrMethod in interface ITestNGMethodpublic Class<?>[] getParameterTypes()
getParameterTypes in interface ITestNGMethodpublic Map<String,String> findMethodParameters(XmlTest test)
findMethodParameters in interface ITestNGMethodtest - - The XmlTest object.public String getQualifiedName()
ITestNGMethodgetQualifiedName in interface ITestNGMethodpublic IParameterInfo getFactoryMethodParamsInfo()
getFactoryMethodParamsInfo in interface ITestNGMethodIParameterInfo object that represents details about the parameters
associated with the factory method.public void setInvokedAt(long date)
setInvokedAt in interface IInvocationStatusdate - - The timestamp at which a method was invoked.public long getInvocationTime()
getInvocationTime in interface IInvocationStatusCopyright © 2025. All rights reserved.