Add terminal test to chat scenario tests#322940
Draft
alexr00 wants to merge 4 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the smoke-test coverage for chat/agent sessions by introducing a reusable mock-LLM “shell echo” scenario (including a run_in_terminal variant) and adding per-session tests that validate model-driven terminal tool execution renders back into the chat UI. It also adds CI probe loops intended to repeatedly exercise the “run in terminal” tests.
Changes:
- Add shared mock-LLM shell-tool scenarios + a response matcher for validating terminal tool execution results.
- Add “run in terminal” smoke tests for both Chat Sessions and Agents Window session types (Copilot CLI, Claude, Local).
- Add Azure Pipelines probe steps that rerun the “run in terminal” smoke tests 20× with tracing.
Show a summary per file
| File | Description |
|---|---|
| test/smoke/src/areas/chat/shellScenarios.ts | New shared mock-LLM multi-turn scenarios for shell execution (bash/pwsh/powershell + run_in_terminal) and a response matcher. |
| test/smoke/src/areas/chat/chatSessions.test.ts | Registers the new scenarios and adds per-session “run in terminal” smoke tests for chat sessions. |
| test/smoke/src/areas/agentsWindow/agentsWindow.test.ts | Reuses shared scenarios/matcher and adds per-session “run in terminal” tests in the Agents Window suite. |
| build/azure-pipelines/win32/steps/product-build-win32-test.yml | Adds a 20× probe loop for “run in terminal” smoke tests on Windows. |
| build/azure-pipelines/linux/steps/product-build-linux-test.yml | Adds a 20× probe loop for “run in terminal” smoke tests on Linux. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 3
Comment on lines
+82
to
+84
| export function shellEchoResponseMatcher(reply: string): RegExp { | ||
| return new RegExp(`"output":.*${reply}`); | ||
| } |
Comment on lines
+138
to
+146
| - ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}: | ||
| - powershell: | | ||
| for ($i = 1; $i -le 20; $i++) { | ||
| Write-Host "=== Probe iteration $i/20 ===" | ||
| npm run smoketest-no-compile -- -g "run in terminal" --tracing --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)" | ||
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
| } | ||
| displayName: 🧪 PROBE — run "run in terminal" smoke tests 20× | ||
| timeoutInMinutes: 120 |
Comment on lines
+134
to
+145
| - ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}: | ||
| - script: | | ||
| set -e | ||
| for i in $(seq 1 20); do | ||
| echo "=== Probe iteration $i/20 ===" | ||
| npm run smoketest-no-compile -- -g "run in terminal" --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)" | ||
| done | ||
| env: | ||
| TMPDIR: $(Agent.TempDirectory) | ||
| timeoutInMinutes: 120 | ||
| displayName: 🧪 PROBE — run "run in terminal" smoke tests 20× | ||
|
|
Contributor
|
Base:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.