Skip to content

Fix handling of suite-level failures; expose description-to-target mappings

Compare
Choose a tag to compare
@sbabcoc sbabcoc released this 29 May 01:22
· 66 commits to master since this release

The initial focus for this release was to expose the mappings from Description to test class instance (a.k.a. - target). In the process, I discovered fundamental issues in the way I was handling suite-level failures.

Prior to implementing the changes in this release, notifications for exceptions thrown by @BeforeClass and @AfterClass methods would be published with no context (AtomicTest == null). This was terribly uninformative. Now, these failures include non-test context objects. The description of a non-test context object represents the test class to which the failed configuration method belongs.

I also fixed a few random bugs and inefficiencies along the way.

  • Add method to map from Description to Target
  • Fix handling of suite-level failures:
    • AtomicTest: Add support for suite descriptions
    • EachTestNotifierInit: Remove 'ensureAtomicTestOf(Description)'; optimized runner acquisition
    • LifecycleHooks: 'describeChild' - Ensure runner can support specified child
    • RunAnnouncer: Add private shims to create ephemeral atomic test objects for ignored tests and suite failures