JUnit @Ignore usefulness?

后端 未结 6 1523
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 11:47

In JUnit you can use @Ignore before methods to tell the test runner to automatically skip those tests. From what I can gather, this is really only a convenient way

6条回答
  •  猫巷女王i
    2021-02-05 12:35

    FYI, TestNG supports this slightly differently:

    • You can include a description of why the test is being ignored:

      @Test(enabled = false, description = "Disabled until BUG-1234 gets fixed")
      
      • The Eclipse TestNG plug-in and the HTML reports will give you a list of all the tests that have been disabled, along with the reason why:

    enter image description here

提交回复
热议问题