@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE,CONSTRUCTOR})
public @interface Test
Modifier and Type | Optional Element and Description |
---|---|
boolean |
alwaysRun
If set to true, this test method will always be run even if it depends
on a method that failed.
|
java.lang.String |
dataProvider
The name of the data provider for this test method.
|
java.lang.Class<?> |
dataProviderClass
The class where to look for the data provider.
|
java.lang.String[] |
dependsOnGroups
The list of groups this method depends on.
|
java.lang.String[] |
dependsOnMethods
The list of methods this method depends on.
|
java.lang.String |
description
The description for this method.
|
boolean |
enabled
Whether methods on this class/method are enabled.
|
java.lang.Class[] |
expectedExceptions
The list of exceptions that a test method is expected to throw.
|
java.lang.String |
expectedExceptionsMessageRegExp
If expectedExceptions was specified, its message must match the regular expression
specified in this attribute.
|
java.lang.String[] |
groups
The list of groups this class/method belongs to.
|
boolean |
ignoreMissingDependencies
If set to true, this test will run even if the methods
it depends on are missing or excluded.
|
int |
invocationCount
The number of times this method should be invoked.
|
long |
invocationTimeOut
The maximum number of milliseconds that the total number of invocations on this test
method should take.
|
java.lang.String[] |
parameters
Deprecated.
Use @Parameters
|
int |
priority
The scheduling priority.
|
java.lang.Class |
retryAnalyzer
The name of the class that should be called to test if the test
should be retried.
|
boolean |
sequential
Deprecated.
Use singleThreaded
|
boolean |
singleThreaded
If set to true, all the methods on this test class are guaranteed to run
in the same thread, even if the tests are currently being run with parallel="true".
|
boolean |
skipFailedInvocations
If true and invocationCount is specified with a value > 1,
then all invocations after a failure will be marked as a SKIP
instead of a FAIL.
|
int |
successPercentage
The percentage of success expected from this method.
|
java.lang.String |
suiteName
The name of the suite this test class should be placed in.
|
java.lang.String |
testName
The name of the test this test class should be placed in.
|
int |
threadPoolSize
The size of the thread pool for this method.
|
long |
timeOut
The maximum number of milliseconds this test should take.
|
public abstract java.lang.String[] groups
public abstract boolean enabled
@Deprecated public abstract java.lang.String[] parameters
public abstract java.lang.String[] dependsOnGroups
public abstract java.lang.String[] dependsOnMethods
public abstract long timeOut
public abstract long invocationTimeOut
public abstract int invocationCount
public abstract int threadPoolSize
public abstract int successPercentage
public abstract java.lang.String dataProvider
DataProvider
public abstract java.lang.Class<?> dataProviderClass
public abstract boolean alwaysRun
public abstract java.lang.String description
public abstract java.lang.Class[] expectedExceptions
public abstract java.lang.String expectedExceptionsMessageRegExp
public abstract java.lang.String suiteName
public abstract java.lang.String testName
public abstract boolean singleThreaded
public abstract java.lang.Class retryAnalyzer
public abstract boolean skipFailedInvocations