TOPIC 32/3716 MINNOT STARTED

Jenkins pipelines: run tests, publish results and read an unstable build

Many teams run their tests on Jenkins. Learn a Jenkinsfile, its stages, how test results are published, and what an unstable build means.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: an assembly line with checkpoints. A factory line has set stations. Each one does one job, a checker signs off, and a yellow tag marks a part that needs a look before it moves on.

The plan for the line is written down and kept with the product.

A pipeline is that line. Tom, the tester at Daily List, a to-do list app, reads the plan to see where a run stopped.

PLAIN WORDS · 1 in this section
checkpoints
points along the way where a payment is checked

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB An assembly line with checkpoints and a written plan.

  1. Stage
  2. Report
  3. Decide
Assembly line

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The line planA Jenkinsfile
A stationA pipeline stage
A yellow tagAn unstable build
The checker reportPublished test results

WHERE THIS PICTURE STOPS

  • A line makes one product, but a pipeline runs many branches.
  • A tag is placed by a person, but Jenkins sets the colour.
  • A factory plan is on paper, but a Jenkinsfile is code.

HOOK

Plan, stations, tags.

TELL A FRIEND

An assembly line: stations in order, a tag for a part to check.

OFTEN MIXED UP WITH GitHub Actions and Jenkins: run your tests on every push. That topic runs tests in GitHub Actions. This one covers the same ideas in a Jenkins pipeline.

PRACTISE AND KEEP

Sources for this topic — 4 sources
  1. Market practice

    Pipeline syntax (Jenkins documentation) ↗ — Jenkins · Jenkins documentation: a declarative pipeline has stages, each stage has steps, and a post section can run actions such as publishing results whether the run passes or fails (search excerpt, page not opened)

    The official reference for declarative pipeline syntax: stages, steps, post sections and options. Official project documentation. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Recording tests and artifacts (Jenkins documentation) ↗ — Jenkins · Jenkins documentation: a junit step collects test report files so Jenkins can track and report them, and a pipeline with failing tests is marked unstable, not failed (search excerpt, page not opened)

    The official tour page on publishing test results and saving files from a run. Official project documentation. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Using a Jenkinsfile (Jenkins documentation) ↗ — Jenkins · Jenkins documentation: a Jenkinsfile keeps the pipeline definition in source control beside the code (search excerpt, page not opened)

    The official guide to keeping a pipeline in a file that lives with the code. Official project documentation. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    junit: Archive JUnit-formatted test results ↗ — Jenkins · Current junit step reference, opened 6 November 2026: existing report files, unstable options; not equivalent to uncaught shell failure.

    Current junit step reference: test report files, allowEmptyResults and skipMarkingBuildUnstable. Test publisher status differs from an unhandled non-zero shell exit. · Checked 2026-11-06

    Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied. Also read for the CI/Containers analysis; live documentation does not establish the version installed in a learner environment.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.