com.beust.testng.annotations
Annotation Type Test


@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface Test

Mark a class or a method as part of the test.

Author:
Cedric Beust, Apr 26, 2004

Optional Element Summary
 java.lang.String[] dependsOnGroups
          The list of groups this method depends on.
 java.lang.String[] dependsOnMethods
          The list of methods this method depends on.
 boolean enabled
          Whether methods on this class/method are enabled.
 java.lang.String[] groups
          The list of groups this class/method belongs to.
 int invocationCount
          The number of times this method should be invoked.
 java.lang.String[] parameters
          The list of variables used to fill the parameters of this method.
 int successPercentage
          The percentage of success expected from this method
 long timeOut
          The maximum number of milliseconds this test should take.
 

groups

public abstract java.lang.String[] groups
The list of groups this class/method belongs to.

Default:
{}

enabled

public abstract boolean enabled
Whether methods on this class/method are enabled.

Default:
true

parameters

public abstract java.lang.String[] parameters
The list of variables used to fill the parameters of this method. These variables must be defined in the property file.

Default:
{}

dependsOnGroups

public abstract java.lang.String[] dependsOnGroups
The list of groups this method depends on. Every method member of one of these groups is guaranteed to have been invoked before this method. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP.

Default:
{}

dependsOnMethods

public abstract java.lang.String[] dependsOnMethods
The list of methods this method depends on. There is no guarantee on the order on which the methods depended upon will be run, but you are guaranteed that all these methods will be run before the test method that contains this annotation is run. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP. If some of these methods have been overloaded, all the overloaded versions will be run.

Default:
{}

timeOut

public abstract long timeOut
The maximum number of milliseconds this test should take. If it hasn't returned after this time, it will be marked as a FAIL.

Default:
0L

invocationCount

public abstract int invocationCount
The number of times this method should be invoked.

Default:
1

successPercentage

public abstract int successPercentage
The percentage of success expected from this method

Default:
100