@After ,@before not working in testcase

前端 未结 5 907
遇见更好的自我
遇见更好的自我 2020-12-17 09:15

I have started testing and now i want to use @After, @Before and @Test but my application only runs the @Before method an

5条回答
  •  醉梦人生
    2020-12-17 09:18

    Check that you are using Junit4 because from Junit5 onwards @Before/@After is now @BeforeEach/@AfterEach and similalry @BeforeClass/@AfterClass is @AfterAll/@BeforeAll.

提交回复
热议问题