Closed sbabcoc closed 3 years ago
Resolved by #107 Prior to the merge of PR #107, we actually have a unit test that covered the general scenario, but this test lacked verification of the "atomic test" object that was supposed to be included with the failure notification. We now explicitly verify that the notification includes a non-test "atomic test" object.
While upgrading the JUnit Foundation dependency of agent-java-junit, I discovered that we couldn't handle suite-level (
@BeforeClass
) failures. The notifications generated for such failures are associated with the class, not a specific JUnit test of the class. However, theAtomicTest
class had no way to represent the description for a JUnit class.I modified this class so it can handle non-test elements, although this is definitely not what clients are likely to expect. These "atomic non-tests" have no identity and no particle methods. I could potentially attach the specific configuration method that caused the failure, but this may only lead to confusion.
At the least, I need to add at least one unit test to verify that suite-level configuration method failures are handled properly.