Verification and Validation Plan#
Document ID |
DHF-006 |
|---|---|
Version |
1.0 |
Date |
2026-03-22 |
Author |
pacs008 Engineering |
Status |
Released |
ISO 13485 Clauses |
7.3.5 (Verification), 7.3.6 (Validation), 7.3.7 (Design Transfer) |
1. Test Strategy#
The verification strategy follows a layered approach from unit tests through system-level validation:
Unit Tests — Individual functions and classes tested in isolation
Integration Tests — Module interactions and data flow pipelines
System Tests — End-to-end workflows from data ingestion through XML output and validation
Regression Tests — Gold master comparison against known-good reference outputs for all 13 versions
All tests are automated and executed on every commit via GitHub Actions CI.
2. Test Categories and Markers#
Marker |
Category |
Description |
|---|---|---|
|
Smoke |
Quick sanity checks confirming core functionality is operational. Run first in CI for fast feedback. |
|
Integration |
End-to-end workflow tests spanning multiple modules. Verify that components work together correctly. |
|
Security |
XXE prevention, path traversal, injection attack, and log sanitization tests. |
|
Version Compatibility |
Tests exercising all 13 pacs.008 versions (v01 through v13). Verify version dispatch and version-specific features. |
|
Performance |
Benchmark tests measuring generation throughput and resource usage. |
|
Slow |
Tests taking more than 1 second. May be excluded from rapid development cycles. |
Running specific categories:
pytest -m smoke # Quick sanity checks
pytest -m integration # End-to-end workflows
pytest -m security # Security-focused tests
pytest -m version_compat # All 13 versions
pytest -m perf # Performance benchmarks
3. Test File Inventory#
3.1 Core Processing Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
|
FR-101, FR-601 |
|
|
FR-601 |
|
|
FR-102, NFR-503 |
|
Application context singleton |
NFR-501 |
|
Exception hierarchy and custom exception fields |
FR-701, FR-702, FR-703, FR-704 |
3.2 XML Generation and Validation Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
XML generation for all 13 versions, version dispatch mechanism |
FR-101, FR-102, FR-104, FR-501–FR-505 |
|
|
FR-103, NFR-101 |
|
XSD validation at enterprise scale |
FR-103, NFR-401 |
|
|
FR-105 |
|
End-to-end gold master: source → ingestion → XML → XSD for all 13 versions |
FR-101, FR-102, FR-103 |
|
Version compatibility matrix across all 13 versions |
FR-102, FR-501–FR-505 |
3.3 Data Ingestion Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
|
FR-201, FR-208 |
|
|
FR-201, FR-304 |
|
|
FR-202, FR-203, FR-208 |
|
|
FR-204, FR-208, NFR-102 |
|
|
FR-205, FR-208 |
|
Universal |
FR-201–FR-207 |
|
Extended data loader tests with multiple formats |
FR-201–FR-208 |
3.4 Validation Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
BIC format validation (ISO 9362), country code validation |
FR-302 |
|
IBAN format + ISO 7064 mod-97-10 checksum verification |
FR-303 |
|
Validation module integration |
FR-301, FR-304 |
|
|
FR-305 |
3.5 Compliance Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
SWIFT charset validation, field length enforcement, transliteration |
FR-401, FR-402, FR-403, FR-404 |
3.6 Interface Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
Basic FastAPI endpoints: |
FR-603 |
|
Extended API functionality and edge cases |
FR-603, FR-604 |
|
Comprehensive API integration tests |
FR-603, FR-604 |
|
Pydantic request/response models ( |
FR-603 |
|
Full CLI workflow with all options |
FR-602 |
|
CLI integration with real file processing |
FR-602 |
|
Async job management: |
FR-604 |
3.7 Security Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
Path traversal protection: |
NFR-102, NFR-103 |
|
Structured logging: |
NFR-103, NFR-501 |
3.8 Coverage Gap Tests#
Test File |
Purpose |
Requirements |
|---|---|---|
|
Additional coverage for uncovered code paths |
NFR-201 |
|
Final coverage gaps (mutation testing) |
NFR-201 |
|
Remaining code coverage gaps |
NFR-201 |
4. Gold Master Tests#
The test_gold_master.py file provides end-to-end regression testing for all
13 pacs.008 versions. For each version:
Load reference payment data from a known input fixture
Generate XML using the version-specific template and preparer
Validate generated XML against the official XSD schema
Compare output against a known-good reference XML file
Gold master fixtures are stored in pacs008/templates/pacs.008.001.XX/
as .xml reference files for each of the 13 versions.
5. Static Analysis Tools#
Tool |
Type |
Configuration |
|---|---|---|
mypy |
Type checking |
|
ruff |
Linting |
|
black |
Formatting |
|
bandit |
SAST |
|
safety |
Dependency audit |
Checks pinned dependencies against known vulnerability database |
6. CI Pipeline#
The GitHub Actions CI pipeline (.github/workflows/ci.yml) runs on every
push and pull request:
Job |
Matrix |
Actions |
|---|---|---|
test |
3 OS (ubuntu, macos, windows) x 4 Python (3.9, 3.10, 3.11, 3.12) |
Install dependencies, run full test suite with coverage, upload coverage to Codecov (Python 3.12 / ubuntu only) |
smoke |
ubuntu-latest, Python 3.12 |
Run |
lint |
ubuntu-latest, Python 3.12 |
Run |
security |
ubuntu-latest, Python 3.12 |
Run |
Total CI matrix: 14 configurations (12 test + 1 lint + 1 security)
7. Acceptance Criteria#
The software release is accepted when all of the following are satisfied:
# |
Criterion |
Verification Method |
|---|---|---|
1 |
All 1,417 tests pass on all CI matrix configurations |
GitHub Actions test job (12 configs) |
2 |
Branch coverage >= 99% (actual: 100%) |
|
3 |
Zero bandit SAST findings |
GitHub Actions security job |
4 |
Zero mypy strict-mode errors |
GitHub Actions lint job |
5 |
Zero ruff/black formatting violations |
GitHub Actions lint job |
6 |
All 13 gold master tests pass (one per pacs.008 version) |
|
7 |
All pre-commit hooks pass |
|
8 |
All XSD schemas validate correctly |
|
9 |
All risk mitigations verified by tests |
DHF-005 Risk Control Verification table |