Continuous Integration, Delivery and Deployment
Continuous integration (CI), continuous delivery and continuous deployment are three practices, each built on the one before. In CI, developers merge their work into a shared mainline at least daily, and an automated build with tests verifies every merge. Continuous delivery keeps every change that passes the pipeline releasable, so the team can deploy it whenever it decides to. Continuous deployment removes that decision: every passing change goes to production automatically.
Take a fix to how VAT is rounded on invoices. With CI, it is merged the same day and verified within minutes. With continuous delivery, it also passes tests on a staging environment and waits as a release candidate until the product owner releases it. With continuous deployment, it reaches customers as soon as the last automated check passes.
Why it matters
Integrating and releasing rarely are both risky. When weeks of work from several people meet at once, conflicts and integration defects pile up and nobody can tell which change caused which failure. These practices replace big, rare events with small, frequent ones, each checked while its author still remembers it.
For a tester, the practice decides what the pipeline already proves and whether any person checks a change before users see it. Knowing which one your team really follows tells you which risks still need you.
Continuous integration: merge often, verify every merge
Martin Fowler’s widely cited description defines CI as a practice in which every team member merges their changes into a shared codebase at least daily, and each integration is verified by an automated build that includes tests. A conflict between two changes made this morning is quick to fix; found three weeks later, it is not.
CI is a team habit supported by a tool, not the tool itself. A CI server that builds a long-lived branch once a week, or a main branch left red for days while people keep merging, is a CI tool without continuous integration. The habits that make it work:
- One shared mainline in version control, with everything needed to build and test the product.
- A self-testing build, triggered by every push to the mainline: it runs the automated tests and fails when any of them fails. Many teams also build each pull request before it is merged.
- A build measured in minutes, so developers wait for the verdict instead of moving on.
- A broken build is fixed first: nobody adds changes on top of a red mainline.
Continuous delivery and continuous deployment
Continuous delivery extends CI beyond the merge. The pipeline builds the product once, deploys that same build to production-like test environments and runs further checks there, such as API, end-to-end and non-functional tests. Every build that passes is a release candidate that could go to production at the push of a button; when it actually goes is a business decision.
Continuous deployment removes that decision: every change that passes all automated stages is deployed to production automatically. It therefore requires continuous delivery, which in turn requires CI.
Two terms cause confusion. "CD" is used for both, so when a team says it does "CI/CD", ask which one it means. And some teams separate deployment (the new version runs in production) from release (users can see the feature), for example by keeping a finished feature switched off until a planned date.
Continuous integration
Merge at least daily; every merge is built and tested automatically
- 1Merge to the mainlineSmall changes, at least daily
- 2Automated build and testsStatic checks, unit and component tests, in minutes
- 3Verified mainlineIf it turns red, fixing it comes before new work
- Ends with:
- A verified mainline
- Who decides on production:
- Not part of CI: a separate release process
- What the automated tests decide:
- Whether the change may join the mainline
- Requires:
- A shared mainline and a self-testing build
Continuous delivery
Every passing build is releasable; a person decides when
- 1CI passesThe same verified change
- 2Deploy to staging, test furtherAPI, end-to-end and non-functional tests; people explore
- 3Release candidateCould go to production at any time
- 4A person decides: deployAt a time the business chooses
- Ends with:
- A release candidate
- Who decides on production:
- A person, such as the product owner
- What the automated tests decide:
- Whether the build is releasable
- Requires:
- Continuous integration
Continuous deployment
Every passing build goes to production automatically
- 1CI passesThe same verified change
- 2Deploy to staging, test furtherEvery check that matters must be automated
- 3Deployed to production automaticallyNobody approves it
- 4Post-deployment checksAnd monitoring; roll back if they fail
- Ends with:
- The change live in production
- Who decides on production:
- Nobody: passing the pipeline is the decision
- What the automated tests decide:
- Whether users get the change, with no further check
- Requires:
- Continuous delivery, and so CI
Pipeline stages are illustrative: real pipelines differ by team.
The role of automated tests in each practice
In all three practices, automated tests are the evidence the pipeline acts on; without them, CI only proves that the code builds. What changes is how much depends on that evidence. The ISTQB Foundation syllabus adds that even with the high level of automation in DevOps, manual testing from the user’s perspective is still needed.
- CI: the tests decide whether a change may join the mainline, so they must be fast: mostly static checks, unit and component tests.
- Continuous delivery: the tests decide whether a build is releasable. Slower API, end-to-end and non-functional tests run later, only on builds that passed the fast stages, and people can still explore the release candidate before anyone presses the button.
- Continuous deployment: the tests are the only gate before users. A risk the pipeline does not check is not checked at all, so post-deployment checks, monitoring and a fast rollback complete the safety net.
- In every practice, a flaky test, one that fails at random, damages the safety net: the team learns to re-run and ignore red builds, and real failures slip through.
Worked example: one change, three practices
An online pharmacy lowers its free delivery threshold from 200.00 SAR to 150.00 SAR. The log shows one pipeline run; this part is identical under all three practices.
- CI: by 09:52 the change was merged, and unit tests had checked 149.99 and 150.00 at the new threshold, and 199.99, a total that paid a delivery fee before the change and now ships free. A failure at 09:44 would have kept it out of main while the change was still fresh.
- Continuous delivery: build 2.14.0+512 waits on staging. The tester explores the cart (what does the free delivery banner say now? what about exactly 150.00 SAR with a discount code?) and compares the cart API response on staging with production. The product owner releases it at 14:00 with the weekly promotion.
- Continuous deployment: the same build reaches production at about 10:12 with nobody deciding. Post-deployment checks call the health endpoints and smoke-test the cart; if they fail, the team rolls back. The exploratory questions had to be asked before the merge or turned into automated checks.
- Had the end-to-end stage failed at 10:09, no release candidate would exist under either practice: the pipeline stops the change, not a person.
Change: free delivery from 150.00 SAR (was 200.00 SAR)
09:40 pull request #418 opened
09:41 build .......................................... passed
09:44 static checks + unit tests ..................... passed
09:49 API tests against a temporary database ......... passed
09:52 merged to main
09:56 main: build + unit tests ....................... passed
10:01 build 2.14.0+512 deployed to staging
10:09 end-to-end checkout journeys on staging ........ passed
10:09 release candidate 2.14.0+512 is readyCommon mistakes
- Treating a CI server as continuous integration: weekly builds of long-lived branches, or a main branch left red for days, are the tool without the practice.
- Saying "CD" without saying which one. Continuous delivery keeps a person’s decision before production and continuous deployment does not, so the test strategy differs.
- Assuming automation makes manual testing unnecessary. Exploratory and acceptance testing still find what nobody anticipated; under continuous deployment they move before the merge.
- Putting slow end-to-end tests in the first stage, so developers stop waiting for the verdict and merge anyway.
- Re-running a red build until it turns green and calling it fixed.
- Confusing deployment with release: a feature can run in production while still switched off for users.
The QA perspective
Start by finding out what your team actually does: how often work reaches the mainline, what each pipeline stage tests, and whether a person approves production deployments. Read recent pipeline runs: where they fail, how long each stage takes, and how often a red build is re-run without investigation. That shows which risks the automation covers and where your testing adds most.
Then help put the right tests at the right stage: suggest boundary and negative cases for unit tests, agree which critical journeys belong in the end-to-end stage, and treat a flaky test as a defect with an owner. Under continuous delivery, plan exploratory testing around the release candidate and record which build you tested; under continuous deployment, move it into story and pull request reviews, and make sure the rollback itself has been tested.
Practice exercise
Name the practice and find the testing gap
Four teams describe how they work. Decide for each whether it practises continuous integration, continuous delivery, continuous deployment, or none of them. Then list what team C’s automated tests must cover, since no person checks its changes before users see them.
Team A Developers work on feature branches for two to three weeks. A server
builds and tests the main branch every night. Branches are merged
before each monthly release.
Team B Developers merge small pull requests to main several times a day.
Every pull request and every merge is built and tested in about
12 minutes. Each passing build is deployed to staging automatically
and could go to production. The product owner presses "Deploy"
every Thursday.
Team C Developers merge to main several times a day. Every merge that
passes all pipeline stages is deployed to production automatically,
usually within 30 minutes.
Team D Jenkins builds every commit, but main has been red for four days.
The team keeps merging and plans to "fix the tests before the release".- Check how often work reaches the mainline and whether every merge is verified by an automated build with tests.
- Check whether every passing build is deployable, and who or what decides when it goes to production.
- Name the practice, then list team C’s must-have automated checks and one question for that team.
Show the model answer
Team A: none of the three. Work is merged only before each release, and the nightly build tests main rather than each integration, so problems pile up for weeks. A CI server alone is not CI.
Team B: continuous delivery. Work reaches main several times a day and every merge is verified (that is CI), every passing build is deployable, and a person decides when to release.
Team C: continuous deployment. It integrates as often as team B, but passing the pipeline is the release decision.
Team D: a CI tool without the practice. A broken build is not fixed first, so each new merge lands on a red mainline and its result means nothing. The fix is to stop merging and repair main now.
Team C needs automated checks for every risk that matters: unit and API tests for business rules, a few end-to-end journeys for critical flows (sign-in, checkout, payment), key non-functional checks, and post-deployment checks with a rehearsed rollback. A good question: how fast can a bad deployment be rolled back, and has anyone tried it?
Frequently asked questions
Is CI/CD a tool?
No. Continuous integration and continuous delivery or deployment are practices. Tools such as GitHub Actions, GitLab CI/CD or Jenkins run the pipelines that support them, but a team that merges rarely or ignores a red build is not practising CI, whatever tool it uses.
Does continuous deployment mean there is no tester on the team?
No. The tester’s work moves earlier and changes shape: reviewing stories and pull requests, designing the automated checks, testing the post-deployment checks and the rollback, and exploring features before they are merged or while they are still switched off for users.
Which practice should a team choose?
CI is the base for both. Continuous delivery suits teams whose releases need a business decision, a regulatory approval or coordination with other events. Continuous deployment suits teams that trust their automated tests, monitoring and rollback enough that a person before production would add no real check. A team can also use continuous delivery for one service and continuous deployment for another.
References
- Continuous Integration (Martin Fowler)The widely referenced description of continuous integration: integrate often, keep the build self-testing and fast, and fix a broken build immediately.
- ISTQB Certified Tester Foundation Level (CTFL) v4.0The foundation syllabus of software testing: test levels and types, test design techniques, test management and tools.
- Eradicating Non-Determinism in Tests (Martin Fowler)Why flaky tests destroy a suite's value, their common causes (isolation, asynchrony, remote services, time, resource leaks) and quarantine as a response.
Practise with Mutqan tools
Generate regression scenarios from a change description and a list of affected and related modules.
Check several API health endpoints at once and get status, latency and a pass/fail summary.
Compare two API responses (e.g. staging vs production) and list every structural and value difference.
Go deeper
- CI/CD TestingHow testing works inside CI/CD pipelines: test stages, fast-feedback ordering, quality gates, JUnit reports, sharding, flaky tests and failure triage.
- Smoke vs Sanity vs Regression TestingWhere each one runs in a CI/CD pipeline
- Deployment Verification TestingPost-deployment smoke tests
- Manual vs Automated TestingHow teams combine them
Your progress on this topic
Not started
Mark the topic complete when you have studied it and done the exercise.
Sign in to track your progress
Mark topics complete, continue where you left off and unlock specialisation exams.