Skip to content

Conversation

@Youssef1313
Copy link
Contributor

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

- Dispose resources properly (servers, clients, transports) using `IDisposable` or `await using`
- Run tests with: `dotnet test --filter '(Execution!=Manual)'`
- Run tests with: `dotnet test --filter-not-trait 'Execution=Manual'`
- Valid test filter switches include: `--filter-class`, `--filter-not-class`, `--filter-method`, `--filter-not-method`, `--filter-namespace`, `--filter-not-namespace`, `--filter-not-trait`, `--filter-trait`. The switches `--filter-class` and `--filter-method` expect fully qualified names, unless a filter is used as a prefix like `--filter-class "*.SomeClassName"` or `--filter-method "*.SomeMethodName"`. These switches can be repeated to run tests on multiple classes or methods at once, e.g., `--filter-method "*.SomeMethodName1" --filter-method "*.SomeMethodName2"`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I did merge #1011, so we'll probably want to include the reversion of that in this PR. Additionally, I think we should call out --project is necessary for specifying specific test projects.

Suggested change
- Valid test filter switches include: `--filter-class`, `--filter-not-class`, `--filter-method`, `--filter-not-method`, `--filter-namespace`, `--filter-not-namespace`, `--filter-not-trait`, `--filter-trait`. The switches `--filter-class` and `--filter-method` expect fully qualified names, unless a filter is used as a prefix like `--filter-class "*.SomeClassName"` or `--filter-method "*.SomeMethodName"`. These switches can be repeated to run tests on multiple classes or methods at once, e.g., `--filter-method "*.SomeMethodName1" --filter-method "*.SomeMethodName2"`.
- Valid test filter switches include: `--filter-class`, `--filter-not-class`, `--filter-method`, `--filter-not-method`, `--filter-namespace`, `--filter-not-namespace`, `--filter-not-trait`, `--filter-trait`. The switches `--filter-class` and `--filter-method` expect fully qualified names, unless a filter is used as a prefix like `--filter-class "*.SomeClassName"` or `--filter-method "*.SomeMethodName"`. These switches can be repeated to run tests on multiple classes or methods at once, e.g., `--filter-method "*.SomeMethodName1" --filter-method "*.SomeMethodName2"`.
- To specify a specific test project to run, you must always use the `--project` switch. For example, `dotnet test --project <path to test project directory or .csproj file> --filter-not-trait 'Execution=Manual'`.

I'm not sure if there are more incompatibilities, but it would be better to avoid any breaking changes to the dotnet test cli interface to begin with.

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