ASPICE SWE.4/SWE.6 Traceability
ASPICE requires bidirectional traceability between test cases and requirements. Every test case must reference at least one requirement, and every requirement must be covered by at least one test case. Automated test frameworks make this tractable through metadata annotations:
- pytest markers: @pytest.mark.req("SWR-001") links test to requirement
- ECU-TEST attributes: requirement ID stored as test case attribute in workspace
- Robot Framework tags: [Tags] SWR-001 ASIL-B in test case header
Coverage gap analysis: which requirements have zero test cases? Which test cases reference non-existent requirements? Both are ASPICE audit findings.