| Annotation | meaning | class |
|---|---|---|
| @Test | Method to be tested | org.junit.Test |
| @Test(expected=Exception class.class) | Success if the specified exception occurs | org.junit.Test |
| @Test(timeout=millisecond) | Failure if the specified time is exceeded | org.junit.Test |
| @Ignore("comment") | Exclude from the test (@Attach to Test) | org.junit.Ignore |
| @Before | Previous setUp()Equivalent to | org.junit.Before |
| @After | Previous tearDown()Equivalent to | org.junit.After |
| @BeforeClass | Pre-processing performed only once before running all tests | org.junit.BeforeClass |
| @AfterClass | Post-processing performed only once after executing all tests | org.junit.AfterClass |
Recommended Posts