scalameta/munit

“Pending” test case Tag

Closed this issue · 0 comments

It’s useful to support a “Pending” Tag annotation for new/incomplete test cases (especially if a user-supplied ticket tracker ID can be reported in test results). This kind of feature is supported by other frameworks like ScalaTest and Specs2. In terms of JUnit / framework reporting, Pending cases are usually logged the same as the Ignored tag. However, useful advantages of “Pending”, different from “Ignored”:

  • Runs the test case instead of skipping it (can detect regressions).
  • Structured, searchable, lintable source-code documentation of new or incomplete test cases, which would otherwise be undocumented or misleadingly reported as Success coverage.
  • Annotation/listening of annotated test results, so that the reasons for ignored test cases are clear and can be reported.
  • Can be combined for “Ignored” if the test case is temporarily failing for an acceptable reason (best of both worlds).

Without pending:

==> i MyClass.newTest ignored

With pending:

==> i MyClass.newTest PENDING #999 ignored