Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

The repository uses Microsoft.Testing.Platform v2 with xunit v3, but the copilot instructions still documented the legacy VSTest --filter syntax which doesn't work with this configuration.

Changes

Testing section expanded with working examples:

  • Running individual test methods: -- --filter-method ClassName.MethodName
  • Running test classes: -- --filter-class ClassName
  • Wildcard filtering: -- --filter-method "*Pattern*"
  • Trait-based filtering: -- --filter-trait "TraitName=value" and -- --filter-not-trait
  • Framework targeting: --framework net9.0
  • Listing tests: dotnet run -- --list-tests

Key syntax differences from VSTest:

  • Options pass to test runner via -- separator, not directly to dotnet test
  • Traditional --filter "TestCategory!=FailsInCloudTest" replaced with -- --filter-not-trait "FailsInCloudTest=true"
  • Filter options are --filter-method, --filter-class, --filter-namespace, --filter-trait, not query expressions

Updated throughout:

  • Testing section general guidance
  • Common Tasks quick reference
  • Troubleshooting tips

All commands were verified working before documentation.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • f.feedz.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet test --help (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Update the copilot instructions file of the repo with sample commands for executing tests in the repo. Be sure to account for the fact that we use MTP v2 and xunit v3, so the commonly used switches with dotnet test do not work. Include sample commands for running an individual test, an individual test class, or all tests for a given test project.
Test each of these commands before putting them into the copilot instructions file to make sure they work.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
Copilot AI changed the title [WIP] Update copilot instructions with test execution samples Update copilot instructions with MTP v2/xunit v3 test commands Jan 12, 2026
Copilot AI requested a review from AArnott January 12, 2026 04:21
@AArnott AArnott marked this pull request as ready for review January 12, 2026 04:22
Copilot AI review requested due to automatic review settings January 12, 2026 04:22
Copy link
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 pull request updates the Copilot instructions to document the correct test command syntax for Microsoft.Testing.Platform v2 with xunit v3, replacing the outdated VSTest --filter syntax that no longer works with this configuration.

Changes:

  • Added comprehensive testing section with 10+ working examples for MTP v2/xunit v3 test commands
  • Updated all references from VSTest --filter syntax to MTP v2 syntax (--filter-method, --filter-class, --filter-trait, etc.)
  • Documented key differences between VSTest and MTP v2 test filtering approaches

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.59%. Comparing base (c2d2c61) to head (2e537fd).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #855      +/-   ##
==========================================
+ Coverage   82.50%   82.59%   +0.09%     
==========================================
  Files         269      269              
  Lines       21321    21321              
  Branches     3071     3071              
==========================================
+ Hits        17590    17610      +20     
+ Misses       2709     2688      -21     
- Partials     1022     1023       +1     
Flag Coverage Δ
Linux 82.20% <ø> (-0.03%) ⬇️
Windows 82.40% <ø> (+0.03%) ⬆️
macOS 82.12% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AArnott AArnott closed this Jan 12, 2026
@AArnott AArnott deleted the copilot/update-copilot-instructions-file branch January 12, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants