How to get Junit 4 to ignore a Base Test Class?

后端 未结 2 1727
离开以前
离开以前 2021-02-11 12:14

I have a base class for many tests that has some helper methods they all need.

It does not by itself have any tests on it, but JUnit (in eclipse) is invoking the test ru

2条回答
  •  北恋
    北恋 (楼主)
    2021-02-11 12:42

    Just as a note, I'd always recommend giving a reason for the ignore:

    @Ignore("This test will prove bug #123 is fixed, once someone fixes it")
    

    I'm hoping the junit xml report formatter, used when running tests from ant, will one day include the ignored count (and the reasons) along with pass, fail, and error.

提交回复
热议问题