In regulated industries—healthcare, finance, pharmaceuticals, aviation—test evidence isn’t just documentation; it’s proof of compliance. Regulatory bodies demand verifiable evidence that systems work as specified, meet safety standards, and undergo rigorous testing. This guide explores comprehensive approaches to creating, managing, and preserving compliance test evidence.
Understanding Compliance Testing Evidence
Compliance test evidence demonstrates that software systems meet regulatory requirements, industry standards, and internal quality policies. Unlike general testing documentation, compliance evidence must be:
- Auditable: Clear chain of custody and traceability
- Verifiable: Independent reviewers can validate results
- Tamper-proof: Immutable once created
- Comprehensive: Covers all regulatory requirements
- Retainable: Stored according to regulatory timelines
Regulatory Frameworks Requiring Test Evidence
regulatory_frameworks:
healthcare:
- name: "FDA 21 CFR Part 11"
region: "United States"
scope: "Electronic records and signatures in clinical trials"
evidence_requirements:
- "Validated computerized systems"
- "Audit trails for all changes"
- "Electronic signature authentication"
- name: "HIPAA"
region: "United States"
scope: "Health information privacy and security"
evidence_requirements:
- "Security testing documentation"
- "Access control validation"
- "Encryption testing results"
- name: "MDR (Medical Device Regulation)"
region: "European Union"
scope: "Medical device safety and performance"
evidence_requirements:
- "Risk-based testing evidence"
- "Clinical evaluation documentation"
- "Post-market surveillance data"
finance:
- name: "SOX (Sarbanes-Oxley)"
region: "United States"
scope: "Financial reporting accuracy"
evidence_requirements:
- "IT general controls testing"
- "Financial calculation validation"
- "Change management records"
- name: "PCI DSS"
region: "Global"
scope: "Payment card data security"
evidence_requirements:
- "Penetration testing reports"
- "Vulnerability scan results"
- "Security testing evidence"
- name: "GDPR"
region: "European Union"
scope: "Data protection and privacy"
evidence_requirements:
- "Data processing validation"
- "Consent management testing"
- "Data deletion verification"
aviation:
- name: "DO-178C"
region: "Global"
scope: "Airborne software safety"
evidence_requirements:
- "Requirements-based testing"
- "Structural coverage analysis"
- "Traceability matrices"
pharmaceuticals:
- name: "GxP (Good Practices)"
region: "Global"
scope: "Drug manufacturing and testing"
evidence_requirements:
- "Validated system testing"
- "Change control documentation"
- "Electronic batch records"
Evidence Documentation Structure
Compliance Test Evidence Template
# Compliance Test Evidence Report
## Document Control
**Document ID**: CTE-2025-042
**Version**: 1.0
**Status**: Approved
**Classification**: Confidential - Regulatory Submission
**Prepared By**: Maria Garcia, Senior QA Lead
**Reviewed By**: Dr. James Wilson, Quality Manager
**Approved By**: Sarah Chen, Regulatory Affairs Director
**Preparation Date**: 2025-10-10
**Review Date**: 2025-10-12
**Approval Date**: 2025-10-15
**Regulatory Framework**: FDA 21 CFR Part 11
**System**: Clinical Trial Management System (CTMS) v3.2
**Testing Phase**: User Acceptance Testing (UAT)
---
## Executive Summary
This document provides compliance test evidence for the Clinical Trial Management System (CTMS) version 3.2, demonstrating adherence to FDA 21 CFR Part 11 requirements for electronic records and electronic signatures.
**Scope of Testing**:
- Electronic signature authentication (§11.50)
- Audit trail functionality (§11.10)
- System validation (§11.10(a))
- Data integrity controls (§11.10(c))
**Testing Period**: 2025-09-15 to 2025-10-10
**Test Environment**: Validated UAT Environment (ENV-UAT-003)
**Test Data**: Synthetic patient data (anonymized)
**Summary of Results**:
- Total Test Cases Executed: 87
- Passed: 85
- Failed (Resolved): 2
- Compliance Status: **COMPLIANT**
---
## Regulatory Requirements Traceability
### Requirement Mapping
| Requirement ID | Regulation Reference | Description | Test Cases | Evidence | Status |
|----------------|---------------------|-------------|------------|----------|--------|
| REQ-AUTH-001 | 21 CFR 11.50(a) | Unique user authentication | TC-AUTH-001 to TC-AUTH-015 | Screenshots, logs, test results | ✅ Pass |
| REQ-AUDIT-002 | 21 CFR 11.10(e) | Complete audit trail | TC-AUDIT-001 to TC-AUDIT-025 | Audit trail exports, validation reports | ✅ Pass |
| REQ-SIG-003 | 21 CFR 11.70 | Electronic signature components | TC-SIG-001 to TC-SIG-012 | Signature verification logs | ✅ Pass |
| REQ-INTEG-004 | 21 CFR 11.10(c) | Data integrity checks | TC-INTEG-001 to TC-INTEG-020 | Hash validation, integrity reports | ✅ Pass |
| REQ-ACCESS-005 | 21 CFR 11.10(d) | Access control limitations | TC-ACCESS-001 to TC-ACCESS-015 | Access logs, permission matrices | ✅ Pass |
### Requirements Coverage Analysis
**Coverage Metrics**:
- Total Regulatory Requirements: 42
- Requirements with Test Coverage: 42 (100%)
- Requirements with Evidence: 42 (100%)
- Requirements Verified by Independent Reviewer: 42 (100%)
---
## Test Evidence Details
### Test Case: TC-AUTH-001 - User Authentication with Valid Credentials
**Objective**: Verify that system authenticates users using unique username/password combinations per 21 CFR 11.50(a).
**Regulatory Reference**: FDA 21 CFR Part 11, Section 11.50(a)
> "Persons who use electronic signatures shall, prior to or at the time of such use, certify to the agency that the electronic signatures in their system...are intended to be the legally binding equivalent of traditional handwritten signatures."
**Test Data**:
- Username: `qa_user_001@example.com`
- Password: `[REDACTED - See Secure Vault]`
- User Role: Clinical Investigator
- Test Date: 2025-10-05 14:30 UTC
**Test Procedure**:
1. Navigate to system login page
2. Enter username: `qa_user_001@example.com`
3. Enter password (from secure vault)
4. Click "Sign In" button
5. Verify successful authentication
6. Verify audit trail entry created
**Expected Results**:
- User authenticated successfully
- Redirected to role-appropriate dashboard
- Audit trail entry: "User login successful" with timestamp
- Session established with 30-minute timeout
**Actual Results**:
- ✅ User authenticated successfully at 2025-10-05 14:30:15 UTC
- ✅ Redirected to Clinical Investigator dashboard
- ✅ Audit trail entry created (Entry ID: AUD-20251005-143015-001)
- ✅ Session timeout configured to 30 minutes
**Evidence Artifacts**:
1. **Screenshot**: `TC-AUTH-001_login_page.png` (SHA-256: a3b4c5d6...)
2. **Screenshot**: `TC-AUTH-001_success_dashboard.png` (SHA-256: 7e8f9g0h...)
3. **Audit Trail Export**: `TC-AUTH-001_audit_trail.csv` (SHA-256: i1j2k3l4...)
4. **System Logs**: `TC-AUTH-001_system_logs.txt` (SHA-256: m5n6o7p8...)
5. **Test Execution Video**: `TC-AUTH-001_execution.mp4` (SHA-256: q9r0s1t2...)
**Witness**:
- Tester: Maria Garcia (Signature: [Digital Signature])
- Independent Reviewer: Dr. James Wilson (Signature: [Digital Signature])
- Date: 2025-10-05
**Compliance Assessment**: **PASS** - Meets 21 CFR 11.50(a) requirements
---
### Test Case: TC-AUDIT-005 - Audit Trail Immutability
**Objective**: Verify that audit trail entries cannot be modified or deleted, ensuring data integrity per 21 CFR 11.10(e).
**Regulatory Reference**: FDA 21 CFR Part 11, Section 11.10(e)
> "Use of secure, computer-generated, time-stamped audit trails to independently record...operator entries and actions that create, modify, or delete electronic records."
**Test Procedure**:
1. Create a patient record (Record ID: PAT-TEST-001)
2. Modify patient data (change date of birth)
3. Attempt to modify audit trail entry via:
- Database direct access
- API manipulation
- Application interface
4. Attempt to delete audit trail entry
5. Verify audit trail integrity
**Actual Results**:
- ✅ Patient record created: PAT-TEST-001
- ✅ Modification logged in audit trail (Entry ID: AUD-20251005-150000-042)
- ✅ Database modification prevented by table constraints
- ✅ API modification returned 403 Forbidden
- ✅ UI provides no delete/edit option for audit entries
- ✅ Audit trail integrity hash validated
**Evidence Artifacts**:
1. **Database Schema**: `audit_trail_table_constraints.sql` - Shows immutable constraints
2. **API Response**: `TC-AUDIT-005_api_403_response.json` - Modification attempt blocked
3. **Integrity Report**: `TC-AUDIT-005_hash_validation.pdf` - Hash chain verification
4. **Screenshots**: `TC-AUDIT-005_modification_attempt_*.png` - All modification attempts
5. **Technical Specification**: Reference to System Design Doc Section 4.2.3
**Compliance Assessment**: **PASS** - Meets 21 CFR 11.10(e) requirements
---
## Defect Resolution Evidence
### Defect: DEF-UAT-023 - Audit Trail Timestamp Time Zone Issue
**Discovery Date**: 2025-09-28
**Severity**: High (Compliance Impact)
**Regulation Impact**: 21 CFR 11.10(e) - Audit trail accuracy
**Description**:
Audit trail timestamps were being recorded in local server time (PST) instead of UTC, causing ambiguity for multi-timezone trials.
**Regulatory Risk**:
- Timestamps could be misinterpreted across time zones
- Does not meet "independently record" requirement if ambiguous
**Resolution**:
- **Fix Applied**: 2025-10-01
- **Fix Description**: Updated audit trail service to record all timestamps in UTC with ISO 8601 format
- **Verification**: Regression test suite re-executed
- **Re-test Results**: All audit trail tests passed with UTC timestamps
**Re-test Evidence**:
- Test Case: TC-AUDIT-005 (re-executed 2025-10-03)
- Result: PASS
- Evidence: `TC-AUDIT-005_retest_results.pdf`
- Audit Trail Sample: Shows UTC timestamps with timezone indicator
**Compliance Impact Assessment**:
✅ Issue resolved before production deployment
✅ No production data affected
✅ Enhanced controls prevent recurrence
✅ Compliance status: MAINTAINED
---
Audit Trail Requirements
Audit Trail Format and Content
audit_trail_specification:
required_fields:
- event_id: "Unique identifier for each event"
- timestamp: "UTC timestamp (ISO 8601 format)"
- user_id: "ID of user performing action"
- user_name: "Full name of user"
- action: "Descriptive action performed"
- object_type: "Type of object affected (Patient, Study, etc.)"
- object_id: "Unique ID of affected object"
- old_value: "Value before change (for modifications)"
- new_value: "Value after change (for modifications)"
- ip_address: "Source IP address"
- session_id: "User session identifier"
- reason: "Reason for change (if applicable)"
example_entry:
event_id: "AUD-20251010-143022-001"
timestamp: "2025-10-10T14:30:22.000Z"
user_id: "USER-12345"
user_name: "Dr. Jane Smith"
action: "MODIFY_PATIENT_DATA"
object_type: "Patient"
object_id: "PAT-67890"
old_value: "DOB: 1990-05-15"
new_value: "DOB: 1990-05-14"
ip_address: "192.168.1.100"
session_id: "SES-ABC123DEF456"
reason: "Data entry correction per source document"
digital_signature: "[Encrypted signature hash]"
immutability_controls:
- database_constraints: "Audit table has INSERT-only permissions"
- hash_chaining: "Each entry contains hash of previous entry"
- write_once_storage: "WORM (Write Once Read Many) storage tier"
- blockchain_integration: "Optional: Distributed ledger for critical systems"
export_formats:
- csv: "Human-readable export for review"
- json: "Machine-readable for analysis"
- pdf: "Signed PDF for regulatory submission"
- xml: "Structured format for system integration"
Audit Trail Evidence Example
Event ID,Timestamp (UTC),User,Action,Object Type,Object ID,Old Value,New Value,IP Address,Reason
AUD-20251010-140000-001,2025-10-10T14:00:00.000Z,Dr. Jane Smith,CREATE_PATIENT,Patient,PAT-67890,NULL,{demographics},192.168.1.100,New patient enrollment
AUD-20251010-141500-002,2025-10-10T14:15:00.000Z,Dr. Jane Smith,MODIFY_PATIENT,Patient,PAT-67890,DOB:1990-05-15,DOB:1990-05-14,192.168.1.100,Correction per source document
AUD-20251010-143000-003,2025-10-10T14:30:00.000Z,Dr. Robert Lee,VIEW_PATIENT,Patient,PAT-67890,NULL,NULL,192.168.1.101,Medical review
AUD-20251010-150000-004,2025-10-10T15:00:00.000Z,System,BACKUP_COMPLETE,System,DB-MAIN,NULL,NULL,Internal,Automated daily backup
Retention Policies
Evidence Retention Requirements by Regulation
retention_policies:
fda_21_cfr_11:
retention_period: "Duration of device/drug lifecycle + 2 years minimum"
storage_requirements:
- "Validated electronic archive system"
- "Regular backup and disaster recovery"
- "Migration plan for technology obsolescence"
destruction_policy: "Secure deletion with certificate of destruction"
hipaa:
retention_period: "6 years from creation or last use"
storage_requirements:
- "Encrypted at rest and in transit"
- "Access controls with audit logging"
- "Business Associate Agreements for vendors"
destruction_policy: "NIST 800-88 compliant media sanitization"
sox:
retention_period: "7 years"
storage_requirements:
- "Immutable storage (WORM)"
- "Redundant storage across geographic locations"
- "Annual validation of retrievability"
destruction_policy: "Documented destruction with executive approval"
gdpr:
retention_period: "As long as necessary for purpose (minimize)"
storage_requirements:
- "Data minimization applied"
- "Right to erasure capability"
- "Pseudonymization where possible"
destruction_policy: "Complete and verifiable deletion within 30 days"
do_178c:
retention_period: "Aircraft operational lifetime + 10 years"
storage_requirements:
- "Configuration management system"
- "Traceability to requirements"
- "Version control for all artifacts"
destruction_policy: "Not applicable - permanent retention"
Evidence Archive Structure
# Compliance Evidence Archive Structure
compliance-evidence/
├── 2025/
│ ├── Q4/
│ │ ├── October/
│ │ │ ├── CTMS-v3.2/
│ │ │ │ ├── test-evidence/
│ │ │ │ │ ├── TC-AUTH-001/
│ │ │ │ │ │ ├── test-case-specification.pdf (signed)
│ │ │ │ │ │ ├── screenshots/
│ │ │ │ │ │ ├── logs/
│ │ │ │ │ │ ├── audit-trails/
│ │ │ │ │ │ ├── execution-video.mp4
│ │ │ │ │ │ └── manifest.json (with checksums)
│ │ │ │ │ ├── TC-AUTH-002/
│ │ │ │ │ └── ...
│ │ │ │ ├── regulatory-reports/
│ │ │ │ │ ├── compliance-test-summary.pdf (signed)
│ │ │ │ │ ├── traceability-matrix.xlsx (signed)
│ │ │ │ │ ├── defect-resolution-report.pdf (signed)
│ │ │ │ │ └── regulatory-submission-package.zip
│ │ │ │ ├── approvals/
│ │ │ │ │ ├── qa-lead-approval.pdf (digitally signed)
│ │ │ │ │ ├── quality-manager-approval.pdf (digitally signed)
│ │ │ │ │ └── regulatory-affairs-approval.pdf (digitally signed)
│ │ │ │ └── metadata/
│ │ │ │ ├── archive-manifest.json
│ │ │ │ ├── retention-schedule.pdf
│ │ │ │ └── chain-of-custody.log
├── retention-policy.pdf
├── archive-procedures.pdf
└── destruction-log.csv
Evidence Formats and Standards
Accepted Evidence Formats
evidence_formats:
screenshots:
formats: ["PNG", "JPEG"]
requirements:
- "Full screen capture (not cropped)"
- "Timestamp visible in screenshot"
- "Username visible where applicable"
- "Include browser/app version info"
- "Minimum resolution: 1920x1080"
naming_convention: "TC-{TEST_ID}_{DESCRIPTION}_{TIMESTAMP}.png"
metadata: "EXIF data preserved, SHA-256 hash calculated"
videos:
formats: ["MP4", "AVI"]
requirements:
- "Screen recording with audio narration (optional)"
- "Cursor movements visible"
- "Minimum 30 FPS"
- "Maximum 15 minutes per file"
naming_convention: "TC-{TEST_ID}_execution_{TIMESTAMP}.mp4"
logs:
formats: ["TXT", "LOG", "JSON"]
requirements:
- "Complete log capture (no filtering)"
- "UTC timestamps"
- "Log level included"
- "PII redacted if applicable"
retention: "Original logs + redacted versions"
reports:
formats: ["PDF/A (archival)", "DOCX (working)"]
requirements:
- "Digital signatures required"
- "PDF/A-2b standard for long-term archival"
- "Embedded fonts"
- "OCR text layer for scanned documents"
- "Version watermarks"
database_exports:
formats: ["CSV", "XML", "JSON", "SQL dump"]
requirements:
- "Schema documentation included"
- "Export timestamp"
- "Row count verification"
- "Checksum for integrity"
code_artifacts:
formats: ["Source code with version tag"]
requirements:
- "Git commit SHA recorded"
- "Build artifacts with checksums"
- "Dependency manifest (package.json, requirements.txt)"
- "Configuration files"
Digital Signature Requirements
digital_signature_specification:
standards:
- "FDA 21 CFR Part 11 compliant"
- "EU eIDAS regulation compliant"
- "PKI infrastructure with trusted CA"
signature_components:
- printed_name: "Dr. Jane Smith, MD"
- signature_meaning: "Reviewed and Approved"
- date_time: "2025-10-15 14:30:00 UTC"
- signature_algorithm: "RSA-4096 with SHA-256"
- certificate_authority: "Company Internal CA"
- certificate_serial: "1A2B3C4D5E6F7G8H"
verification_process:
- "Certificate chain validation"
- "Revocation list checking (CRL/OCSP)"
- "Timestamp authority verification"
- "Document integrity hash validation"
signature_display:
- "Visual representation in PDF"
- "Signature panel showing all components"
- "Validation status indicator"
- "Long-term validation (LTV) enabled"
Best Practices for Compliance Evidence
Evidence Collection Checklist
## Compliance Test Evidence Collection Checklist
### Pre-Test Preparation
- [ ] Regulatory requirements documented and mapped to test cases
- [ ] Test environment validated and locked down
- [ ] Test data prepared and reviewed (PII handled appropriately)
- [ ] Evidence storage location prepared with access controls
- [ ] Witness/reviewer assigned and available
- [ ] Digital signature certificates validated
### During Test Execution
- [ ] Test case ID clearly referenced in all artifacts
- [ ] Screenshots captured at each critical step
- [ ] Timestamps visible and in UTC
- [ ] Audit trail entries reviewed in real-time
- [ ] Unexpected results immediately documented
- [ ] System logs captured continuously
### Post-Test Documentation
- [ ] All evidence artifacts collected and organized
- [ ] SHA-256 checksums calculated for all files
- [ ] Test results documented with pass/fail status
- [ ] Defects logged with regulatory impact assessment
- [ ] Evidence reviewed by independent party
- [ ] Digital signatures applied
- [ ] Archive manifest created
### Regulatory Submission Package
- [ ] Traceability matrix complete (requirements → tests → evidence)
- [ ] All test cases included (including failed/resolved)
- [ ] Defect resolution evidence included
- [ ] Executive summary prepared
- [ ] Compliance assessment statement
- [ ] All required approvals obtained
- [ ] Package encrypted and checksummed
Common Pitfalls to Avoid
Pitfall | Impact | Mitigation |
---|---|---|
Missing traceability | Audit failure | Automated traceability matrix generation |
Incomplete evidence | Re-testing required | Evidence collection checklist mandatory |
Modified evidence | Regulatory violation | Write-once storage, hash validation |
Lost evidence | Compliance gap | Redundant storage, annual validation |
Unclear test results | Interpretation issues | Standardized result templates |
Missing signatures | Invalid evidence | Automated signature workflow |
Timezone confusion | Audit trail ambiguity | Always UTC, ISO 8601 format |
PII exposure | Privacy violation | Automated PII redaction tools |
Conclusion
Compliance test evidence is the foundation of regulatory submissions and audit defense. By systematically documenting regulatory requirements, maintaining immutable audit trails, implementing robust retention policies, and using standardized evidence formats, organizations can demonstrate compliance confidence.
Remember: In regulated industries, if it’s not documented with verifiable evidence, it didn’t happen. Invest in rigorous evidence management to protect your organization, your products, and ultimately, the end users who depend on them.