Why isn't my @BeforeClass method running?
问题 I have the following code: @BeforeClass public static void setUpOnce() throws InterruptedException { fail("LOL"); } And various other methods that are either @Before, @After, @Test or @AfterClass methods. The test doesn't fail on start up as it seems it should. Can someone help me please? I have JUnit 4.5 The method is failing in an immediate call to setUp() which is annotated as @before. Class def is : public class myTests extends TestCase { 回答1: do NOT extend TestCase AND use annotations at