Skip to content

Conversation

subbu171
Copy link

@subbu171 subbu171 commented Sep 22, 2025

What?

Currently, assertion failures (e.g., AssertionError) are being reported as errors, and unexpected exceptions (e.g., NullPointerException, IOException, etc.) are being reported as failures.

This is inverted relative to JUnit’s standard terminology.

JUnit convention

Failures → Assertion failures (AssertionError) indicating the test ran but produced an unexpected result.

Errors → Unexpected exceptions, infrastructure issues, or anything other than an AssertionError.

Reference:
JUnit 5 Legacy Reporter
Logs AssertionError as FAILURE and everything else as ERROR.
Reference: JUnit Legacy XMLReportWriter.java (line 444)

Fix

Update error classification logic to correctly map:

AssertionError → failure

Any other exception → error

Impact

Test reports will now align with JUnit expectations.

Downstream tooling and dashboards that parse JUnit XML or test results will correctly distinguish between test failures (assertion mismatches) and infrastructure errors (unexpected exceptions).

… 'errors', consistent with Junit terminology
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants