Mark unit test as an expected failure in JUnit

后端 未结 6 1934
滥情空心
滥情空心 2020-12-09 01:05

How can I mark a test as an expected failure in JUnit 4?

In this case I want to continue to run this test until something is patched upstream. Ignoring the test goes

6条回答
  •  我在风中等你
    2020-12-09 01:50

    One option is mark the test as @Ignore and put text in there that is a bug perhaps and awaiting a fix. That way it won't run. It will then become skipped. You could also make use of the extensions to suit your need in a potentially different way.

提交回复
热议问题