Merge together testing phases#2855
Open
alzimmermsft wants to merge 9 commits into
Open
Conversation
Copilot stopped reviewing on behalf of
alzimmermsft due to an error
June 11, 2026 14:44
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates CI/test scoping so a single “Run tests” pipeline step can execute both unit + recorded tests while narrowing execution to only impacted paths, and refactors live-only test gating into a shared base.
Changes:
- Scope test project selection by
build_info.jsonfor all test types (not just recorded tests). - Update build-info path selection logic and simplify pipeline to one test task (
-TestType 'All'). - Centralize
[LiveTestOnly]gating intoCommandTestsBaseand adjust recorded test initialization accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/scripts/Test-Code.ps1 | Applies BuildInfo-based path scoping earlier so it affects all test types. |
| eng/scripts/New-BuildInfo.ps1 | Revises “paths to test” detection and simplifies matrix flags to a single test-run switch. |
| eng/pipelines/templates/jobs/build.yml | Collapses unit + recorded test steps into one “Run tests” invocation. |
| core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/RecordedCommandTestsBase.cs | Uses shared live-only gating and adjusts matcher application. |
| core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/CommandTestsBase.cs | Introduces CheckLiveOnly() in the common base for [LiveTestOnly] behavior. |
| core/Azure.Mcp.Core/src/Services/Azure/BaseAzureService.cs | Replaces SDK LRO wait call with a custom polling loop when a default poll interval is set. |
Comment on lines
+262
to
+265
| $coreChanged = ($changedFiles | Where-Object { $_ -match '^core/(Azure|Fabric|Microsoft).Mcp.Core/src/' }).Count -gt 0 | ||
| $engChanged = ($changedFiles | Where-Object { $_ -match '^eng/' }).Count -gt 0 | ||
| $sharedBuildChanged = ($changedFiles | Where-Object { $_ -match '^Directory.(Build|Packages).props' }).Count -gt 0 | ||
| if ($coreChanged -or $engChanged -or $sharedBuildChanged) { |
| $engChanged = ($changedFiles | Where-Object { $_ -match '^eng/' }).Count -gt 0 | ||
| $sharedBuildChanged = ($changedFiles | Where-Object { $_ -match '^Directory.(Build|Packages).props' }).Count -gt 0 | ||
| if ($coreChanged -or $engChanged -or $sharedBuildChanged) { | ||
| Write-Host "Core, engineering, or shared build changes detected. Building everything." -ForegroundColor Yellow |
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.
What does this PR do?
Merge together
Run unit testsandRun recorded testsphases together as they're now a single project and should be ran together during CI. Additionally, updatesNew-BuildInfo.ps1to run all unit and recorded tests when Core libraries, engineering setup, or shared build properties are modified.Fixes an issue where
Run unit testswere always running all unit tests in the repository. They are now scoped tobuild_info.json, meaning fewer unit tests should run when fewer libraries are modified.GitHub issue number?
Fixes #1887
Fixes #2718
Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline