Skip to content

Expand test instructions into their own file#13212

Merged
rainersigwald merged 1 commit intodotnet:mainfrom
rainersigwald:test-specific-instructions
Feb 9, 2026
Merged

Expand test instructions into their own file#13212
rainersigwald merged 1 commit intodotnet:mainfrom
rainersigwald:test-specific-instructions

Conversation

@rainersigwald
Copy link
Copy Markdown
Member

I got annoyed when reviewing some of the tests Copilot generated in a few recent PRs, so let's try to formalize some of the guidance it wasn't picking up on.

@rainersigwald rainersigwald self-assigned this Feb 6, 2026
@rainersigwald rainersigwald requested a review from a team as a code owner February 6, 2026 17:14
@rainersigwald rainersigwald added the Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. label Feb 6, 2026
Copilot AI review requested due to automatic review settings February 6, 2026 17:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a dedicated testing instructions file (.github/instructions/tests.instructions.md) for GitHub Copilot to improve the quality of generated test code for the MSBuild repository. The file uses a frontmatter applyTo pattern to scope these instructions to test files in the codebase (src/*.UnitTests/**/*.cs).

Changes:

  • Creates comprehensive testing guidelines covering xUnit/Shouldly usage, test infrastructure (TestEnvironment, MockLogger, MockEngine), MSBuild XML formatting in tests, platform-conditional tests, async patterns, and assertion helpers.

@rainersigwald
Copy link
Copy Markdown
Member Author

Merging on red because this doesn't affect existing tests.

@rainersigwald rainersigwald merged commit 304e1a5 into dotnet:main Feb 9, 2026
13 of 15 checks passed
@rainersigwald rainersigwald deleted the test-specific-instructions branch February 9, 2026 21:52
Copilot AI pushed a commit that referenced this pull request Feb 17, 2026
I got annoyed when reviewing some of the tests Copilot generated in a
few recent PRs, so let's try to formalize some of the guidance it wasn't
picking up on.
JanProvaznik pushed a commit to JanProvaznik/msbuild that referenced this pull request Feb 25, 2026
I got annoyed when reviewing some of the tests Copilot generated in a
few recent PRs, so let's try to formalize some of the guidance it wasn't
picking up on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants