Skip to content

Continuous Integration Fundamentals: CNPA practice questions

Continuous integration is the practice of integrating every developer's work into the shared main line of the code base frequently and checking each change automatically.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Continuous Integration Fundamentals covers in CNPA

Continuous integration is the practice of integrating every developer's work into the shared main line of the code base frequently and checking each change automatically. DORA's description of CI starts from the problem it solves: in a system many people change at once, a small change in one file can break something elsewhere, and changes from different developers can be incompatible. CI follows the principle that if something takes a lot of time and energy you should do it more often, which forces you to make it less painful, and it relies on fast feedback loops and small batches of work.

DORA lists the key elements simply. Each commit should trigger a build of the software. Each commit should trigger a series of automated tests that give feedback within a few minutes. To make that work a team needs an automated build process that produces packages which can be deployed to any environment, are numbered and repeatable, and are treated as the authoritative output used by every later stage; a reliable suite of automated tests, starting with a handful of unit and acceptance tests that cover high-value functionality; and a CI system that runs the build and tests on every check-in and makes the status visible to the team.

CI as defined by Kent Beck and the Extreme Programming community also includes two practices that DORA finds predictive of higher delivery performance. The first is trunk-based development: developers work in small batches and merge into trunk at least daily instead of keeping long-lived feature branches. DORA's page on trunk-based development calls it a required practice for CI and describes branches that typically last no more than a few hours. The second is the agreement that when the build breaks, fixing it takes priority over any other work.

For a platform team, CI is one of the first capabilities users ask for. Offering it well means shared runners, reusable pipeline definitions, caching that keeps feedback fast, and clear output when something fails; DORA's platform research found clear feedback on the outcome of a task to be the capability most correlated with a positive user experience.

Several misconceptions come up. Running a CI server is not the same as practicing CI: if developers merge only once a week from long-lived branches, the server just reports late, large failures. Flaky tests are not harmless; DORA stresses that tests must be reliable, so that a failure means a real problem and a pass gives confidence. Slow suites undermine the practice too, because developers stop running tests they have to wait for, and failures become hard to attribute when many changes land between runs. And CI is not deployment: it produces a tested artifact, and continuous delivery is what takes that artifact to environments.

At associate level, expect questions on what should trigger a build, how often to merge, what to do when the build is red, why the build output should be the artifact deployed everywhere, and how trunk-based development differs from feature-branch workflows.

Key points

  • Every commit triggers a build and a set of automated tests that report back within minutes.
  • Developers merge small batches into trunk at least daily; long-lived feature branches work against CI.
  • A broken build is fixed before any other work continues.
  • The CI build output is the numbered, authoritative package used by every later stage.

Three sample questions

8 CNPA questions on Continuous Integration Fundamentals, 8 with explanations. How practice works

Question 1

Which practice is part of continuous integration as DORA describes it?
  1. A.Automated tests run once a night on the main branch, and any failures are reviewed at the next planning meeting.
  2. B.A broken build may stay red until the release branch is cut.
  3. C.Developers merge into trunk at least daily, with automated tests before and after each merge.
  4. D.Developers merge long-lived feature branches once a month after a full regression run.

Correct answer: C

DORA's continuous integration capability describes developers merging work into trunk at least daily, with a set of automated tests run both before and after the merge; when the tests fail, the team stops what it is doing to fix the problem. Why the other options are wrong. "Automated tests run once a night on the main ...": DORA expects each commit to trigger tests that give feedback within minutes, and failures to be fixed immediately. "A broken build may stay red until the release branch is cut.": DORA describes an agreement that fixing a broken build takes priority over other work. "Developers merge long-lived feature branches once a month after ...": Long-lived branches that diverge from trunk are what CI is designed to avoid.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), DORA capability: Continuous integration

Question 2

A team's tests take three hours and run only when a release candidate is built. What feedback time does DORA's continuous integration guidance aim for instead?
  1. A.Each commit triggers automated tests that provide feedback within a few minutes.
  2. B.Overnight feedback is the target, so that long-running tests never slow developers down during the day.
  3. C.Feedback only before a release, because that is when quality matters.
  4. D.Feedback within the current sprint is enough.

Correct answer: A

DORA says each commit should trigger a series of automated tests that provide feedback in a few minutes, so that developers learn about a problem while the change is still fresh. Why the other options are wrong. "Overnight feedback is the target, so that long-running tests ...": Overnight runs delay feedback by hours, against DORA's few-minutes guidance. "Feedback only before a release, because that is when quality matters.": Testing only before a release is the batch-style approach that CI replaces. "Feedback within the current sprint is enough.": A sprint is far too slow; DORA asks for feedback in minutes per commit.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), DORA capability: Continuous integration

Question 3

Which description of trunk-based development matches DORA's definition?
  1. A.One release branch per environment, with changes promoted by merging between those branches
  2. B.Regular code freezes before each release so that the trunk can be stabilized and tested
  3. C.Fewer than three active branches, each living less than about a day before merging
  4. D.One long-lived branch per feature, merged into trunk only when the feature is complete

Correct answer: C

DORA characterizes trunk-based development by fewer than three active branches in a repository, branches and forks with very short lifetimes (less than a day) before being merged into mainline, and rarely or never having code-lock periods. Why the other options are wrong. "One release branch per environment, with changes promoted by ...": Environment branches are not how DORA defines trunk-based development. "Regular code freezes before each release so that the ...": DORA's definition says teams rarely or never have code-lock or freeze periods. "One long-lived branch per feature, merged into trunk only ...": That is the feature-branch model, which DORA contrasts with trunk-based development.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), DORA capability: Continuous delivery, DORA capability: Trunk-based development

Practice this topic

Focus mode keeps every question on Continuous Integration Fundamentals until you leave it. 10 free guest answers, then a free account; no credit card.

Or open CNPA practice across all topics.

Sources

The explanation above was checked against these official documents.