Email Extension Plugin TEST_COUNTS macro returns blank

Article ID:360026807171
1 minute readKnowledge base

Issue

Using the ${TEST_COUNTS} macro in plugin:email-ext results in nothing being printed out.

Resolution

For the job where the TEST_COUNTS macro is showing as blank, navigate to the configuration of the job and perform the following:

  1. Add a new "Post-Build Action"

  2. Select an action of type "Publish JUnit test result report"

  3. Ensure that you have filled out the "Test report XMLs" field correctly.

postbuild-actions-publish-junit.png

These steps are necessary because the macro relies on having the test results available to calculate it.

Tested product/plugin versions

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.