Summary
The tests/ folder has grown and is now harder to navigate. We want:
- a clear folder structure so tests are easy to find by domain
- a maintainable helper setup by splitting
_testHelpers into domain helper files while keeping one stable entry point
This issue covers both:
- (3) Tests folder structure improvements
- (4)
_testHelpers split into domain helper files
Goals
- Improve discoverability and reduce contributor friction
- Keep one stable dot-source entry point for all tests
- Keep CI green (Pester + PSScriptAnalyzer)
Non-goals
- Renaming
tests/_testHelpers.ps1
- Introducing an
Internal/ concept
- Changing production code behavior (this is test-only refactoring)
Acceptance criteria
Folder structure
Helpers split (single entry point)
Proposed folder structure (tests)
Domain-oriented baseline:
tests/Core/
tests/Steps/
tests/Providers/ (already exists)
tests/Packaging/ (surface/manifest/release artifacts)
tests/Examples/ (workflow samples, demo smoke)
(Choose this scheme and apply consistently.)
Implementation tasks (agent-ready)
1) Reorganize tests into folders
2) Create domain helper files
3) Update global helper to dot-source domain helpers
4) Verify quality gates
Suggested labels
refactor
testing
maintainability
Notes
- If later needed, we can add additional domain helper files (e.g., Core/Packaging/Examples) following the same pattern, but start with Steps + Providers.
Summary
The
tests/folder has grown and is now harder to navigate. We want:_testHelpersinto domain helper files while keeping one stable entry pointThis issue covers both:
_testHelperssplit into domain helper filesGoals
Non-goals
tests/_testHelpers.ps1Internal/conceptAcceptance criteria
Folder structure
tests/is organized into clearly named folders (see proposed structure below).*.Tests.ps1.Helpers split (single entry point)
tests/_testHelpers.ps1.tests/_testHelpers.ps1dot-sources domain helper files:tests/Steps/_testHelpers.Steps.ps1tests/Providers/_testHelpers.Providers.ps1$PSScriptRootis used so relative paths remain robust after moves.Proposed folder structure (tests)
Domain-oriented baseline:
tests/Core/tests/Steps/tests/Providers/(already exists)tests/Packaging/(surface/manifest/release artifacts)tests/Examples/(workflow samples, demo smoke)(Choose this scheme and apply consistently.)
Implementation tasks (agent-ready)
1) Reorganize tests into folders
tests/as listed above.Invoke-IdlePlan*.Tests.ps1,New-IdlePlan*.Tests.ps1, redaction/copy testsInvoke-IdleStep*.Tests.ps1tests/Providers/*WorkflowSamples.Tests.ps1and future demo smoke tests$PSScriptRoot).2) Create domain helper files
tests/Steps/_testHelpers.Steps.ps1tests/_testHelpers.ps1into this file (as appropriate).tests/Providers/_testHelpers.Providers.ps1tests/_testHelpers.ps1into this file (as appropriate).3) Update global helper to dot-source domain helpers
tests/_testHelpers.ps1to dot-source the two new files early during setup.tests/_testHelpers.ps1:4) Verify quality gates
Suggested labels
refactortestingmaintainabilityNotes