Skip to content

Comments

Fix coverage settings path and trait filter#4229

Merged
westey-m merged 1 commit intomicrosoft:feature-xunit3-mtp-upgradefrom
westey-m:fix-coverage-settings-path-and-trait-filter
Feb 24, 2026
Merged

Fix coverage settings path and trait filter#4229
westey-m merged 1 commit intomicrosoft:feature-xunit3-mtp-upgradefrom
westey-m:fix-coverage-settings-path-and-trait-filter

Conversation

@westey-m
Copy link
Contributor

Motivation and Context

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings February 24, 2026 22:10
@westey-m westey-m merged commit 9e3d657 into microsoft:feature-xunit3-mtp-upgrade Feb 24, 2026
5 checks passed
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

Updates the .NET CI workflow to make code coverage settings path resolution more robust and to adjust how integration tests are filtered/excluded during dotnet test runs.

Changes:

  • Build an explicit path for tests/coverage.runsettings and pass it to --coverage-settings.
  • Modify the integration test selection/exclusion to use a single --filter-query expression.

--ignore-exit-code 8 `
--filter-query "/*IntegrationTests*/*/*/*" `
--filter-not-trait "Category=IntegrationDisabled"
--filter-query "/*IntegrationTests*/*/*/*[Category!=IntegrationDisabled]"
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

--filter-query is a name-based selector (assembly/namespace/class/method). Appending [Category!=IntegrationDisabled] doesn’t appear to be a supported syntax in this repo’s documented MTP usage, and it risks selecting 0 tests and returning exit code 8 (which we ignore), effectively skipping all integration tests. Keep the trait exclusion as a separate argument (e.g., restore --filter-not-trait "Category=IntegrationDisabled") or use a verified MTP-supported trait filtering flag/syntax.

Suggested change
--filter-query "/*IntegrationTests*/*/*/*[Category!=IntegrationDisabled]"
--filter-query "/*IntegrationTests*/*/*/*" `
--filter-not-trait "Category=IntegrationDisabled"

Copilot uses AI. Check for mistakes.
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.

1 participant