Add test authoring guidance for Helix compatibility and TFM properties#55388
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates contributor/agent-facing guidance to help authors write tests and test assets that behave consistently both locally and in Helix CI, and to standardize how target frameworks are specified across the repo.
Changes:
- Documented recommended test base classes and path-resolution APIs (
SdkTest,SdkTestContext.Current) to avoid relying on local repo layout assumptions. - Added Helix deployment guidance for including extra runtime files via
TestExecutionDirectoryFilesintest/UnitTests.proj. - Documented the correct MSBuild properties to use for TFMs in source/test projects vs. test assets (
$(SdkTargetFramework)vs.$(CurrentTargetFramework)).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/AGENTS.md |
Adds test authoring conventions and Helix payload deployment guidance to prevent path/layout issues in Helix. |
.github/copilot-instructions.md |
Documents the repo’s intended TFM property usage to avoid hardcoding TFMs and to align test assets with TestAssetsManager substitutions. |
test/AGENTS.md: - Add SdkTest, SdkTestContext, and test asset placement to Conventions - Add Helix deployment section for TestExecutionDirectoryFiles and when to validate in a simulated Helix layout .github/copilot-instructions.md: - Add Target framework properties table to Coding Style covering SdkTargetFramework, .NET Framework multi-targeting, and CurrentTargetFramework for test assets Learnings from PR #55166 where tests were initially written without Helix compatibility. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 76a86ef3-d73c-451c-8f6e-cef56bf3509c
MichaelSimons
force-pushed
the
michaelsimons-helix-test-authoring-guidance
branch
from
July 20, 2026 22:33
9782e82 to
61738a3
Compare
Member
Author
|
Gentle ping for a code review - TIA. |
mthalman
approved these changes
Jul 22, 2026
Member
Author
|
/ba-g intermittent failure tracked by #55358. |
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.
Adds AI agent instructions for writing tests that work in both local and Helix CI environments, and documents the correct target framework properties to use across the repo. These gaps were self-identified by Copilot while authoring a new test project in #55166 (conditional test filtering), where multiple iterations were needed to achieve Helix compatibility.
Changes
.github/copilot-instructions.md$(SdkTargetFramework)for .NET, .NET Framework multi-targeting guidance, and$(CurrentTargetFramework)for test assetstest/AGENTS.mdSdkTest, useSdkTestContext.Currentfor paths, test asset placementTestExecutionDirectoryFilesinUnitTests.proj, when to validate locally