Tests pass when run individually but not when the whole test class run

后端 未结 5 1304
感动是毒
感动是毒 2021-01-02 04:38

I have solved a topCoder problem for which all the tests pass when I run them on their own. Nonetheless when I run the whole test class some of them fail. Could you, please,

5条回答
  •  伪装坚强ぢ
    2021-01-02 04:53

    You can also try @BeforeEach for Junit5

    @BeforeEach
    public void setup() {
      // Some code here
    }
    

提交回复
热议问题