Top Description Fields Constructors Methods
org.testng.internal

public Class WrappedTestNGMethod

extends Object
implements ITestNGMethod, IInstanceIdentity
Class Inheritance
All Implemented Interfaces
org.testng.internal.IInstanceIdentity, org.testng.ITestNGMethod, java.lang.Cloneable
Imports
java.util.List, .Map, .Random, .UUID, java.util.concurrent.Callable, org.testng.IClass, .IRetryAnalyzer, .ITestClass, .ITestNGMethod, .ITestResult, org.testng.xml.XmlTest

Represents a proxy for an actual instance of ITestNGMethod but with the exception that it generates a unique hashcode that is different from the original ITestNGMethod instance that it wraps.

Field Summary

Modifier and TypeField and Description
private final int
private final ITestNGMethod
private final UUID

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addFailedInvocationNumber(int
The invocation number that failed
number
)

Implements org.testng.ITestNGMethod.addFailedInvocationNumber.

The list of invocation numbers that failed, which is only applicable for methods that have a data provider.
public void
public boolean
public ITestNGMethod
clone()

Overrides java.lang.Object.clone.

Implements org.testng.ITestNGMethod.clone.

Creates and returns a copy of this object.
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public Map<String, String>
public String[]
public String[]
public ConstructorOrMethod
public int
public long
public String
public boolean
public List<Integer>
public String[]
public String[]
public String
public Object
public long[]
public UUID
public int
public int
public List<Integer>
getInvocationNumbers()

Implements org.testng.ITestNGMethod.getInvocationNumbers.

Which invocation numbers of this method should be used (only applicable if it uses a data provider).
public long
public String
getMethodName()

Implements org.testng.ITestNGMethod.getMethodName.

Returns the method name.
public String[]
public String
public int
public int
getPriority()

Implements org.testng.ITestNGMethod.getPriority.

The scheduling priority.
public String
getQualifiedName()

Implements org.testng.ITestNGMethod.getQualifiedName.

getRealClass().getName() + "." + getMethodName()
public Class<?>
public IRetryAnalyzer
public Class<? extends IRetryAnalyzer>
public int
public ITestClass
public int
public long
public XmlTest
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public boolean
public boolean
public void
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
setTestClass(ITestClass
The test class having this method.
cls
)

Implements org.testng.ITestNGMethod.setTestClass.

Sets the test class having this method.
public void
public void
public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

multiplicationFactorback to summary
private final int multiplicationFactor
testNGMethodback to summary
private final ITestNGMethod testNGMethod
uuidback to summary
private final UUID uuid

Constructor Detail

WrappedTestNGMethodback to summary
public WrappedTestNGMethod(ITestNGMethod testNGMethod)

Method Detail

addFailedInvocationNumberback to summary
public void addFailedInvocationNumber(int number)

Implements org.testng.ITestNGMethod.addFailedInvocationNumber.

Doc from org.testng.ITestNGMethod.addFailedInvocationNumber.

The list of invocation numbers that failed, which is only applicable for methods that have a data provider.

Parameters
number:int

The invocation number that failed

Annotations
@Override
addMethodDependedUponback to summary
public void addMethodDependedUpon(String methodName)

Implements org.testng.ITestNGMethod.addMethodDependedUpon.

Annotations
@Override
canRunFromClassback to summary
public boolean canRunFromClass(IClass testClass)

Implements org.testng.ITestNGMethod.canRunFromClass.

Parameters
testClass:IClass

Doc from org.testng.ITestNGMethod.canRunFromClass.

The test class

Returns:boolean

Doc from org.testng.ITestNGMethod.canRunFromClass.

true if this ITestNGMethod can be invoked from within IClass.

Annotations
@Override
cloneback to summary
public ITestNGMethod clone()

Overrides java.lang.Object.clone.

Implements org.testng.ITestNGMethod.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:ITestNGMethod

a clone of this instance.

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
findMethodParametersback to summary
public Map<String, String> findMethodParameters(XmlTest test)

Implements org.testng.ITestNGMethod.findMethodParameters.

Parameters
test:XmlTest

Doc from org.testng.ITestNGMethod.findMethodParameters.

- The XmlTest object.

Returns:Map<String, String>

Doc from org.testng.ITestNGMethod.findMethodParameters.

the parameters found in the include tag, if any

Annotations
@Override
getAfterGroupsback to summary
public String[] getAfterGroups()

Implements org.testng.ITestNGMethod.getAfterGroups.

Annotations
@Override
getBeforeGroupsback to summary
public String[] getBeforeGroups()

Implements org.testng.ITestNGMethod.getBeforeGroups.

Annotations
@Override
getConstructorOrMethodback to summary
public ConstructorOrMethod getConstructorOrMethod()

