JUnit4是否有扩展名,允许将某些测试标记为“预计失败”?在JUnit4中将单元测试标记为预期失败
我想用一些标记标记测试当前正在开发的功能,例如@wip。对于这些测试,我想确保它们失败。
我的验收标准:
Scenario: A successful test tagged @wip is recorded as failure
Given a successful test marked @wip
When the test is executed
Then the test is recorded as failure.
Scenario: A failing test tagged @wip is recorded as fine
Given a failing test tagged @wip
When the test is executed
Then the test is recorded as fine.
Scenario: A successful test not tagged @wip is recorded as fine
Given a successful test not tagged @wip
When the test is executed
Then the test is recorded as successful.
Scenario: A failing test not tagged with @wip is recorded as failure
Given a failing test not tagged with @wip
When the test is executed
Then the test is recorded as failure.
可能重复[标记单元测试作为预期的JUnit失败](http://stackoverflow.com/questions/4055022/mark-unit-test-as-an-expected-failure-in-junit) – 2014-01-31 15:14:45