Testing & Validation · Study deck

CI/CD Fundamentals for IoT

Imagine changing one line that controls a pump.

Test Tessa is your guide for this deck.

continuous-integrationcontinuous-deliverypipeline
Test Tessa, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • move a change through pipeline stages to a releasable candidate, repeatably
  • apply automated gates at each pipeline stage
  • explain what makes an IoT CI/CD pipeline different from a pure-software one
  • Explain: A fast test can catch a simple mistake, but the real device must still behave safely.
iotclass.org

Major section

Start With the Change That Must Ship

A fast test can catch a simple mistake, but the real device must still behave safely.

  • Continuous integration and continuous delivery (CI/CD) is a repeatable path that builds, checks, and records each change.
  • Firmware means the software stored inside the device.
  • A green early stage cannot replace a later physical check.
CI/CD release gate review showing four evidence groups: change scope, test coverage, release boundary, and retest trigger, producing approve, hold, rollback, or retest decisions.
The release gate compares change scope, test coverage, release boundary, and retest conditions before it approves, holds, rolls back, or requests another test.
iotclass.org

Major section

Overview: From a Change to a Releasable Candidate, Repeatably

Each stage can stop a weak build before it reaches the next cost tier.

  • Fast feedback now supports, rather than replaces, a controlled field rollout.
The CI/CD pipeline is an evidence path from a source change through build, static and unit checks, simulation, hardware-in-the-loop testing, and the release decision.
The CI/CD pipeline is an evidence path from a source change through build, static and unit checks, simulation, hardware-in-the-loop testing, and the release decision.
iotclass.org

Major section

Gate a Thermostat Firmware Change

For these CI/CD fundamentals, the thermostat pipeline can prove that the same source made the tested firmware artifact.

  • A unit test can check the 30 °C threshold.
  • Hardware-aware CI/CD fundamentals require a test that shows whether the real relay opens under load.
  • The physical power and relay interaction needs hardware validation.
The CI/CD pipeline is an evidence path from a source change through build, static and unit checks, simulation, hardware-in-the-loop testing, and the release decision.
The CI/CD pipeline is an evidence path from a source change through build, static and unit checks, simulation, hardware-in-the-loop testing, and the release decision.
iotclass.org

Major section

Summary

Continuous integration builds and tests every change automatically; continuous delivery keeps a tested, gated candidate ready to release.

  • The value is repeatable evidence and fast feedback, not automatic release.
  • A typical pipeline runs commit → build (per target) → static + unit → integration + hardware-aware → package + sign → release gate → staged delivery, each stage leaving evidence.
  • Automated quality gates stop a candidate that fails a required check; a gate is honest only when a skipped check is recorded with a reason and owner.
iotclass.org

Deck summary

Key takeaways

A fast test can catch a simple mistake, but the real device must still behave safely.

  • Each stage can stop a weak build before it reaches the next cost tier.
  • For these CI/CD fundamentals, the thermostat pipeline can prove that the same source made the tested firmware artifact.
  • Continuous integration builds and tests every change automatically; continuous delivery keeps a tested, gated candidate ready to release.
iotclass.org

Retrieval practice

Recall check 1 of 3

Test Tessa says: answer from memory, then check your reasoning.

Q1What does a CI/CD pipeline primarily provide for an IoT project?

AA guarantee that any compiling change is safe to deploy to every device
BA way to skip testing because automation replaces the need for test design
CRepeatable evidence, fast feedback, and a gated release candidate.
DFaster over-the-air transfer speeds to devices
Show answer

Answer: C The point is a repeatable, traceable record and quick feedback on each change, with release controlled by a gate, not automation for its own sake.

iotclass.org

Retrieval practice

Recall check 2 of 3

Test Tessa says: answer from memory, then check your reasoning.

Q2A firmware change alters how rejected sensor readings are encoded for downstream consumers, but the CI record only shows the image compiled and the parser's unit tests passed. What is the strongest gate decision?

AApprove it because the parser tests already check the new status encoding against an expected value.
BApprove it as long as the artifact carries a version label for release notes
CSkip the review, because CI/CD only concerns build automation and not contracts
DHold until integration evidence shows the encoded output seen by downstream consumers.
Show answer

Answer: D The changed behavior is a consumer-facing contract.

iotclass.org

Retrieval practice

Recall check 3 of 3

Test Tessa says: answer from memory, then check your reasoning.

Q3To save time, a team's pipeline rebuilds the firmware image at deploy time from the same commit instead of shipping the exact artifact that passed the tests. Why is this risky for IoT?

ARebuilding is acceptable because the source commit identifies the firmware under test.
BThe only risk is slower deployment, which more build servers would solve
CKeep the rebuild and compare version strings before sending the image to devices.
DThe shipped image may not match the tested artifact byte-for-byte
Show answer

Answer: D Rebuilding breaks the link between tested and shipped.

iotclass.org

Print reference

Answers

Answer key.

  1. C · The point is a repeatable, traceable record and quick feedback on each change, with release controlled by a gate, not automation for its own sake.
  2. D · The changed behavior is a consumer-facing contract.
  3. D · Rebuilding breaks the link between tested and shipped.
iotclass.org