Implements org.testng.ITestNGMethod.getConstructorOrMethod.

Annotations
@Override
getCurrentInvocationCountback to summary
public int getCurrentInvocationCount()

Implements org.testng.ITestNGMethod.getCurrentInvocationCount.

Annotations
@Override
getDateback to summary
public long getDate()

Implements org.testng.ITestNGMethod.getDate.

Annotations
@Override
getDescriptionback to summary
public String getDescription()

Implements org.testng.ITestNGMethod.getDescription.

Annotations
@Override
getEnabledback to summary
public boolean getEnabled()

Implements org.testng.ITestNGMethod.getEnabled.

Annotations
@Override
getFailedInvocationNumbersback to summary
public List<Integer> getFailedInvocationNumbers()

Implements org.testng.ITestNGMethod.getFailedInvocationNumbers.

Annotations
@Override
getGroupsback to summary
public String[] getGroups()

Implements org.testng.ITestNGMethod.getGroups.

Returns:String[]

Doc from org.testng.ITestNGMethod.getGroups.

The groups this method belongs to, possibly added to the groups declared on the class.

Annotations
@Override
getGroupsDependedUponback to summary
public String[] getGroupsDependedUpon()

Implements org.testng.ITestNGMethod.getGroupsDependedUpon.

Returns:String[]

Doc from org.testng.ITestNGMethod.getGroupsDependedUpon.

The groups this method depends on, possibly added to the groups declared on the class.

Annotations
@Override
getIdback to summary
public String getId()

Implements org.testng.ITestNGMethod.getId.

Returns:String

Doc from org.testng.ITestNGMethod.getId.

The id of the thread this method was run in.

Annotations
@Override
getInstanceback to summary
public Object getInstance()

Implements org.testng.ITestNGMethod.getInstance.

Annotations
@Override
getInstanceHashCodesback to summary
public long[] getInstanceHashCodes()

Implements org.testng.ITestNGMethod.getInstanceHashCodes.

Doc from org.testng.ITestNGMethod.getInstanceHashCodes.

Needed for serialization.

Returns:long[]

The hashcode of instances

Annotations
@Override
getInstanceIdback to summary
public UUID getInstanceId()

Implements org.testng.internal.IInstanceIdentity.getInstanceId.

Returns:UUID

Doc from org.testng.internal.IInstanceIdentity.getInstanceId.

- A UUID that represents a unique id which is associated with every test class object.

Annotations
@Override
getInterceptedPriorityback to summary
public int getInterceptedPriority()

Implements org.testng.ITestNGMethod.getInterceptedPriority.

Annotations
@Override
getInvocationCountback to summary
public int getInvocationCount()

Implements org.testng.ITestNGMethod.getInvocationCount.

Returns:int

Doc from org.testng.ITestNGMethod.getInvocationCount.

the number of times this method needs to be invoked.

Annotations
@Override
getInvocationNumbersback to summary
public List<Integer> getInvocationNumbers()

Implements org.testng.ITestNGMethod.getInvocationNumbers.

Doc from org.testng.ITestNGMethod.getInvocationNumbers.

Which invocation numbers of this method should be used (only applicable if it uses a data provider). If this value is an empty list, use all the values returned from the data provider. These values are read from the XML file in the <include invocationNumbers="..."> tag.

Returns:List<Integer>

The list of invocation numbers

Annotations
@Override
getInvocationTimeOutback to summary
public long getInvocationTimeOut()

Implements org.testng.ITestNGMethod.getInvocationTimeOut.

Returns:long

Doc from org.testng.ITestNGMethod.getInvocationTimeOut.

The time under which all invocationCount methods need to complete by.

Annotations
@Override
getMethodNameback to summary
public String getMethodName()

Implements org.testng.ITestNGMethod.getMethodName.

Doc from org.testng.ITestNGMethod.getMethodName.

Returns the method name. This is needed for serialization because methods are not Serializable.

Returns:String

the method name.

Annotations
@Override
getMethodsDependedUponback to summary
public String[] getMethodsDependedUpon()

Implements org.testng.ITestNGMethod.getMethodsDependedUpon.

Returns:String[]

Doc from org.testng.ITestNGMethod.getMethodsDependedUpon.

The methods this method depends on, possibly added to the methods declared on the class.

Annotations
@Override
getMissingGroupback to summary
public String getMissingGroup()

Implements org.testng.ITestNGMethod.getMissingGroup.

Returns:String

Doc from org.testng.ITestNGMethod.getMissingGroup.

If a group was not found.

Annotations
@Override
getParameterInvocationCountback to summary
public int getParameterInvocationCount()

Implements org.testng.ITestNGMethod.getParameterInvocationCount.

