DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk6 min

How to Build an Automated Testing Pipeline With GoCD

Learn how GoCD connects repository changes to test jobs, displays test reports, and passes build artifacts to later stages.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a GoCD testing pipeline by connecting a source or other material to a pipeline, arranging test work into ordered stages and jobs, running the project’s test command on eligible agents, and publishing both test reports and any outputs later stages need. GoCD coordinates the work; your test runner still performs the tests.

How GoCD runs an automated testing pipeline

GoCD organizes work as a pipeline containing ordered stages, stages containing jobs, and jobs containing ordered tasks. A material—often a source repository—gives the pipeline something to monitor. The server detects changes and schedules jobs; agents execute the assigned tasks. Stages run in order, while independent jobs in the same stage can run concurrently. A task failure fails its job, and a failed stage prevents later stages from starting by default. GoCD concepts

As an Amazon Associate I earn from qualifying purchases.

This structure makes stage boundaries useful gates: put checks that must pass before subsequent work in an earlier stage, and put independent work in separate jobs when parallel execution is appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a trigger and create the pipeline

If each repository change should trigger checks, configure the repository as a pipeline material. GoCD also supports pipeline dependencies, package repositories, and material plugins. Its setup guide describes four ways to set up a pipeline: pipelines as code, the API, the UI, or cloning an existing pipeline. The precise steps depend on which route and GoCD release you use. GoCD pipeline setup guide

Design stages and jobs around the checks

A practical starting design is a fast build-and-unit-test stage, followed by slower integration or acceptance checks if the project needs them. Later delivery work can then depend on successful checks. These test categories are a design choice, not a special GoCD requirement.

Pipeline part How it runs How to use it
Stage Stages run in sequence. Use a stage boundary when later work should wait for earlier checks to pass.
Job Jobs within a stage can run independently. Separate platform variants or unrelated suites into jobs only when they do not depend on each other.
Task Tasks within a job run in order. Put setup, test execution, and report-producing commands in the order the job requires.

Parallel jobs need enough agent capacity to be useful. You can specify resources on a job to direct it to capable agents; an agent must have every resource specified by that job. GoCD configuration reference

Make sure agents have the test toolchain

Agents run the commands in your tasks, so provision eligible agents with the project’s language runtime, test runner, and any required service dependencies. GoCD does not install an application’s test framework automatically. Its setup documentation notes, for example, that Ant, NAnt, and Rake are not bundled when those task types are selected; a custom command likewise depends on tools already available to the agent. Pipeline setup requirements

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Check that the task command works in the agent’s environment, not only on a developer workstation.
  • Make required services and credentials available through the agent’s approved configuration.
  • Keep tool versions and dependencies consistent across agents so the same job is repeatable.
  • Assign job resources that match the agents with the necessary capabilities.

Run tests and make GoCD show the results

Configure the test runner to write JUnit or NUnit report files, then configure the job to publish the report directory as a test artifact. GoCD copies these reports to its artifact repository and provides a Tests tab listing the tests. The report path must match the files the command actually produces; verify it with a real run. GoCD artifacts and reports

Test reports and ordinary build artifacts have different jobs. A test artifact feeds GoCD’s test-report view; a build artifact carries an output that another stage or pipeline needs.

Publish coverage and diagnostic pages

For HTML coverage reports or other diagnostic output, publish the files as ordinary artifacts. You can expose an HTML report in a tab when the browser can render it. Include associated files such as stylesheets and scripts, and preserve their relative paths so resources resolve when the report is viewed. Report and artifact configuration

Pass build artifacts to later stages

Declare the output in the producer job, then configure downstream work to fetch it. GoCD’s fetch-artifact task can retrieve artifacts from earlier stages in the same pipeline or from ancestor pipelines, subject to its upstream-stage constraints. For another pipeline to supply artifacts, declare the appropriate pipeline dependency material. Artifact and fetch-task reference

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Identify the job that creates the output and declare its artifact path.
  2. Ensure the downstream stage or pipeline has the required dependency relationship.
  3. Configure a fetch-artifact task in the consumer job for the producer and artifact it needs.
  4. Run the pipeline and confirm the consumer receives the expected files before relying on them for delivery.

Keep pipelines as code under explicit controls

GoCD supports configuration repositories using JSON and YAML plugins. The server periodically checks repository definitions and merges them with its main configuration. Because pipeline definitions can run tasks, a configuration repository has significant execution privileges. GoCD warns: “As GoCD and similar systems are at their core task runners, this functionality is akin to remote code execution in a privileged or trusted environment.” Set explicit rules limiting which pipeline groups and pipeline dependencies each repository may affect. GoCD pipelines as code and security

Choose a pipeline design that fits the work

  • Feedback time: Run quick checks early and reserve slower suites for later gates when that sequencing suits the project.
  • Coverage: Decide which risks unit, integration, or acceptance checks need to examine; the stage names alone do not establish coverage.
  • Parallelism: Concurrent jobs can reduce waiting when work is independent, but they require suitable agent capacity.
  • Repeatability: Provision agent toolchains and external dependencies consistently; GoCD’s documentation does not quantify reliability gains from a particular setup.
  • Handoff: Publish only the reports and outputs that need inspection or later consumption, and configure the relevant artifact flow.

Troubleshoot common pipeline failures

The pipeline does not start after a change

Check that the intended repository or other material is configured and that the pipeline is watching the expected source. If using a pipeline dependency or package material, verify that the configured trigger matches the event you expect. GoCD’s setup routes and material types are described in its pipeline setup guide.

A job cannot run on an agent

Check agent availability and whether an eligible agent has every resource named by the job. Also verify that the required runtime, test command, and service dependencies are installed or provisioned there. Job resource requirements

The test task fails or reports no tests

Run the configured command in the agent environment and inspect its exit result and output. Confirm the runner is installed, the command is correct, and it writes the expected report format and path. GoCD can list report contents only when the configured report artifact exists and contains supported JUnit or NUnit results. Supported test reports

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Tests tab is empty

Verify that the report directory is configured as a test artifact and that a completed run actually wrote report files beneath it. A command that passes without producing the configured report will not populate the test listing.

A downstream job cannot find an output

Confirm that the producer declares the artifact, that the consumer has the required dependency relationship, and that its fetch-artifact task points to the intended upstream output. Check the documented upstream-stage constraints when fetching from another pipeline. Fetch-artifact configuration

An HTML report is missing styling or images

Publish the report’s associated files along with its HTML and keep the relative directory structure intact so the page can load those resources. HTML report artifacts

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For screenshot checks of pages in a pipeline, a screenshot API can avoid maintaining a browser capture setup. ScreenshotNeo returns a screenshot or PDF from one GET request; see the API documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Cookie banners, popups, and chat widgets are removed before capture. Bot checks, blank pages, timeouts, and failed loads are not billed, and cache hits are not billed; response headers indicate the page verdict and billing status. Its MCP server lets AI agents use screenshot tools. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up free for 1,000 screenshots a month with no card.

Version and further reading

GoCD’s /current/ documentation can change; check the documentation against the release deployed in your environment before applying configuration details. For a broader treatment of build, test, and deployment pipelines, see Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation by Jez Humble and David Farley, published by Addison-Wesley Professional in 2010. It is general continuous-delivery reading, not a GoCD manual. Pearson catalog listing

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.