AeroCoder
Open the tools

DO-178C HANDBOOK · CONTENTS

DO-178C HANDBOOK

/

Verification

Requirements-Based Testing

Normal and robustness cases, equivalence classes, boundaries, test levels and test environments.

Desk summary

  • 01Every test used for certification credit is derived from, and traced to, a requirement — never from the code (Table A-6).
  • 02Each requirement gets normal range tests (valid classes, boundaries, time-related behaviour, state transitions, logic) and robustness tests (invalid values, failed inputs, abnormal start-up, illegal transitions, overflow).
  • 03Three test methods: hardware/software integration (HLR on the target), software integration (components working together) and low-level (LLR behaviour) — chosen to find different error classes.
  • 04Tests should run on the target or a target-equivalent environment; any difference must be analysed (§6.4.1).
  • 05A good test case states its requirement, category, type, inputs, steps, expected results and pass/fail criteria — clearly enough that someone else can run it.

Intuition

Requirements tell you what is right; testers must imagine what can go wrong

A requirement describes how the software should behave when everything was built correctly. It says nothing about which mistakes the developer probably made. Good requirements-based testing combines the two: the requirement sets the expected answer, and the tester’s knowledge of typical errors (off-by-one boundaries, wrong comparison operators, stale data, wrap-around, reset behaviour) decides which inputs to try. Testing is a creative act of destruction, aimed at the requirement.

What Table A-6 asks for

Table A-6 has five objectives: the executable object code complies with the HLR, is robust with the HLR, complies with the LLR, is robust with the LLR, and is compatible with the target computer. HLR normal and robustness testing applies at Levels A to D; LLR testing applies at Levels A to C (not D); independence for the LLR objectives is required at Levels A and B. Note what is being tested: the executable object code, not the source and not a model.

DO-178C Table A-6

Testing of Outputs of Integration Process

#ObjectiveRefABCDOutputs
1

Executable Object Code complies with high-level requirements

Normal-range requirements-based tests against the high-level requirements.

6.4.aSoftware Verification Cases and Procedures (11.13); Software Verification Results (11.14); Trace Data (11.21)
2

Executable Object Code is robust with high-level requirements

Robustness tests: abnormal inputs and conditions handled as required.

6.4.bSoftware Verification Cases and Procedures (11.13); Software Verification Results (11.14); Trace Data (11.21)
3

Executable Object Code complies with low-level requirements

6.4.c·Software Verification Cases and Procedures (11.13); Software Verification Results (11.14); Trace Data (11.21)
4

Executable Object Code is robust with low-level requirements

6.4.d·Software Verification Cases and Procedures (11.13); Software Verification Results (11.14); Trace Data (11.21)
5

Executable Object Code is compatible with target computer

Testing is done on the target (or a justified equivalent) to catch hardware interaction errors.

6.4.eSoftware Verification Cases and Procedures (11.13); Software Verification Results (11.14)
applies with independence
applies
· not required

A:5 B:5 C:5 D:3

Note

Why “requirements-based” and not “unit testing”

Software engineering texts talk about black-box and white-box testing. DO-178C avoids both terms. Tests written by reading the code tend to confirm what the code does rather than what it should do, so for credit every test traces to a requirement. Module-by-module “unit” tests are fine as low-level tests provided they are written against the LLR, and provided a separate plan shows how the modules are then integrated and tested together.

Normal range and robustness test selection

What each kind of test case covers (DO-178C §6.4.2)

Normal range (§6.4.2.1)

▸Real and integer inputs exercised with valid equivalence classes and boundary values
▸Time-related functions — filters, integrators, delays, debounces — run over enough iterations to show the characteristic behaviour in context
▸Every state transition that is possible in normal operation
▸Logic equations: variable usage and Boolean operators verified (requirements written as logic need tests that discriminate between operators)

Robustness (§6.4.2.2)

▸Invalid equivalence classes — out-of-range, invalid encodings, non-numbers
▸System initialisation under abnormal conditions
▸Failure modes of incoming data — stale, missing, corrupt, flagged invalid
▸Out-of-range loop counts where a loop count is computed
▸Protection mechanisms for exceeded frame times
▸Arithmetic overflow behaviour
▸State transitions that are not allowed — show they cannot happen

Equivalence classes

An equivalence class is a slice of the input domain in which every value should produce “the same kind” of behaviour, so testing one representative is as good as testing them all. Classes come from ranges, from membership in a group (valid ARINC labels, valid modes), from special values that require different handling (zero, negative, NaN) and from equivalent outputs. The skill lies in partitioning correctly: if two values you placed in one class actually behave differently, you will miss a defect; if you split classes needlessly, you waste tests.

Equivalence classes for an AHRS pitch attitude input (range ±90°, validity flag)