Annotations
@Override
getPriorityback to summary
public int getPriority()

Implements org.testng.ITestNGMethod.getPriority.

Doc from org.testng.ITestNGMethod.getPriority.

The scheduling priority. Lower priorities get scheduled first.

Returns:int

The priority value

Annotations
@Override
getQualifiedNameback to summary
public String getQualifiedName()

Implements org.testng.ITestNGMethod.getQualifiedName.

Doc from org.testng.ITestNGMethod.getQualifiedName.

getRealClass().getName() + "." + getMethodName()

Returns:String

qualified name for this method

Annotations
@Override
getRealClassback to summary
public Class<?> getRealClass()

Implements org.testng.ITestNGMethod.getRealClass.

Returns:Class<?>

Doc from org.testng.ITestNGMethod.getRealClass.

The real class on which this method was declared (can be different from getMethod().getDeclaringClass() if the test method was defined in a superclass).

Annotations
@Override
getRetryAnalyzerback to summary
public IRetryAnalyzer getRetryAnalyzer(ITestResult result)

Implements org.testng.ITestNGMethod.getRetryAnalyzer.

Annotations
@Override
getRetryAnalyzerClassback to summary
public Class<? extends IRetryAnalyzer> getRetryAnalyzerClass()

Implements org.testng.ITestNGMethod.getRetryAnalyzerClass.

Annotations
@Override
getSuccessPercentageback to summary
public int getSuccessPercentage()

Implements org.testng.ITestNGMethod.getSuccessPercentage.

Returns:int

Doc from org.testng.ITestNGMethod.getSuccessPercentage.

the success percentage for this method (between 0 and 100).

Annotations
@Override
getTestClassback to summary
public ITestClass getTestClass()

Implements org.testng.ITestNGMethod.getTestClass.

Annotations
@Override
getThreadPoolSizeback to summary
public int getThreadPoolSize()

Implements org.testng.ITestNGMethod.getThreadPoolSize.

Returns:int

Doc from org.testng.ITestNGMethod.getThreadPoolSize.

the number of threads to be used when invoking the method on parallel

Annotations
@Override
getTimeOutback to summary
public long getTimeOut()

Implements org.testng.ITestNGMethod.getTimeOut.

Returns:long

Doc from org.testng.ITestNGMethod.getTimeOut.

The timeout in milliseconds.

Annotations
@Override
getXmlTestback to summary
public XmlTest getXmlTest()

Implements org.testng.ITestNGMethod.getXmlTest.

Returns:XmlTest

Doc from org.testng.ITestNGMethod.getXmlTest.

the XmlTest this method belongs to.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
hasMoreInvocationback to summary
public boolean hasMoreInvocation()

Implements org.testng.ITestNGMethod.hasMoreInvocation.

Annotations
@Override
ignoreMissingDependenciesback to summary
public boolean ignoreMissingDependencies()

Implements org.testng.ITestNGMethod.ignoreMissingDependencies.

Annotations
@Override
incrementCurrentInvocationCountback to summary
public void incrementCurrentInvocationCount()

Implements org.testng.ITestNGMethod.incrementCurrentInvocationCount.

Annotations
@Override
isAfterClassConfigurationback to summary
public boolean isAfterClassConfiguration()

Implements org.testng.ITestNGMethod.isAfterClassConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isAfterClassConfiguration.

true if this method was annotated with @Configuration and beforeClassMethod = false

Annotations
@Override
isAfterGroupsConfigurationback to summary
public boolean isAfterGroupsConfiguration()

Implements org.testng.ITestNGMethod.isAfterGroupsConfiguration.

Annotations
@Override
isAfterMethodConfigurationback to summary
public boolean isAfterMethodConfiguration()

Implements org.testng.ITestNGMethod.isAfterMethodConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isAfterMethodConfiguration.

true if this method was annotated with @Configuration and beforeTestMethod = false

Annotations
@Override
isAfterSuiteConfigurationback to summary
public boolean isAfterSuiteConfiguration()

Implements org.testng.ITestNGMethod.isAfterSuiteConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isAfterSuiteConfiguration.

true if this method was annotated with @Configuration and afterSuite = true

Annotations
@Override
isAfterTestConfigurationback to summary
public boolean isAfterTestConfiguration()

Implements org.testng.ITestNGMethod.isAfterTestConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isAfterTestConfiguration.

true if this method is an @AfterTest (@Configuration afterTest=true)

Annotations
@Override
isAlwaysRunback to summary
public boolean isAlwaysRun()

Implements org.testng.ITestNGMethod.isAlwaysRun.

Returns:boolean

Doc from org.testng.ITestNGMethod.isAlwaysRun.

true if this method is alwaysRun=true

