Skip to content

0.8.x Annotations for JUnit4

UKAI Hiroshi edited this page Oct 19, 2017 · 24 revisions

JCUnit provides a set of annotations with which you can let JCUnit know how your test suite should be generated and executed. Following is a matrix that lists those annotations.

# annotation target note
1 @RunWith class Specifies a test runner with which your test is run
2 @ConfigureWith class Specifies a parameter space class and test requirement class
3 @ParameterSource method Indicates a method that defines a parameter
4 @Conditon method Indicates a method that defines a constraint or non-constraint condition
5 @BeforeClass static method Indicates a method to be run before all
6 @BeforeTestCase static method Indicates a method to be run before every test case
7 @Before method Indicates a method to be run before every test method in a test case
8 @Given method Specifies a condition to be satisfied to run test method attached to
9 @Test method Indicates a test method to be run for a test case
10 @From parameter Specifies a parameter method the parameter attached to should get its value from
11 @After method Indicates a method to be run after every test method in a test case
12 @AfterTestCase static method Indicates a method to be run after every test method in a test case
13 @AfterClass static method Indicates a method to be run before all
Clone this wiki locally