Official Purpose Statement (ASPICE v3.1): "The purpose of the Software Unit Verification Process is to verify software units to provide evidence for the compliance of the software units with the software detailed design and with non-functional software requirements."
SWE.4 is the first process on the right leg of the V-model and is the mirror of SWE.3. It verifies that what was built matches what was designed. SWE.4 is not integration testing (that is SWE.5) - it verifies individual software units in isolation. The key words in the purpose statement are "compliance with the software detailed design" - not with SWE.1 requirements. Requirements coverage is verified at SWE.6; design compliance is SWE.4's job.
📋 Learning Objectives
- Explain the distinction between unit verification (SWE.4) and integration testing (SWE.5) and qualification testing (SWE.6)
- Describe the SWE.4 Base Practices and required work products
- Specify test cases at the unit level: preconditions, inputs, expected outputs, pass/fail criteria
- Apply and report code coverage metrics (statement, branch, MC/DC) correctly
- Manage unit test regression and defects through to closure
SWE.4 Process Outcomes
| Outcome | Statement | Assessed Via |
|---|---|---|
| O1 | A unit test strategy and test cases are defined | Unit test plan or strategy document; test cases per unit with preconditions, inputs, expected outputs |
| O2 | Unit tests are performed and results are documented | Test execution records showing pass/fail per test case per unit, with tool/version/date |
| O3 | Consistency and bidirectional traceability between SWE.3 detailed design and unit tests | Test case → detailed design element trace; all design decisions covered by at least one test case |
| O4 | Regression testing applied to maintain compliance | Regression test suite exists; re-run on each change to the unit; results recorded |