|
21 | 21 | - [Troubleshooting](#troubleshooting) |
22 | 22 | - [Limitations](#limitations) |
23 | 23 | - [Module Architecture](#module-architecture) |
| 24 | +- [Testing Infrastructure](#testing-infrastructure) |
24 | 25 | - [Support](#support) |
25 | 26 | - [Changelog](#changelog) |
26 | 27 | - [Citations](#citations) |
@@ -361,6 +362,7 @@ Some applications cannot be successfully restored after being repackaged. If a r |
361 | 362 | AppxBackup.Module/ |
362 | 363 | ├── AppxBackup.psd1 # Module manifest |
363 | 364 | ├── AppxBackup.psm1 # Module loader |
| 365 | +├── Test-AppxBackupModule.ps1 # Module test suite |
364 | 366 | ├── Import-AppxBackup.ps1 # Quick import helper |
365 | 367 | │ |
366 | 368 | ├── Config/ # Externalized configuration |
@@ -408,6 +410,29 @@ AppxBackup.Module/ |
408 | 410 | └── Examples/ # Usage examples |
409 | 411 | └── UsageExamples.md |
410 | 412 | ``` |
| 413 | + |
| 414 | +--- |
| 415 | + |
| 416 | +## Testing Infrastructure |
| 417 | + |
| 418 | +### Test-AppxBackupModule.ps1 |
| 419 | + |
| 420 | +A comprehensive test harness that validates all 8 exported public functions with multiple parameter combinations. |
| 421 | + |
| 422 | +**Automatic app discovery** via Get-AppxPackage pattern matching eliminates manual configuration. |
| 423 | +Full console transcript and structured results file saved to timestamped test run directories. |
| 424 | + |
| 425 | +**Usage:** |
| 426 | +```powershell |
| 427 | +# Test with custom app and output folder |
| 428 | +.\Test-AppxBackupModule.ps1 -TestFolder "C:\Temp\AppxTest\" -AppName "Netflix" |
| 429 | +
|
| 430 | +# Include destructive installation test (optional) |
| 431 | +.\Test-AppxBackupModule.ps1 -TestFolder "C:\Temp\" -AppName "Spotify" -TestInstall |
| 432 | +``` |
| 433 | + |
| 434 | +Results include pass/fail/skip/error counts, detailed timing, and structured output suitable for CI/CD integration. |
| 435 | + |
411 | 436 | --- |
412 | 437 |
|
413 | 438 | ### Configuration System |
@@ -442,35 +467,11 @@ When reporting issues, include: |
442 | 467 |
|
443 | 468 | ## Changelog |
444 | 469 |
|
445 | | -### Version 2.0.2 (Febuary 13, 2026) |
446 | | - |
447 | | -#### Dependency Packaging |
448 | | -- Replaced bundle system with ZIP archives (.appxpack) containing packages, certificates, and metadata |
449 | | -- Metadata-driven installation orchestration with ordered dependency resolution |
450 | | - |
451 | | -#### Configuration System |
452 | | -- Introduced external JSON-based configuration system for module extensibility |
453 | | - |
454 | | -#### Manifest Parsing |
455 | | -- Rewrote Get-AppxManifestData with multi-tier fallback strategies for namespace resolution |
456 | | -- Handles malformed and non-standard manifests without hard dependency on Microsoft schemas |
457 | | - |
458 | | -#### Certificate Management |
459 | | -- Automatic installation to Trusted Root store immediately after creation |
460 | | -- Privilege escalation fallback with intelligent warnings |
461 | | -- Individual certificates for each dependency in ZIP archives |
462 | | - |
463 | | -#### SDK Tool Validation |
464 | | -- Test-AppxToolAvailability now returns tool path string instead of boolean |
465 | | -- Mandatory validation in Backup-AppxPackage with installation diagnostics and PATH analysis |
466 | | - |
467 | | -#### Process Execution |
468 | | -- Unified process safety with tool-specific timeouts |
469 | | -- Output buffer limit per stream to prevent memory exhaustion |
| 470 | +### Version 2.0.2 (February 13, 2026) |
470 | 471 |
|
471 | | -#### Installation |
472 | | -- Extended Install-AppxBackup to support ZIP archives with nested package handling |
473 | | -- Improved progress reporting with separate extraction, validation, and installation stages |
| 472 | +#### Code Quality & Maintainability |
| 473 | +- Extracted 11 new private helper functions to improve code organization and testability. |
| 474 | +- Refactored core functions (Backup-AppxPackage, New-AppxPackageInternal) by removing ~600 lines of duplicate/embedded logic. |
474 | 475 |
|
475 | 476 | #### Future Changes (Planned) |
476 | 477 | *Nothing explicitly planned for future versions.* |
|
0 commit comments