Skip to content

Commit cfde826

Browse files
CopilotmitchdennyCopilot
authored
Rename smoke-test to smoke-test-dotnet and add smoke-test-python scenario (#12390)
* Initial plan * Rename smoke-test to smoke-test-dotnet and create smoke-test-python scenario Co-authored-by: mitchdenny <[email protected]> * Update agent scenarios README with smoke-test-dotnet and smoke-test-python documentation Co-authored-by: mitchdenny <[email protected]> * Fix SDK feature flag name to dotNetSdkInstallationEnabled Co-authored-by: mitchdenny <[email protected]> * Update dashboard port documentation to reflect random port assignment Co-authored-by: mitchdenny <[email protected]> * Update tests/agent-scenarios/README.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mitchdenny <[email protected]> Co-authored-by: Mitch Denny <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 64d8f13 commit cfde826

File tree

3 files changed

+647
-10
lines changed

3 files changed

+647
-10
lines changed

tests/agent-scenarios/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,27 @@ The workflow will:
7272
Creates a basic Aspire starter application.
7373

7474
**Prompt:** Create an aspire application starting by downloading the Aspire CLI and creating a starter app.
75+
76+
### smoke-test-dotnet
77+
78+
Performs a comprehensive smoke test of an Aspire PR build by installing the Aspire CLI, creating a .NET Blazor-based starter application, and verifying its functionality including the Dashboard, API service, and frontend.
79+
80+
**Key features:**
81+
- Tests the native AOT build of the Aspire CLI
82+
- Creates and runs an Aspire starter app with Blazor frontend
83+
- Verifies Dashboard functionality and telemetry collection
84+
- Tests SDK install feature flag (`dotNetSdkInstallationEnabled`)
85+
- Captures screenshots for verification
86+
87+
### smoke-test-python
88+
89+
Performs a comprehensive smoke test of an Aspire PR build by installing the Aspire CLI, creating a Python starter application with Vite/React frontend, and verifying its functionality.
90+
91+
**Key features:**
92+
- Tests the native AOT build of the Aspire CLI
93+
- Creates and runs an Aspire Python starter app (`aspire-py-starter`)
94+
- Tests Python backend API service and Vite/React frontend
95+
- Verifies Dashboard functionality and telemetry collection
96+
- Tests SDK install feature flag (`dotNetSdkInstallationEnabled`)
97+
- Tests hot reload for both Python and Vite
98+
- Captures screenshots for verification

tests/agent-scenarios/smoke-test/prompt.md renamed to tests/agent-scenarios/smoke-test-dotnet/prompt.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,26 @@ aspire --version
3737

3838
Expected output should show the version matching the PR build.
3939

40+
### 1.1 Enable SDK Install Feature Flag
41+
42+
Before proceeding, enable the `dotNetSdkInstallationEnabled` feature flag to force SDK installation for testing purposes. This ensures the Aspire CLI's SDK installation functionality is properly exercised.
43+
44+
Set the configuration value:
45+
46+
```bash
47+
aspire config set --global features.dotNetSdkInstallationEnabled true
48+
```
49+
50+
Verify the configuration was set:
51+
52+
```bash
53+
aspire config get --global features.dotNetSdkInstallationEnabled
54+
```
55+
56+
Expected output: `true`
57+
58+
**Note**: This feature flag forces the Aspire CLI to install the .NET SDK even if a compatible version is already available on the system. This is specifically for testing the SDK installation feature.
59+
4060
## Step 2: Create a New Aspire Starter Application
4161

4262
Create a new Aspire application using the Blazor-based starter template. The application will be created in the current git workspace so it becomes part of the PR when the scenario completes.
@@ -106,33 +126,34 @@ The `aspire run` command will:
106126
**What to observe:**
107127
- The command should start the Aspire AppHost
108128
- You should see console output indicating:
109-
- Dashboard starting (typically on http://localhost:18888)
129+
- Dashboard starting with a randomly assigned port and access token
110130
- Resources being initialized
111131
- Services starting up
112132
- No critical errors in the startup logs
113133

114134
### 3.2 Wait for Startup
115135

116136
Allow 30-60 seconds for the application to fully start. Monitor the console output for:
117-
- "Dashboard running at: http://localhost:XXXXX" message
137+
- "Dashboard running at: http://localhost:XXXXX" message with the access token
118138
- "Application started" or similar success messages
119139
- All resources showing as "Running" status
120140

121-
**Tip:** The dashboard URL will be displayed in the console. Note this URL for later steps.
141+
**Tip:** The dashboard URL with access token will be displayed in the console output from `aspire run`. Note this complete URL (including the token parameter) for later steps. The port is randomly selected each time a new project is created.
122142

123143
## Step 4: Verify the Aspire Dashboard
124144

125145
The Aspire Dashboard is the central monitoring interface. Let's verify it's accessible and functional.
126146

127147
### 4.1 Access the Dashboard
128148

129-
Open the dashboard URL in a browser (typically http://localhost:18888).
149+
The dashboard URL with access token is displayed in the output from `aspire run`. Use this URL to access the dashboard.
130150

131151
**Use browser automation tools to access and capture screenshots:**
132152

133153
```bash
134-
# Navigate to the dashboard
135-
playwright-browser navigate http://localhost:18888
154+
# Navigate to the dashboard using the URL from aspire run output
155+
# Example: DASHBOARD_URL="http://localhost:12345?token=abc123"
156+
playwright-browser navigate $DASHBOARD_URL
136157
```
137158

138159
**Take a screenshot of the dashboard:**
@@ -149,11 +170,11 @@ playwright-browser take_screenshot --filename dashboard-main.png
149170
**If browser automation fails, use curl for diagnostics:**
150171

151172
```bash
152-
# Check if dashboard is accessible
153-
curl -I http://localhost:18888
173+
# Check if dashboard is accessible using the URL from aspire run output
174+
curl -I $DASHBOARD_URL
154175

155176
# Get the HTML content to diagnose issues
156-
curl http://localhost:18888
177+
curl $DASHBOARD_URL
157178
```
158179

159180
### 4.2 Navigate Dashboard Sections
@@ -479,7 +500,7 @@ If issues occur during the smoke test:
479500

480501
### Startup Failures
481502
- Check Docker is running (if using containers)
482-
- Verify ports are not already in use (18888, 5000, 5001, etc.)
503+
- Verify ports are not already in use by other applications
483504
- Review console output for specific error messages
484505
- Check system resources (disk space, memory)
485506

0 commit comments

Comments
 (0)