Annotations
@Override
isBeforeClassConfigurationback to summary
public boolean isBeforeClassConfiguration()

Implements org.testng.ITestNGMethod.isBeforeClassConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isBeforeClassConfiguration.

true if this method was annotated with @Configuration and beforeClassMethod = true

Annotations
@Override
isBeforeGroupsConfigurationback to summary
public boolean isBeforeGroupsConfiguration()

Implements org.testng.ITestNGMethod.isBeforeGroupsConfiguration.

Annotations
@Override
isBeforeMethodConfigurationback to summary
public boolean isBeforeMethodConfiguration()

Implements org.testng.ITestNGMethod.isBeforeMethodConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isBeforeMethodConfiguration.

true if this method was annotated with @Configuration and beforeTestMethod = true

Annotations
@Override
isBeforeSuiteConfigurationback to summary
public boolean isBeforeSuiteConfiguration()

Implements org.testng.ITestNGMethod.isBeforeSuiteConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isBeforeSuiteConfiguration.

true if this method was annotated with @Configuration and beforeSuite = true

Annotations
@Override
isBeforeTestConfigurationback to summary
public boolean isBeforeTestConfiguration()

Implements org.testng.ITestNGMethod.isBeforeTestConfiguration.

Returns:boolean

Doc from org.testng.ITestNGMethod.isBeforeTestConfiguration.

true if this method is a @BeforeTest (@Configuration beforeTest=true)

Annotations
@Override
isTestback to summary
public boolean isTest()

Implements org.testng.ITestNGMethod.isTest.

Returns:boolean

Doc from org.testng.ITestNGMethod.isTest.

true if this method was annotated with @Test

Annotations
@Override
setDateback to summary
public void setDate(long date)

Implements org.testng.ITestNGMethod.setDate.

Annotations
@Override
setDescriptionback to summary
public void setDescription(String description)

Implements org.testng.ITestNGMethod.setDescription.

Annotations
@Override
setIdback to summary
public void setId(String id)

Implements org.testng.ITestNGMethod.setId.

Annotations
@Override
setIgnoreMissingDependenciesback to summary
public void setIgnoreMissingDependencies(boolean ignore)

Implements org.testng.ITestNGMethod.setIgnoreMissingDependencies.

Annotations
@Override
setInterceptedPriorityback to summary
public void setInterceptedPriority(int priority)

Implements org.testng.ITestNGMethod.setInterceptedPriority.

Annotations
@Override
setInvocationCountback to summary
public void setInvocationCount(int count)

Implements org.testng.ITestNGMethod.setInvocationCount.

Annotations
@Override
setInvocationNumbersback to summary
public void setInvocationNumbers(List<Integer> numbers)

Implements org.testng.ITestNGMethod.setInvocationNumbers.

Annotations
@Override
setMissingGroupback to summary
public void setMissingGroup(String group)

Implements org.testng.ITestNGMethod.setMissingGroup.

Annotations
@Override
setMoreInvocationCheckerback to summary
public void setMoreInvocationChecker(Callable<Boolean> moreInvocationChecker)

Implements org.testng.ITestNGMethod.setMoreInvocationChecker.

Annotations
@Override
setParameterInvocationCountback to summary
public void setParameterInvocationCount(int n)

Implements org.testng.ITestNGMethod.setParameterInvocationCount.

Annotations
@Override
setPriorityback to summary
public void setPriority(int priority)

Implements org.testng.ITestNGMethod.setPriority.

Annotations
@Override
setRetryAnalyzerClassback to summary
public void setRetryAnalyzerClass(Class<? extends IRetryAnalyzer> clazz)

Implements org.testng.ITestNGMethod.setRetryAnalyzerClass.

Annotations
@Override
setSkipFailedInvocationsback to summary
public void setSkipFailedInvocations(boolean skip)

Implements org.testng.ITestNGMethod.setSkipFailedInvocations.

Annotations
@Override
setTestClassback to summary
public void setTestClass(ITestClass cls)

Implements org.testng.ITestNGMethod.setTestClass.

Doc from org.testng.ITestNGMethod.setTestClass.

Sets the test class having this method. This is not necessarily the declaring class.

Parameters
cls:ITestClass

The test class having this method.

Annotations
@Override
setThreadPoolSizeback to summary
public void setThreadPoolSize(int threadPoolSize)

Implements org.testng.ITestNGMethod.setThreadPoolSize.

Annotations
@Override
setTimeOutback to summary
public void setTimeOut(long timeOut)

Implements org.testng.ITestNGMethod.setTimeOut.

Annotations
@Override
skipFailedInvocationsback to summary
public boolean skipFailedInvocations()

Implements org.testng.ITestNGMethod.skipFailedInvocations.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override