Flag a test as broken in scalatest

Viewed 798

Sometimes a test is valid, but the code being tested is broken, and there is a defect logged against the test scenario. Once the defect is fixed, the test will pass.

Until then, I could mark the test as "ignore", with the defect number in the comments. Then the test won't run, it will get flagged as ignored, and the metrics will reflect the fact that it was ignored. When the defect is marked as fixed, I could find the test case and re-enable the test.

I could probably work with that, but I kinda want another option: mark the test as a defect. This causes the test to still be run, but reverses the semantics, where a failure is expected and nothing to get alarmed about, whereas a pass is a reason for celebration, and gets called out. Under this scenario, there are two more summary statistics: expected test failures and unexpected tests passing.

Does such a thing already exist in ScalaTest?

1 Answers
Related