Issue
When a JUnit test fails in a @BeforeClass or @BeforeAll method, the Age column in the JUnit test report shows an inaccurate value.
Instead of showing 1 (the expected age for the first failure following one or more passing builds), the test report displays a higher age value that refers back to an older failing build.
The failing test case appears with no method name in the test report, and the reported age does not reflect when the current failure began.
Resolution
Monitor Maven Surefire GitHub Issue #3267 for an upstream fix and upgrade Maven Surefire once a fix is available.
Tested product/plugin versions
-
CloudBees CI on modern cloud platforms - managed controller - 2.541.1.35570
-
JUnit plugin - 1369.v15da_00283f06
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.