Test Plan
Introduction
This test plan covers MVP requirements (49 functional requirements, 22 non-functional requirements).
Test Strategy
Test Levels
Level |
Scope |
Tools |
|---|---|---|
Unit |
Individual functions |
Rust |
Integration |
Component interactions |
Rust integration tests |
System |
End-to-end workflows |
Manual testing |
Features Not Tested
Feature |
Reason |
|---|---|
USB hardware failures |
External dependency |
Filesystem internals |
Platform dependency |
Tar format compliance |
Third-party library |
Test Automation Approach
MVP: Manual testing primarily. Unit tests for core logic.
Unit tests (automatable):
Component |
What to Test |
|---|---|
chunker.rs |
Chunk size calculations, streaming logic |
verifier.rs |
Checksum generation and verification |
manifest.rs |
JSON serialization, state management |
Integration tests (partially automatable):
Test |
Automation Notes |
|---|---|
Pack + Unpack workflow |
Use temp directories |
Manifest persistence |
In-memory filesystem |
Checksum verification |
Known test vectors |
System tests (manual only):
Test |
Why Manual |
|---|---|
USB detection |
Requires physical USB hardware |
Cross-platform behavior |
Requires multiple test machines |
Large file handling |
Time-intensive, requires disk space |
Resume after interruption |
Requires manual interruption |
Test Cases by Category
Pack Operation Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Pack Single File into Chunks |
high |
||
Pack Directory into Chunks |
high |
||
Auto-Detect USB Capacity |
high |
||
Generate Chunk Checksums |
high |
||
Create Manifest File |
high |
||
Stream Without Temp Files |
high |
||
Manual Chunk Size Specification |
medium |
||
Progress Reporting |
medium |
||
USB Swapping Prompt |
medium |
||
Resume Interrupted Pack |
medium |
||
Pack Command Syntax |
high |
||
Pack 10GB in < 10 Minutes |
high |
Verify pack operation splits single file into chunks |
Verify pack operation handles directory with multiple files |
Verify automatic detection of USB drive capacity |
Verify checksums generated for each chunk using the configured hash algorithm |
Verify manifest file creation with chunk metadata |
Verify pack operation streams data without intermediate temp files |
Verify manual chunk size override functionality |
Verify progress reporting during pack operation |
Verify system prompts for USB swapping when multiple chunks needed |
Unpack Operation Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Unpack Uses Manifest Algorithm |
high |
||
Resume Interrupted Unpack |
medium |
||
Unpack Command Syntax |
high |
||
Reconstruct Files from Chunks |
high |
||
Verify Chunk Checksums |
high |
||
Place Files in Destination |
high |
||
Validate Chunk Completeness |
high |
||
Resume Partial Unpack |
medium |
||
Delete Chunks After Unpack |
medium |
||
Unpack Progress Display |
medium |
Verify unpack reconstructs original files from chunks |
Verify chunk checksums before reconstruction |
Verify files placed in correct destination directory |
Verify all required chunks present before unpack |
Verify unpack can resume after interruption |
Verify optional chunk deletion after successful unpack |
Verify progress reporting during file reconstruction |
List Operation Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Display Chunk Inventory |
high |
||
Show Chunk Sizes and Status |
high |
||
Identify Missing Chunks |
medium |
||
Show Estimated Total Size |
medium |
||
List Command Syntax |
high |
Verify list command displays all available chunks |
Verify list shows chunk sizes and completion status |
Verify list identifies missing chunks from manifest |
Verify list shows estimated total transfer size |
Integrity Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Generate SHA-256 Checksums |
critical |
||
Verify Checksums During Unpack |
critical |
||
Detect Corrupted Chunks |
critical |
||
Verify Final File Integrity |
high |
||
Checksum Verification Reliability |
critical |
||
Data Corruption Detection |
critical |
Verify checksums generated for all chunks using the configured hash algorithm |
Verify checksums validated during unpack operation |
Verify corrupted chunks detected via checksum mismatch |
Verify final reconstructed file integrity matches original |
Cryptographic Agility Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Select Hash Algorithm via CLI |
high |
||
Default Hash Algorithm |
high |
||
Algorithm Recorded in Manifest |
high |
||
Unpack Uses Manifest Algorithm |
high |
||
Pluggable Hash Backend Interface |
high |
||
Invalid Algorithm Rejected |
medium |
||
Cryptographic Agility Architecture |
high |
Preconditions: Application built and available Steps:
Pass Criteria: Checksums generated using the user-specified algorithm; manifest records the correct algorithm identifier. |
Preconditions: Application built and available Steps:
Pass Criteria: Default algorithm is SHA-256; manifest shows |
Preconditions: Pack completed with a non-default algorithm Steps:
Pass Criteria: Manifest correctly identifies the algorithm used; checksum prefixes are consistent. |
Preconditions: Chunks packed with a non-default algorithm Steps:
Pass Criteria: Unpack automatically uses the algorithm recorded in the manifest; verification succeeds. |
Preconditions: Source code available Steps:
Pass Criteria: Trait-based interface exists; multiple backends can coexist; new backends do not require changes to other modules. |
Preconditions: Application built and available Steps:
Pass Criteria: Clear error message listing supported algorithms; operation does not proceed. |
State Management Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Persist Operation State |
high |
||
Track Chunk Completion |
high |
||
Resume Interrupted Pack |
medium |
||
Resume Interrupted Unpack |
medium |
Verify operation state persisted to disk |
Verify chunk completion tracked in state file |
Verify pack operation can resume after interruption |
Verify unpack operation can resume after interruption |
Command Interface Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Select Hash Algorithm via CLI |
high |
||
Default Hash Algorithm |
high |
||
Pack Command Syntax |
high |
||
Unpack Command Syntax |
high |
||
List Command Syntax |
high |
||
Dry-Run Mode |
high |
||
No-Verify Flag |
high |
||
Chunk Size Flag |
medium |
||
Verbose Flag |
medium |
||
Help Text Availability |
high |
Verify pack command accepts correct syntax and arguments |
Verify unpack command accepts correct syntax and arguments |
Verify list command accepts correct syntax and arguments |
Verify dry-run mode previews operation without execution |
Verify that checksum verification is enabled by default and that the –no-verify flag disables it |
Verify –chunk-size flag allows manual chunk size specification |
Verify –verbose flag enables detailed output logging |
Error Handling Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Invalid Algorithm Rejected |
medium |
||
Insufficient USB Capacity Error |
high |
||
Missing Chunks Error |
high |
||
Clear Error Messages |
high |
Verify error when USB capacity insufficient for chunk |
Verify error when required chunks missing during unpack |
Verify all error messages clear and actionable |
Safety Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Confirm File Overwrite |
high |
||
Validate Destination Paths |
high |
||
USB Sync Before Removal |
high |
||
Atomic Operations |
high |
Verify confirmation required before overwriting existing files |
Verify destination paths validated before write |
Verify USB synced before prompting for removal |
Verify operations are atomic where possible (no partial state on failure) |
Deployment Tests
Verify all dependencies available for offline build via cargo vendor |
Verify build process works without internet after initial setup |
Verify deployment produces single, static binary with no external dependencies |
Non-Functional Tests
ID |
Title |
Tests |
Priority |
|---|---|---|---|
Pack 10GB in < 10 Minutes |
high |
||
Memory Usage < 100 MB |
medium |
||
Streaming Architecture Verification |
high |
||
Concurrent Chunk Processing |
low |
Verify 10GB file packs in under 10 minutes |
Verify memory usage stays under 100 MB during operations |
Verify 100% functionality with network disconnected |
Verify functionality on Linux, macOS, Windows |
Verify no network calls under any circumstance (monitor with network sniffer) |
Verify build and execution on air-gapped system with vendored dependencies |
Verify all chunks verified with the manifest-specified hash algorithm before reconstruction |
Verify running pack operation multiple times produces same output without errors |
Verify Ctrl+C during pack/unpack allows resume without data loss |
Verify corrupted chunks detected via checksum mismatch with clear error message |
Verify progress indicators shown for operations >2 seconds |
Verify error messages include failure details and suggested fixes |
Verify –help flag provides comprehensive help for all commands |
Verify new user can transfer file in <5 minutes using provided examples |
Verify codebase achieves ≥80% test coverage via cargo tarpaulin |
Verify all public APIs have rustdoc documentation |
Verify cargo clippy passes with zero warnings |
Verify code formatted with rustfmt (cargo fmt –check) |
Verify successful pack/unpack of 100GB file |
Verify files larger than RAM handled via streaming (monitor memory usage) |
Verify concurrent chunk verification improves performance |
Preconditions: Source code and built binary available Steps:
Pass Criteria: Multiple hash algorithms supported through a common interface; no architectural changes required to add a new algorithm. |
Test Procedures
Offline Operation Test (TC-TRANSFER-NFR-003)
Preconditions:
App installed
Network disconnected (airplane mode or an air-gapped system)
Steps:
Disconnect network
Pack 1GB test dataset
Unpack and verify
Check all operations completed
Pass Criteria: All operations complete successfully with no network.
Checksum Verification Test (TC-INT-003)
Preconditions:
Valid chunk files
Manifest with checksums
Steps:
Corrupt one chunk file (modify 1 byte)
Run unpack operation
Verify error is reported
Confirm unpack aborts
Pass Criteria: Corrupted chunk detected, unpack aborted with clear error.
Pass/Fail Criteria
All Critical tests must pass before release
All High priority tests must pass before release
Medium priority tests: 90% pass rate acceptable