Repository navigation
Document test project conventions - #68984
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
javiercn
marked this pull request as ready for review
September 2, 2026 12:32
javiercn
requested review from
a team,
Youssef1313,
cincuranet,
davpetr,
rokonec and
wtgodbe
as code owners
September 2, 2026 12:32
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
.github/copilot-instructions.md still states “We use xUnit SDK v3 for tests” in a repo-wide way despite documented MSTest/Playwright test stacks, which is likely to misdirect contributors.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds repository-wide contributor guidance for test project organization/naming and then scopes area-specific exceptions/details to Components and MVC guidance files, wiring these docs into GitHub Copilot’s instruction entry points.
Changes:
- Add a root-level
AGENTS.mddocumenting repo-wide test organization conventions (naming, categories, test assets, file/class mapping, helper placement). - Add MVC-scoped contributor guidance + a corresponding
.github/instructionsentry to apply it tosrc/Mvc/**. - Update Components/Testing/ProjectTemplates guidance to defer to the new repository-level
AGENTS.mdand clarify distinct E2E stacks in Components.
File summaries
| File | Description |
|---|---|
AGENTS.md |
Introduces repository-wide test organization/naming guidance meant to be the default baseline. |
.github/copilot-instructions.md |
Links Copilot’s “Testing” section to the new root AGENTS.md. |
.github/instructions/mvc.instructions.md |
Adds scoped Copilot instructions so MVC guidance is applied to src/Mvc/**. |
src/Mvc/AGENTS.md |
Adds MVC-specific conventions (notably functional/integration test project placement and shared helper guidance). |
src/Components/AGENTS.md |
Clarifies Components’ multiple E2E stacks and points Playwright/MSTest consumers to src/Components/Testing/AGENTS.md. |
src/Components/Testing/AGENTS.md |
Documents the MSTest/Microsoft.Testing.Platform + Playwright E2E test layout and conventions for this stack. |
src/ProjectTemplates/AGENTS.md |
Adds a pointer to the repository-level AGENTS.md as the baseline, preserving local specifics. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Keep Components E2E guidance on the established xUnit and Selenium suite unless Components.Testing is explicitly requested. Co-authored-by: Copilot App <[email protected]>
javiercn
marked this pull request as draft
September 2, 2026 12:39
Co-authored-by: Copilot App <[email protected]>
javiercn
marked this pull request as ready for review
September 2, 2026 14:51
DeagleGross
reviewed
Sep 2, 2026
DeagleGross
approved these changes
Sep 2, 2026
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.
Description
Adds concise repository-wide test organization conventions to
.github/copilot-instructions.md, with a reminder to follow more specific guidance from an area'sAGENTS.mdwhen present..Testnaming, functional and integration projects,WebSites, and shared test infrastructure.Microsoft.AspNetCore.Components.Testingis not selected unless a request explicitly targets it.Analysis
I inferred these conventions from the central build logic and a repository-wide inventory:
Directory.Build.propsderives test-project behavior from project names, while 129 product projects contain test-namedInternalsVisibleToentries. Exact test assembly names are therefore load-bearing rather than cosmetic.src, 182 match the repository's name-based test-project convention: 114 ordinary.Tests, 33.Test, 21 functional, 5 explicitly named E2E, 2 integration, and 7 other specializedTestssuffixes.FooTestandFooTestsare common, and about 28% of 25,606 parsed test methods omit underscores. The guidance preserves neighboring singular/plural and method-name styles instead of selecting one globally..IntegrationTests, so that category is documented only in the MVC area where it is established.<Class>.<Concern>.cs, and explicit Arrange/Act/Assert comments appeared in 1,194 files. Neither pattern is promoted as a repository-wide convention.The source counts are approximate: the scan selected C# files under
test/testscontaining recognized test attributes and a top-level test class, while excluding test assets, websites, snapshots, and build outputs.Validation
git diff --checkorigin/main, central test classification, representative test projects, and existing Components E2E infrastructure.No product tests were run because this PR changes contributor guidance only.
Risks / follow-ups
Risk is limited to guidance being applied too broadly. Repository-wide rules preserve established names and categories, and area-specific exceptions remain in scoped
AGENTS.mdfiles.