@After ,@before not working in testcase

前端 未结 5 918
遇见更好的自我
遇见更好的自我 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:33

    in my case, I had that problem the solution was to change the java access modifier, It was way private.

    before (not working) @Test void validate() throws Exception {}

    after (working) @Test public void validate() throws Exception {}

提交回复
热议问题