Add AspireNew helper to centralize aspire new E2E test flows#14992
Add AspireNew helper to centralize aspire new E2E test flows#14992JamesNK merged 3 commits intorelease/13.2from
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14992Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14992" |
There was a problem hiding this comment.
Pull request overview
Centralizes the interactive aspire new Hex1b terminal flow used across CLI and deployment E2E tests into a single shared helper, reducing duplicated prompt-handling logic and making future prompt changes easier to maintain.
Changes:
- Added
AspireTemplateandAspireNew(...)helper to standardize template selection and prompt responses foraspire new. - Replaced duplicated
aspire newprompt sequences across CLI and deployment E2E tests withsequenceBuilder.AspireNew(...). - Documented the helper and usage patterns in the CLI E2E testing skill guide.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Shared/Hex1bTestHelpers.cs | Adds AspireTemplate enum and AspireNew(...) helper to drive the interactive aspire new flow. |
| tests/Aspire.Cli.EndToEnd.Tests/BundleSmokeTests.cs | Uses AspireNew(...) instead of inline aspire new prompt handling. |
| tests/Aspire.Cli.EndToEnd.Tests/DescribeCommandTests.cs | Uses AspireNew(...) for project creation in describe scenarios. |
| tests/Aspire.Cli.EndToEnd.Tests/DockerDeploymentTests.cs | Uses AspireNew(...) with useRedisCache: false for Docker deployment setup. |
| tests/Aspire.Cli.EndToEnd.Tests/EmptyAppHostTemplateTests.cs | Uses AspireNew(...) with template: EmptyAppHost. |
| tests/Aspire.Cli.EndToEnd.Tests/JsReactTemplateTests.cs | Uses AspireNew(...) with template: JsReact and useRedisCache: false. |
| tests/Aspire.Cli.EndToEnd.Tests/KubernetesPublishTests.cs | Uses AspireNew(...) with useRedisCache: false before publish flow. |
| tests/Aspire.Cli.EndToEnd.Tests/LogsCommandTests.cs | Uses AspireNew(...) before logs scenarios. |
| tests/Aspire.Cli.EndToEnd.Tests/MultipleAppHostTests.cs | Uses AspireNew(...) to create the app used for multi-apphost coverage. |
| tests/Aspire.Cli.EndToEnd.Tests/PlaywrightCliInstallTests.cs | Uses AspireNew(...) during agent init / Playwright install test. |
| tests/Aspire.Cli.EndToEnd.Tests/PsCommandTests.cs | Uses AspireNew(...) before starting and listing running AppHosts. |
| tests/Aspire.Cli.EndToEnd.Tests/PythonReactTemplateTests.cs | Uses AspireNew(...) with template: PythonReact and useRedisCache: false. |
| tests/Aspire.Cli.EndToEnd.Tests/SecretDotNetAppHostTests.cs | Uses AspireNew(...) with template: EmptyAppHost for secrets CRUD setup. |
| tests/Aspire.Cli.EndToEnd.Tests/SmokeTests.cs | Uses AspireNew(...) before aspire run smoke flow. |
| tests/Aspire.Cli.EndToEnd.Tests/StartStopTests.cs | Uses AspireNew(...) in start/stop and add-package scenarios. |
| tests/Aspire.Cli.EndToEnd.Tests/StopNonInteractiveTests.cs | Uses AspireNew(...) for single/multi apphost setup in non-interactive stop tests. |
| tests/Aspire.Cli.EndToEnd.Tests/TypeScriptStarterTemplateTests.cs | Uses AspireNew(...) with template: ExpressReact. |
| tests/Aspire.Cli.EndToEnd.Tests/WaitCommandTests.cs | Uses AspireNew(...) prior to wait command scenarios. |
| tests/Aspire.Deployment.EndToEnd.Tests/AcaCustomRegistryDeploymentTests.cs | Uses AspireNew(...) for deployment project creation. |
| tests/Aspire.Deployment.EndToEnd.Tests/AcaExistingRegistryDeploymentTests.cs | Uses AspireNew(...) for deployment project creation. |
| tests/Aspire.Deployment.EndToEnd.Tests/AcaStarterDeploymentTests.cs | Uses AspireNew(...) for starter project creation in ACA deployment. |
| tests/Aspire.Deployment.EndToEnd.Tests/AcrPurgeTaskDeploymentTests.cs | Uses AspireNew(...) with template: PythonReact and useRedisCache: false. |
| tests/Aspire.Deployment.EndToEnd.Tests/AksStarterDeploymentTests.cs | Uses AspireNew(...) with useRedisCache: false for AKS starter setup. |
| tests/Aspire.Deployment.EndToEnd.Tests/AksStarterWithRedisDeploymentTests.cs | Uses AspireNew(...) defaults for starter-with-Redis scenario. |
| tests/Aspire.Deployment.EndToEnd.Tests/AppServicePythonDeploymentTests.cs | Uses AspireNew(...) with template: PythonReact and useRedisCache: false. |
| tests/Aspire.Deployment.EndToEnd.Tests/AppServiceReactDeploymentTests.cs | Uses AspireNew(...) with template: JsReact and useRedisCache: false. |
| tests/Aspire.Deployment.EndToEnd.Tests/PythonFastApiDeploymentTests.cs | Uses AspireNew(...) with template: PythonReact and useRedisCache: false. |
| tests/Aspire.Deployment.EndToEnd.Tests/VnetKeyVaultConnectivityDeploymentTests.cs | Uses AspireNew(...) with useRedisCache: false for VNet KeyVault scenario. |
| tests/Aspire.Deployment.EndToEnd.Tests/VnetSqlServerConnectivityDeploymentTests.cs | Uses AspireNew(...) with useRedisCache: false for VNet SQL scenario. |
| tests/Aspire.Deployment.EndToEnd.Tests/VnetStorageBlobConnectivityDeploymentTests.cs | Uses AspireNew(...) with useRedisCache: false for VNet Storage Blob scenario. |
| .github/skills/cli-e2e-testing/SKILL.md | Documents AspireNew/AspireTemplate usage and guidance for prompt handling. |
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22751507634 |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #14992... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
❌ Deployment E2E Tests failed Summary: 26 passed, 1 failed, 0 cancelled Passed Tests
Failed Tests
🎬 Terminal Recordings
|
|
Very nice, once it works! |
|
❌ Deployment E2E Tests failed Summary: 26 passed, 1 failed, 0 cancelled Passed Tests
Failed Tests
🎬 Terminal Recordings
|
|
The deployment issue is being fixed here #14988 |
Add AspireTemplate enum and AspireNew extension method to Hex1bTestHelpers.cs that handles template selection, project name, output path, URLs, Redis, and test project prompts for all 5 template types. Update 17 CLI E2E tests and 12 Deployment E2E tests to use the new helper, reducing ~1400 lines of duplicated interactive prompt code. Update SKILL.md documentation.
Address PR review feedback: use DownArrow instead of UpArrow to select Yes in the test project prompt (options are [No, Yes]), and fix Empty App Host -> Empty AppHost in SKILL.md.
48f0837 to
0b3cd88
Compare
Description
Add
AspireNewhelper method andAspireTemplateenum toHex1bTestHelpers.csto centralize the multi-stepaspire newinteractive terminal flow that was duplicated across 29 E2E test files.What changed:
tests/Shared/Hex1bTestHelpers.cs: AddedAspireTemplateenum (Starter, JsReact, PythonReact, ExpressReact, EmptyAppHost) andAspireNew()extension method that handles template selection with arrow key navigation, project name, output path, URLs, Redis cache, and test project prompts for all 5 template types.aspire newinteraction sequences with a singleAspireNew(...)call..github/skills/cli-e2e-testing/SKILL.md: Added documentation for the new helper, enum, and usage examples.Impact: ~1,400 lines removed, ~300 lines added. When
aspire newprompts change in the future, onlyAspireNew()needs updating instead of 39 call sites.Checklist