Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
Resolution
For the job where the TEST_COUNTS
macro is showing as blank, navigate to the configuration of the job and perform the following:
-
Add a new "Post-Build Action"
-
Select an action of type "Publish JUnit test result report"
-
Ensure that you have filled out the "Test report XMLs" field correctly.

These steps are necessary because the macro relies on having the test results available to calculate it.
Tested product/plugin versions
-
Jenkins version 2.107.33.0.1/https://docs.cloudbees.com/docs/cloudbees-jenkins-platform-release-notes/latest/2.121.2.1[2.121.2.1]