InputValid classes (normal)Invalid classes (robustness)
Pitch attitudeNegative (−90 to <0), zero, positive (>0 to +90)Below −90, above +90, NaN / non-numeric encoding
Validity flagValid (1)Invalid (0); flag valid but data stale (no refresh)
Number of valid sensors3, 2, 10 (all failed)

Boundary values

Errors cluster at edges: < written instead of <=, an off-by-one loop bound, a limit copied with the wrong sign. Boundary value analysis picks the extremes of each class — the minimum, just below, just above, the maximum — and also looks at boundaries in the output space (what inputs drive the output to its limit?). For a range of 0 to 400 knots, typical values are −1 (robustness), 0, 1, a mid value, 399, 400 and 401 (robustness). For loops: zero iterations, one, two, maximum − 1, maximum, and maximum + 1 where the count can be computed.

Practitioner tip

Tolerances belong in the requirement

A boundary test on a floating-point comparison needs a stated tolerance. If the requirement says “warn above 250 kt” without saying how the boundary is treated or what accuracy applies, the tester cannot write a pass/fail criterion. Send it back as a requirement problem rather than inventing a tolerance in the test.

State transitions and time-related functions

For mode logic (autopilot modes, landing gear sequencing, flap logic), draw the state machine and test every valid transition and every guard. Then test the transitions that must not occur — for example, that the autopilot cannot engage an approach mode without a valid localiser. For time-related functions, run long enough to show the shape of the response: a first-order lag must be seen to curve, not just ramp; a 3-frame debounce must be shown to reject a 2-frame glitch and accept a 3-frame condition; an integrator must be shown to saturate and recover per its anti-windup requirement.

Three levels of testing

Requirements-based test methods (DO-178C §6.4.3)

MethodMain requirement sourceError classes it targetsTypical environment
Hardware/software integration testingHLRInterrupt handling, timing, response to hardware transients and failures, bus contention, BIT, hardware interfaces, control loop behaviour, stack overflow, field-loading, partitioningTarget computer in a rig, often with real I/O and simulated aircraft environment
Software integration testingHLR and architecture (and LLR where needed)Wrong initialisation, parameter passing errors, corrupted (especially global) data, wrong sequencing of events, inadequate end-to-end numerical resolutionTarget or target-equivalent with the full integrated build
Low-level testingLLRAlgorithm errors, loop errors, incorrect logic, wrong handling of combinations of inputs, corrupt or missing data, exceptions, computation sequenceTarget or host/emulator with a justified difference analysis

Intuition

Each level catches a different species of bug

Low-level tests are a microscope: they prove the filter coefficients and the voter comparison are right. Software integration tests are a wiring check: the voter’s output reaches the control law with the right units, in the right frame. Hardware/software integration tests are the full dress rehearsal: does it all still work at 100 Hz on the real processor with a noisy ARINC bus? Credit from one level can sometimes cover another, but only with trace data and analysis showing both sets of requirements were genuinely exercised.

Pitfall

Module tests with stubs, then nothing

A frequent finding: every function is tested in isolation against its LLR with stubs and drivers, and then the only integrated testing is a short system-level demo. The interfaces between components — the very data and control couples Table A-7 asks about — were never exercised by requirements-based tests on the integrated build. See Data & Control Coupling.

Test environment and target equivalence

DO-178C §6.4.1 prefers testing on the target computer, because some errors only exist there: timing, interrupt interaction, compiler and processor behaviour, memory layout. Tests may run on a target emulator or a host simulator, but then the differences must be assessed to show the environment detects the same errors — through a documented difference analysis or by qualifying the emulator/simulator as a tool. Even then, some tests (at least the hardware/software integration set) must run on the real target.

  • —Configuration of the test environment is recorded in the Software Life Cycle Environment Configuration Index (SECI) and checked before formal runs.
  • —Test builds must represent the software being certified: same compiler, options and linker file. If instrumentation is used for coverage, the tests are also run without it and results compared.
  • —Test tools that decide pass/fail automatically without human review of outputs may need qualification.
  • —A test readiness review (not mentioned in DO-178C but almost universal) confirms baselines, reviewed procedures, closed dry-run issues, the configured station and the list of expected failures before for-score execution.

Structure of test cases and procedures

DO-178C distinguishes the test case (inputs, execution conditions and expected results for a particular objective) from the test procedure (detailed instructions for set-up, execution and evaluation of results). They may live in one file — an automated test script often is both — but each element must be present and traceable: requirement ↔ test case ↔ procedure ↔ result.

Test procedure skeleton

01

Header

Test ID and revision, author, software under test (part number / build), requirements tested, category (HLR / LLR / both), type (normal / robustness).

02

Set-up

Test station configuration (per SECI), loaded software, initial conditions, simulated sensor states, tolerances in force.

03

Stimulus steps

Numbered steps, each setting inputs and waiting a defined time or number of frames.

04

