Template Automation Test Suite Manual
Last Updated: 2026-02-15
Audience: QA engineers, maintainers, and contributors
1. Purpose
This document explains the built-in template automation suite, including architecture, execution modes, outputs, and operational usage.
2. Entry Point
Primary runner cmdlet:
Invoke-DistroNexusTemplateAutomation
Implementation file:
src/PowerShell/Public/Invoke-DistroNexusTemplateAutomation.ps1
3. What the Suite Validates
The suite validates template behavior through metadata-driven execution planning and runtime probe classification.
Key capabilities:
- all-template and selected-template execution modes,
- capability-gated classification (
Pass/Fail/Blocked), - run manifest and report artifact generation,
- local-first policy with CI guard.
4. Prerequisites
- Windows host with WSL2.
- At least one available distro.
- DistroNexus PowerShell module importable.
5. Command Surface
Important parameters:
-Mode(AllTemplates,SelectedTemplates)-TemplateIds-Distro-OutputRoot-IncludeCapabilityGated-DryRun-AllowCiOverride-UseSharedDistro-TestResultFormat(NUnitXml,JUnitXml)
6. Typical Usage
6.1 Dry Run (Recommended First Step)
Single template:
Invoke-DistroNexusTemplateAutomation -Mode SelectedTemplates -TemplateIds dotnet-dev -Distro Ubuntu -DryRun
Multiple templates:
Invoke-DistroNexusTemplateAutomation -Mode SelectedTemplates -TemplateIds dotnet-dev,nodejs-dev -Distro Ubuntu -DryRun
All templates:
Invoke-DistroNexusTemplateAutomation -Mode AllTemplates -Distro Ubuntu -DryRun
6.2 Full Execution (Controlled Environment)
Invoke-DistroNexusTemplateAutomation -Mode AllTemplates -Distro Ubuntu
Enable capability-gated scenarios when environment supports them:
Invoke-DistroNexusTemplateAutomation -Mode AllTemplates -Distro Ubuntu -IncludeCapabilityGated
7. Result Classification
Pass: planned checks succeeded.Fail: apply/probe/cleanup failure occurred.Blocked: scenario gated by missing capability or policy.
Blocked is expected for some scenarios in environments without required capability (for example GPU/systemd constraints).
8. Artifact Structure
Default output root:
docs/development/testing/results/
Per run artifacts:
summary.mdrun-manifest.jsontest-results.xmllogs/*.json
Index file:
docs/development/testing/results/index.md
9. Local-Only and CI Guard Behavior
- Runner checks CI indicators and skips by default in CI contexts.
- Use
-AllowCiOverrideonly when CI execution is intentionally required.
10. Troubleshooting
10.1 No Template Discovered
- Verify
config/templates.jsonexists and is parseable. - Validate module import path and
Get-DistroNexusTemplateoutput.
10.2 Unknown Template IDs
- Ensure
-TemplateIdsvalues exactly match catalog IDs.