Running failed JUnit count?

Our Jenkins build/test jobs take almost 3 hours - most of that is running thousands of JUnit tests.
Is there any way to have the current count of failed JUnits displayed in the Job Status view?
Sometimes, someone commits a change that breaks a LOT of tests, and if we can tell that is happening, we can kill the job and fix the issue without waiting several hours.

You might try

It is installed on and seems to help with the long-running tests there.

Looks interesting, but I’m really unclear as to how to use it.
We do use a pipeline, that runs an ant script, that invokes the ant JUnit task multiple times.
Do I just add that block of pipeline script before my call to ant? (and adjust the junit output path.)

I would wrap (curley braces) your ant call in that step, but yes, from the documentation that looks exactly what you need to do.

So, something like this?

                    realtimeJUnit('Metrix-GuiApp/build/testoutput_Phase1/TEST-*.xml') {
                      withEnv(["ANT_OPTS=-Xmx2048m"]) {
                         withAnt(installation: 'Apache Ant') {
                            sh label: 'Phase 1 Ant Test', script: 'ant -file Metrix-AutomatedBuild/build.xml -lib Metrix-AutomatedBuild/lib/ecj-4.24.jar Phase1-Test -logger'


Have you tried it?

Not yet. Working my way through a large merge - which is one of the cases that can cause lots of failures.
Once I’m done with the merge, I’ll push and test that.

So far it does appear to work. Though if you have it displaying the table of tests that have run, it doesn’t update the table automatically. You have to click on the button to refresh it.
Since no tests have failed yet, I don’t know if the fail count does update in the main job info screen or not.