Interview Prep/CI/CD/Jenkins Build and Agent Failures

Stage `post { always { junit ... } }` fails with `No test report files were found. Configuration error?`

BeginnerTroubleshootingJenkins Build and Agent Failures
Answer

Likely causes → Tests never ran (build failed earlier), or the glob is wrong.

Diagnose → find . -name 'TEST-*.xml' in the workspace.

Fix → Correct the glob (**/target/surefire-reports/*.xml); ensure tests execute; use allowEmptyResults only deliberately.

Prevent → Fail when test count is zero.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Jenkins Build and Agent Failures