Checks

After each relevant step, the expected output with tolerance and the explicit pass/fail criterion.

05

Results and log

Who ran it, when, on which station and version, the actual outputs, pass/fail, redlines and any discrepancies raised as problem reports.

Worked example

Worked example: AHRS mid-value voter

Consider a helicopter flight control computer with three AHRS units. HLR-A: when three AHRS are valid, use the middle value of each parameter. HLR-B: when exactly two are valid, use their average. HLR-C: when one is valid, use it. HLR-D (robustness, derived): when none is valid, hold the last voted value and set the attitude-fail flag. The table below shows a compact requirements-based test set for pitch attitude. In the reference project, the equivalent model-level test suite had three test cases (mid-value, average, single) — notice how much robustness that leaves to be added.

Example test cases for pitch attitude voting (tolerance ±0.01°)

IDReqTypeInputs (AHRS1 / AHRS2 / AHRS3, valid flags)Expected output
TC-01HLR-ANormal2.0 / 5.0 / 3.0, all valid3.0 (middle value)
TC-02HLR-ANormal (ordering)5.0 / 2.0 / 3.0 and 3.0 / 5.0 / 2.0, all valid3.0 each time — middle selected regardless of which sensor holds it
TC-03HLR-ANormal (ties)4.0 / 4.0 / 1.0, all valid4.0
TC-04HLR-ABoundary−90.0 / 90.0 / 0.0, all valid0.0
TC-05HLR-BNormal2.0 / 6.0 / 80.0, AHRS3 invalid4.0 (average of valid pair)
TC-06HLR-CNormal7.0 / 1.0 / 2.0, only AHRS1 valid7.0
TC-07HLR-DRobustnessAll invalid after TC-01 stateHolds 3.0; attitude-fail flag set
TC-08HLR-ARobustnessAHRS2 = 120.0 (out of range) but flagged validBehaviour per requirement (e.g. treated invalid) — if no requirement exists, raise a PR
TC-09HLR-B/CTransition3 valid → 2 valid → 1 valid → 3 valid, one step per frameCorrect selection rule each frame; no transient spike at each change

What the auditor looks for

What reviewers probe in test data

Are robustness tests present and meaningful, or just a token out-of-range value? Does each test actually discriminate — would it fail if the code used < instead of <=, or averaged three sensors instead of taking the middle? Are expected results derived independently from the requirement (not copied from a run of the code)? Is there a test for every requirement, and does every test trace to a requirement? Could a stranger run the procedure and get the same answer?

Regression testing and changes

After a change, a change impact analysis uses trace data and data/control flow to identify affected requirements, design, code and tests. The regression set typically includes tests of the change, tests of potentially affected items, and a standard subset of safety-critical tests to catch side effects. With automated test suites, rerunning everything is often cheaper than justifying a partial regression — and much easier to defend.

Model-based development

Testing when requirements are models

On a model-based programme, requirements-based test cases are often first run as simulation cases on the design model (model-in-the-loop), then re-run on the generated code compiled for the host (software-in-the-loop), then on the target (processor-in-the-loop / hardware-in-the-loop). This is a powerful way to find errors early and to show model-to-code equivalence, but only the runs on the real executable object code in a target-representative environment earn Table A-6 credit. In the helicopter FCC reference project, the same three AHRS voter tests run on the model and on host-compiled code produced different coverage numbers (model: 97% decision, 100% execution; generated code on the host: 93% decision, 95% execution) — a reminder that model coverage and code coverage are different measurements of different artefacts.

Pitfall

Automatically generated tests

Test-generation tools that derive input vectors from a model or code to hit coverage objectives are useful for exploring, but those vectors are not requirements-based tests by default. If a generated vector is kept for credit, it needs a requirement it verifies, an expected result derived from that requirement and a review. A tool that generates requirements from the code and then tests against them should be avoided entirely.

Self-check

Which of these is a robustness test case in DO-178C’s sense?

Sources & further reading

  • RTCA DO-178C (2011) §6.4, §6.4.1, §6.4.2.1, §6.4.2.2, §6.4.3 and Annex A Table A-6
  • Rierson, Developing Safety-Critical Software (2013), ch. 9 (§9.6)
  • RTCA DO-331 (2011), simulation and testing of models
  • Helicopter FCC DO-178C/DO-331 reference project: AHRS voter requirements, REQ-based and SIL test reports
  • Kaner, Falk and Nguyen, Testing Computer Software, 2nd edn (1999) — equivalence classes and boundaries
  • FAA Order 8110.49A, Software Approval Guidelines (2018)

← Previous

Reviews & Analyses

Verification

Next →

Structural Coverage & MC/DC

Verification

On this page

What Table A-6 asks forNormal range and robustness test selectionThree levels of testingTest environment and target equivalenceStructure of test cases and proceduresRegression testing and changes