Interview Prep/CI/CD/Jenkins Pipelines and Agents

A pipeline publishes test results, but Jenkins shows "no test report files were found" and the build is green. Is that acceptable?

BeginnerScenarioJenkins Pipelines and Agents
Answer

Situation read → Tests may not have run at all, and the pipeline lies by silence.

What I'd do →

  1. Check the report glob path and that tests produced XML (target/surefire-reports/*.xml).
  2. Remove allowEmptyResults: true so an empty result fails the build.
  3. Add a coverage or minimum test-count gate.

Why → A green build with zero tests is the worst kind of false confidence.

Interview tip → "Fail closed" on missing evidence.

All CI/CD questions

More on Jenkins Pipelines and Agents