diff --git a/docs/fixtures.html b/docs/fixtures.html index 0f4b3272..aad10663 100644 --- a/docs/fixtures.html +++ b/docs/fixtures.html @@ -89,7 +89,7 @@

Use FunFixture.map2 to compose multiple fixtures into a single fixture.

// Fixture with access to two temporary files.
 val files2 = FunFixture.map2(files, files)
-// files2: FunFixture[(Path, Path)] = munit.FunFixtures$FunFixture@2ed92d81
+// files2: FunFixture[(Path, Path)] = munit.FunFixtures$FunFixture@49f1677e
 files2.test("two") {
   case (file1, file2) =>
     assertNotEquals(file1, file2)
diff --git a/docs/getting-started.html b/docs/getting-started.html
index cedb1fb8..6cd9bb82 100644
--- a/docs/getting-started.html
+++ b/docs/getting-started.html
@@ -153,13 +153,14 @@ 

+ test("ignored".ignore) { // unchanged } + +- test("pending") (pending) ++ test("pending".pending) { ++ // zero or more assertions ++ }

If you are coming from WordSpec style tests, make sure to flatten them, or your tests will not run: Only the outer test will be selected to run, and the inner tests will do diff --git a/docs/tests.html b/docs/tests.html index 3074c612..7f6982b6 100644 --- a/docs/tests.html +++ b/docs/tests.html @@ -335,6 +335,47 @@

Tag pending tests

+

Use .pending to annotate a work-in-progress test case with known-incomplete coverage. +Any assertions in the pending case must pass, but will be reported as Ignored instead of Success. +Any failures will be reported as Failures (this differs from .ignore which skips the test case entirely). +This tag is useful for documenting:

+ +

You can (optionally) include a comment for your pending test case, such as a job ticket ID:

+
  // Empty placeholder, without logged comments:
+  test("time travel".pending) {
+    // Test case to be written yesterday
+  }
+
+  // Empty placeholder, with logged comments:
+  test("time travel".pending("requirements from product owner")) {
+    // Is this funded yet??
+  }
+
+  // Empty placeholder, tracked for action:
+  test("time travel".pending("INTERN-101")) {
+    // Test case to be written by an intern
+  }
+
+  // Incomplete (WIP) placeholder, tracked for action:
+  test("time travel".pending("QA-404")) {
+    assert(LocalDate.now.isAfter(yesterday))
+    // QA team to provide specific examples for regression-test coverage
+  }
+
+

If you want to mark a failed regression test as pending-until-fixed, +you combine .ignore before or after .pending, for example:

+
  test("this test worked yesterday".ignore.pending("platform investigation")) {
+    assert(LocalDate.now.equals(yesterday))
+  }
+
+

This allows pending comments, reasons, or cross-references to be logged for ignored tests.

Tag flaky tests

Use .flaky to mark a test case that has a tendency to non-deterministically fail for known or unknown reasons.

@@ -372,7 +413,7 @@

Getting startedWriting assertions