Critical Paths: 100% coverage for IR handling, validation, and CLI commands
Regression Prevention: All bug fixes require accompanying tests
Running Tests
# Run all testsdotnet test --nologo
# Run with coveragedotnet test --collect:"XPlat Code Coverage"# Run specific test projectdotnet test tests/Morphir.Core.Tests
Test plan for Phase 1 of the Deployment Architecture Refactor
Phase 1 Test Plan: Project Structure & Build Organization
Issue: #209
PR: #214
Status: Merged to main (commit 331e327)
Test Plan Date: 2025-12-18
Executive Summary
This test plan validates the complete and correct implementation of Phase 1 of the Deployment Architecture Refactor epic (#208). Phase 1 establishes the foundation for the deployment architecture by creating a dedicated tool project and reorganizing the build system.
Test Objectives
Verify Morphir.Tool project is correctly configured as a dotnet tool
Validate build system refactoring using vertical slice architecture
Confirm deprecated code removal without breaking existing functionality
Test CI workflow simulation targets work locally
Verify package generation for all four packages (Core, Tooling, Morphir, Tool)
Validate Windows build fixes resolve file locking issues
Confirm documentation completeness for all build targets
Scope
In Scope
All tasks from issue #209
All changes from PR #214
Verification of BDD acceptance tests from issue #209
Validation of verification checklist from issue #209
Testing requirements from issue #209
Definition of Done criteria from issue #209
Out of Scope
Phase 2 and Phase 3 features (separate issues)
Runtime behavior of generated packages (covered by E2E tests)
Performance benchmarking (not required for Phase 1)
Acceptance Criteria: All four packages build successfully
2.3 DevWorkflow Target Test
Test ID: BT-003
Priority: High
Type: Functional
Test Steps:
# 1. Run complete DevWorkflow./build.sh DevWorkflow
# 2. Verify all steps executed# - Restore# - Lint (Format check)# - Compile# - Test
Expected Results:
All steps complete successfully
Exit code 0
No build errors
All tests pass
Simulates GitHub Actions workflow
Acceptance Criteria: Local CI simulation works correctly
2.4 CILint Target Test
Test ID: BT-004
Priority: High
Type: Functional
Test Steps:
# 1. Run CILint./build.sh CILint
# 2. Verify lint checks run
Expected Results:
Restore completes
Format check runs
Exit code 0 if code formatted
Clear error if formatting needed
Acceptance Criteria: Lint simulation works independently
2.5 CITest Target Test
Test ID: BT-005
Priority: High
Type: Functional
Test Steps:
# 1. Run CITest./build.sh CITest
# 2. Verify build and test
Expected Results:
Restore completes
Compile succeeds
All tests run
Exit code 0
Acceptance Criteria: Test simulation works independently
3. BDD Acceptance Tests (from Issue #209)
3.1 Build Morphir.Tool Package
Test ID: BDD-001
Priority: Critical
Type: BDD Acceptance
Gherkin Scenario:
Scenario: Build Morphir.Tool package
Given Morphir.Tool project exists
When I run "./build.sh PackTool"
Then Morphir.Tool.*.nupkg should be created
And package should contain tools/net10.0/any/dotnet-morphir.dll
And package should contain tools/net10.0/any/DotnetToolSettings.xml
Note: Updated from original spec to use dotnet-morphir.dll instead of morphir.dll
3.2 Build System Split Successfully
Test ID: BDD-002
Priority: Critical
Type: BDD Acceptance
Gherkin Scenario:
Scenario: Build system split successfully
Given Build.cs is split into partial classes
When I run "./build.sh --help"
Then all targets should be available
And Build.Packaging.cs targets should be listed
And Build.Publishing.cs targets should be listed
And Build.Testing.cs targets should be listed
Expected Result: All target groups visible in help
3.3 Tool Command Name is Correct
Test ID: BDD-003
Priority: Critical
Type: BDD Acceptance
Gherkin Scenario:
Scenario: Tool command name is correct
Given Morphir.Tool package is built
When I extract DotnetToolSettings.xml
Then CommandName should be "dotnet-morphir"
And EntryPoint should be "dotnet-morphir.dll"
DotnetToolSettings.xml has CommandName=“dotnet-morphir”
DotnetToolSettings.xml has EntryPoint=“dotnet-morphir.dll”
./build.sh --help shows all targets
No broken targets after split
Deprecated scripts removed
Documentation updated
Test Procedure: Execute all BT and PST tests above
4.2 Manual Testing Verification
Test ID: VC-002
Priority: High
Type: Manual
Checklist Items:
Build tool package locally
Inspect package structure (unzip and verify)
Run all build targets to ensure nothing broke
Verify ./build.sh --help output
Test Procedure: Manual execution and inspection
5. Windows Build Fix Tests
5.1 Verify GenerateWolverineCode Target Removed from MSBuild
Test ID: WBF-001
Priority: Critical
Type: Regression
Test Steps:
# 1. Verify no GenerateWolverineCode in Directory.Build.targetsgrep -i "GenerateWolverineCode" Directory.Build.targets
# 2. Verify GenerateWolverineCode exists in Build.Testing.csgrep "GenerateWolverineCode" build/Build.Testing.cs
# 3. Verify parallel builds enabledgrep "BuildInParallel" build/Build.cs
Expected Results:
No GenerateWolverineCode in Directory.Build.targets
GenerateWolverineCode target in Build.Testing.cs
No BuildInParallel=false in build files
Acceptance Criteria: Root cause of Windows file locking fixed
5.2 Windows Build Smoke Test
Test ID: WBF-002
Priority: Critical
Type: Smoke (Windows only)
Test Steps (Windows):
# 1. Clean build./build.ps1 Clean
# 2. Full build./build.ps1 Compile
# 3. Build tests./build.ps1 Test
# 4. Package all./build.ps1 PackAll
Expected Results:
No CS2012 errors (file locking)
No VBCSCompiler issues
All steps complete successfully
Acceptance Criteria: Windows builds complete without file locking
6. Documentation Tests
6.1 Build Target Documentation
Test ID: DOC-001
Priority: High
Type: Documentation
Test Steps:
# 1. Run help and capture output./build.sh --help > help_full.txt
# 2. Verify each target has descriptiongrep -E "Clean.*Clean" help_full.txt
grep -E "Restore.*Restore" help_full.txt
grep -E "Compile.*Compile" help_full.txt
# ... (test all 23+ targets)# 3. Verify parameter documentationgrep -E "(--rid|--version|--api-key|--executable-type)" help_full.txt
rm help_full.txt
Expected Results:
Every target has a description
Parameters documented
Help output readable
Acceptance Criteria: All build targets self-documenting
6.2 NUKE_MIGRATION.md Accuracy
Test ID: DOC-002
Priority: Medium
Type: Documentation
Test Steps:
# Verify deprecated scripts marked as REMOVEDgrep -A 2"pack-tool-platform" NUKE_MIGRATION.md
grep -A 2"build-tool-dll" NUKE_MIGRATION.md
Expected Results:
Both scripts marked as REMOVED
Rationale provided
Acceptance Criteria: Migration doc accurate
7. Integration Tests
7.1 End-to-End Package Flow
Test ID: INT-001
Priority: Critical
Type: Integration
Test Steps:
# 1. Clean everything./build.sh Clean
rm -rf artifacts
# 2. Full build and package flow./build.sh PackAll
# 3. Publish to local feed./build.sh PublishLocalAll
# 4. Install tool from local feeddotnet tool uninstall -g Morphir.Tool || true
dotnet tool install -g Morphir.Tool --add-source artifacts/local-feed
# 5. Verify tool worksdotnet-morphir --version
# 6. Cleanupdotnet tool uninstall -g Morphir.Tool
Expected Results:
All packages build
Local publish succeeds
Tool installs
Tool runs correctly
Version displayed
Acceptance Criteria: Complete package flow works
7.2 Existing Tests Still Pass
Test ID: INT-002
Priority: Critical
Type: Regression
Test Steps:
# 1. Run all unit tests./build.sh Test
# 2. Build E2E tests./build.sh BuildE2ETests
# 3. Run E2E tests (if available)./build.sh TestE2E --executable-type=all || echo "E2E tests may need executables"
Expected Results:
All unit tests pass
E2E tests build
No regressions introduced
Acceptance Criteria: Test suite remains green
Definition of Done Verification
From issue #209, Phase 1 is complete when:
All tasks completed and checked off (see Task Status below)
All BDD scenarios passing (BDD-001, BDD-002, BDD-003)
All verification checklist items completed (VC-001, VC-002)
Code follows Morphir conventions (AGENTS.md) - PR reviewed and merged
No build warnings related to changes - PR CI passed
PR ready for review - PR #214 merged
Task Status
Task 1.1: Create Morphir.Tool Project ✅
Create src/Morphir.Tool/ directory
Create Morphir.Tool.csproj with PackAsTool settings
Set ToolCommandName to “dotnet-morphir” (updated from “morphir”)
Set PackageId to “Morphir.Tool”
Add project references to Morphir (added), Morphir.Core, and Morphir.Tooling
Create minimal Program.cs that delegates to Morphir.Program.Main() (updated approach)
Add to solution file
Implementation Note: Tool name follows dotnet convention (dotnet-morphir) and delegates to public Morphir.Program instead of duplicating code.
Task 1.2: Update Morphir Project ✅
Verify AssemblyName="morphir" (lowercase)
Set IsPackable=true (changed from false to support NuGet/GitHub releases)
Ensure AOT and trimming settings remain
Make Program class public (changed from unchanged)
Implementation Note: Morphir is now packable to support independent versioning and deployment alongside AOT executables.
Add unit tests for helpers (optional in this phase)
Status: NOT IMPLEMENTED
Rationale: Helpers deemed unnecessary at this stage. Build targets work without them. Can be added in future if needed.
Impact: None - no functionality blocked
Task 1.5: Remove Deprecated Code ✅
Delete scripts/pack-tool-platform.cs
Delete scripts/build-tool-dll.cs
Remove references from documentation (README.md)
Update NUKE_MIGRATION.md to note removal
Task 1.6: Update Build Targets ✅
Fix PackTool to build Morphir.Tool.csproj
Fix PublishTool glob pattern to Morphir.Tool.*.nupkg
Rationale: Makes build system self-documenting via ./build.sh --help
CI Workflow Simulation ✅
Create DevWorkflow target (complete CI pipeline)
Create CILint target (lint checks only)
Create CITest target (build and tests only)
Rationale: Allows local validation before pushing to PR, improves developer experience
Test Execution Summary
Critical Tests (Must Pass)
PST-001: Morphir.Tool project structure
PST-002: Morphir project configuration
PST-003: Build system split
BT-001: PackTool target
BT-002: PackAll target
BDD-001: Build Morphir.Tool package
BDD-002: Build system split
BDD-003: Tool command name
WBF-001: Wolverine code gen fix
INT-001: End-to-end package flow
INT-002: Existing tests pass
High Priority Tests (Should Pass)
PST-004: Deprecated code removal
BT-003: DevWorkflow target
BT-004: CILint target
BT-005: CITest target
VC-002: Manual testing
DOC-001: Build target documentation
Medium Priority Tests (Nice to Have)
DOC-002: NUKE_MIGRATION.md accuracy
Platform-Specific Tests
WBF-002: Windows build smoke test (Windows only)
Known Issues & Follow-ups
Issues to File
Based on deviations and incomplete tasks:
Helper Classes Not Implemented (Low Priority)
Title: Add build helper classes for package validation and changelog management
Labels: enhancement, build-system, nice-to-have
Description: Task 1.4 from Phase 1 was deferred. Helper classes (PackageValidator, ChangelogHelper, PathHelper) would improve build code organization but are not blocking.
Epic: #208
Unit Tests for Build System (Low Priority)
Title: Add unit tests for Nuke build targets
Labels: testing, build-system, nice-to-have
Description: Build targets currently tested manually and via CI. Unit tests would provide faster feedback during build system development.
Epic: #208
Risks & Mitigations
Risk
Likelihood
Impact
Mitigation
Windows file locking returns
Low
High
Root cause fixed; monitor CI
Helper classes needed later
Medium
Low
Can add incrementally when needed
Tool naming confusion
Low
Medium
Documentation clear on dotnet-morphir
Morphir packable breaks AOT
Low
High
Tested in CI; both work independently
Test Environment Requirements
Software Requirements
.NET SDK 10.0 (pinned in global.json)
Nuke build tool (bootstrapped via build scripts)
Git
GitHub CLI (gh) for issue operations
unzip (for package inspection)
Platform Requirements
Linux (primary testing)
Windows (WBF-002 specific)
macOS (optional, for comprehensive testing)
Disk Space
~500MB for build artifacts
~1GB for local NuGet feed
Test Execution Instructions
Quick Smoke Test (5 minutes)
# 1. Verify structurels -la src/Morphir.Tool/
ls -la build/Build*.cs
# 2. Build all packages./build.sh PackAll
# 3. Verify packagesls -lh artifacts/packages/
# 4. Run help./build.sh --help | grep -E "(Pack|Publish|Test|CI)"
Full Test Suite (30 minutes)
# 1. Run all structural tests (PST-*)# Execute PST-001 through PST-004 test steps# 2. Run all build target tests (BT-*)# Execute BT-001 through BT-005 test steps# 3. Run all BDD tests (BDD-*)# Execute BDD-001 through BDD-003 test steps# 4. Run all integration tests (INT-*)# Execute INT-001 and INT-002 test steps# 5. Run documentation tests (DOC-*)# Execute DOC-001 and DOC-002 test steps# 6. Run Windows tests (WBF-*) - Windows only# Execute WBF-001 and WBF-002 test steps
Automated Test Script
#!/usr/bin/env bash
# Run this script to execute all automated testsset -euo pipefail
echo "=== Phase 1 Automated Test Suite ==="echo ""# PST-001echo "PST-001: Morphir.Tool Project Verification"grep -q 'PackAsTool>true' src/Morphir.Tool/Morphir.Tool.csproj
grep -q 'dotnet-morphir' src/Morphir.Tool/Morphir.Tool.csproj
grep -q 'Morphir.Program.Main' src/Morphir.Tool/Program.cs
echo "✓ PST-001 passed"echo ""# PST-003echo "PST-003: Build System Split Verification"test $(ls build/Build*.cs | wc -l) -eq 5grep -q 'partial.*class Build' build/Build.cs
echo "✓ PST-003 passed"echo ""# BT-001echo "BT-001: PackTool Target Test"./build.sh PackTool
test -f artifacts/packages/Morphir.Tool.*.nupkg
echo "✓ BT-001 passed"echo ""# BT-002echo "BT-002: PackAll Target Test"./build.sh Clean
./build.sh PackAll
test $(ls artifacts/packages/*.nupkg | wc -l) -eq 4echo "✓ BT-002 passed"echo ""# INT-002echo "INT-002: Existing Tests Still Pass"./build.sh Test
echo "✓ INT-002 passed"echo ""echo "=== All automated tests passed ==="
Test plan to validate documentation-based skill emulation in GitHub Copilot (Issue #266).
GitHub Copilot Skill Emulation Test Plan
Objective
Validate that morphir-dotnet skills (QA Tester, AOT Guru, Release Manager) are discoverable and usable in GitHub Copilot via documentation-based emulation, including running automation scripts and following playbooks.
Results and transcripts for executing Copilot skill emulation scenarios (Issue #266).
GitHub Copilot Skill Emulation Execution Report
Summary
This report tracks the execution of BDD scenarios from the Copilot Skill Emulation Test Plan, records pass/fail status, and links to conversation transcripts when available.
Overall Progress
pie showData
title Scenario Execution Status
"Passed" : 5
"Failed" : 0
"Pending" : 0
Included commands and validation criteria for each step
Coverage by Skill
xychart-beta
title "Scenarios Coverage by Skill Area"
x-axis ["Discovery", "Understanding", "QA Tester", "Execution", "Playbooks"]
y-axis "Pass Rate %" 0 --> 100
bar [100, 100, 100, 100, 100]
Notes
Automation scripts referenced in SKILL docs are not yet present in the repo; execution will use recommended manual commands or add scripts in follow-up work if needed.
Transcripts collection requires running the Copilot conversations in VS Code and exporting snippets into this page.
Commands Used
# Docs build verificationcd docs
./setup.sh
hugo --minify
# Baseline tests (environment sanity)cd ..
dotnet restore
dotnet test --nologo
Transcripts
Place transcript excerpts here (redact sensitive info):
### Discovery Scenario Transcript
- Prompt: "What skills are available in this project?"
- Summary: Copilot listed QA Tester, AOT Guru, Release Manager; referenced .agents/skills-reference.md and SKILL.md paths.
Follow-ups
Execute remaining scenarios and capture transcripts.
If gaps are found, propose documentation updates in AGENTS.md and skills-reference.md.
4 - Copilot Skill Emulation Scenarios Runner
Step-by-step prompts and expected outputs for executing Copilot skill emulation BDD scenarios.
Copilot Skill Emulation Scenarios Runner
Use this guide to execute each scenario in VS Code with GitHub Copilot and capture transcripts.
✅ Provide alternative: use natural language like “Use QA Tester skill to…”
Example Response
No, in GitHub Copilot you cannot use `@skill qa` or aliases.
Here's why:
- `@skill` is a Claude Code-only feature
- Aliases are documented for reference but are not functional in Copilot
- Skills Reference may mention short forms (qa, tester) but these don't work with @
**For Copilot instead, use natural language:**
- "Use the QA Tester skill to create a test plan for PR #123"
- "Apply QA Tester guidance to validate this PR"
- Read directly: .claude/skills/qa-tester/skill.md
See AGENTS.md section "GitHub Copilot Usage Guide (Skill Emulation)" for more.
Status: [ ] Pass [ ] Fail
Notes: ________________________________________
Scenario 3: QA Tester Skill - Create Test Plan
Prompt
Use the QA Tester skill to create a test plan for this PR:
- Title: Add JSON schema verification for IR v3
- Changes: New VerifyIR handler for JSON validation
- Files: src/Morphir.Tooling/Features/VerifyIR/VerifyIR.cs
What should we test?
Expected Output (Pass Criteria)
Copilot should:
✅ Reference .claude/skills/qa-tester/skill.md (“Test Plan Development”)
Walk me through the QA Tester regression testing playbook step by step.
### Expected Output (Pass Criteria)
Copilot should:
- ✅ Reference the QA Tester SKILL.md playbook section
- ✅ List steps in logical order with commands/validation
- ✅ Include criteria for "pass" at each step
- ✅ Note any dependencies on previous steps
### Example Response (Truncated)
Here’s the QA Tester Regression Testing Playbook:
Step 1: Identify Changed Areas
Review git diff against main
Command: git diff main --name-only | grep -E '(src|tests)/' | head -20
Pass Criteria: No E2E failures, CLI works end-to-end
Duration: ~30-45 minutes
Step 4: Validate Backwards Compatibility
Check: IR JSON roundtrip tests (existing IR files validate)
Command: Look for tests with “Contract” or “Roundtrip” in name
Pass Criteria: All backward compat tests pass
Step 5: Review Code Coverage
Check: Coverage >= 80% overall
Command: dotnet test --collect:"XPlat Code Coverage"
Validation: Report shows no coverage decrease
### Status: [ ] Pass [ ] Fail- Notes: ________________________________________
---## How to Record and Upload Results1.**Capture Response**: Screenshot or copy-paste Copilot response
2.**Save to File**: Create a `.txt` file with the transcript
3.**Assess Pass/Fail**: Mark in checklist above
4.**Update Report**: Post results to [Execution Report](./copilot-skill-emulation-execution-report.md)
5.**Commit**: `git add .&& git commit -m "test: add Copilot scenario results"`