-
Notifications
You must be signed in to change notification settings - Fork 296
Remove xunit trait attributes and update new-command documentation #1162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 removes obsolete xunit trait attributes from test classes and updates documentation to reflect the change from trait-based test filtering to simpler project path matching. After the migration to the servers/ and tools/ directory structure, traits like [Trait("Area", ...)], [Trait("Category", "Live")], and [Trait("Toolset", ...)] are no longer needed for test categorization.
- Removed 60+ trait attribute declarations across multiple test files
- Updated the new-command documentation template to remove trait examples
- Added documentation about environment variable mutation testing requirements
Reviewed Changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.UnitTests/SessionHost/SessionHostUserSessionListCommandTests.cs |
Removed [Trait("Area", "VirtualDesktop")] from test class |
tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.UnitTests/SessionHost/SessionHostListCommandTests.cs |
Removed [Trait("Area", "VirtualDesktop")] from test class |
tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.UnitTests/Hostpool/HostpoolListCommandTests.cs |
Removed [Trait("Area", "VirtualDesktop")] from test class |
tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.LiveTests/VirtualDesktopCommandTests.cs |
Removed [Trait("Area", "VirtualDesktop")] from class and [Trait("Category", "Live")] from 10 test methods |
tools/Azure.Mcp.Tools.Speech/tests/Azure.Mcp.Tools.Speech.LiveTests/SpeechCommandTests.cs |
Removed [Trait("Toolset", "Speech")] and [Trait("Category", "Live")] from test class |
tools/Azure.Mcp.Tools.ServiceBus/tests/Azure.Mcp.Tools.ServiceBus.UnitTests/Topic/SubscriptionDetailsCommandTests.cs |
Removed [Trait("Area", "ServiceBus")] from test class |
tools/Azure.Mcp.Tools.Quota/tests/Azure.Mcp.Tools.Quota.UnitTests/Commands/Usage/CheckCommandTests.cs |
Removed [Trait("Area", "Quota")] from test class |
tools/Azure.Mcp.Tools.Quota/tests/Azure.Mcp.Tools.Quota.UnitTests/Commands/Region/AvailabilityListCommandTests.cs |
Removed [Trait("Area", "Quota")] from test class |
tools/Azure.Mcp.Tools.Quota/tests/Azure.Mcp.Tools.Quota.LiveTests/QuotaCommandTests.cs |
Removed [Trait("Area", "Quota")] from class and [Trait("Category", "Live")] from 3 test methods |
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Workspace/WorkspaceListCommandTests.cs |
Removed [Trait("Area", "Monitor")] from test class |
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/TableType/TableTypeListCommandTests.cs |
Removed [Trait("Area", "Monitor")] from test class |
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Table/TableListCommandTests.cs |
Removed [Trait("Area", "Monitor")] from test class |
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Log/WorkspaceLogQueryCommandTests.cs |
Removed [Trait("Area", "Monitor")] from test class |
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Log/ResourceLogQueryCommandTests.cs |
Removed [Trait("Area", "Monitor")] from test class |
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/ActivityLog/ActivityLogListCommandTests.cs |
Removed [Trait("Area", "Monitor")] from test class |
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.UnitTests/Product/ProductListCommandTests.cs |
Removed [Trait("Area", "Marketplace")] from test class |
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.UnitTests/Product/ProductGetCommandTests.cs |
Removed [Trait("Area", "Marketplace")] from test class |
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.LiveTests/ProductListCommandTests.cs |
Removed [Trait("Area", "Marketplace")] from class and [Trait("Category", "Live")] from 10 test methods |
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.LiveTests/ProductGetCommandTests.cs |
Removed [Trait("Area", "Marketplace")] from class and [Trait("Category", "Live")] from 4 test methods |
tools/Azure.Mcp.Tools.Foundry/tests/Azure.Mcp.Tools.Foundry.LiveTests/FoundryCommandTests.cs |
Removed [Trait("Category", "Live")] from 9 test methods |
tools/Azure.Mcp.Tools.EventGrid/tests/Azure.Mcp.Tools.EventGrid.UnitTests/Topic/TopicListCommandTests.cs |
Removed [Trait("Area", "EventGrid")] from test class |
tools/Azure.Mcp.Tools.EventGrid/tests/Azure.Mcp.Tools.EventGrid.UnitTests/Subscription/SubscriptionListCommandTests.cs |
Removed [Trait("Area", "EventGrid")] from test class |
tools/Azure.Mcp.Tools.EventGrid/tests/Azure.Mcp.Tools.EventGrid.UnitTests/Events/EventsPublishCommandTests.cs |
Removed [Trait("Area", "EventGrid")] from test class |
tools/Azure.Mcp.Tools.EventGrid/tests/Azure.Mcp.Tools.EventGrid.LiveTests/EventGridCommandTests.cs |
Removed [Trait("Area", "EventGrid")] and [Trait("Category", "Live")] from test class |
tools/Azure.Mcp.Tools.Communication/tests/Azure.Mcp.Tools.Communication.UnitTests/Sms/SmsSendCommandTests.cs |
Removed [Trait("Area", "Communication")] and [Trait("Category", "Unit")] from test class |
tools/Azure.Mcp.Tools.Communication/tests/Azure.Mcp.Tools.Communication.LiveTests/Email/EmailSendCommandLiveTests.cs |
Removed [Trait("Area", "Communication")] from test class |
tools/Azure.Mcp.Tools.Communication/tests/Azure.Mcp.Tools.Communication.LiveTests/CommunicationCommandTests.cs |
Removed [Trait("Area", "Communication")] from test class |
tools/Azure.Mcp.Tools.AppService/tests/Azure.Mcp.Tools.AppService.UnitTests/Commands/Database/DatabaseAddCommandTests.cs |
Removed [Trait("Area", "AppService")] from test class |
tools/Azure.Mcp.Tools.AppService/tests/Azure.Mcp.Tools.AppService.LiveTests/Database/DatabaseAddCommandLiveTests.cs |
Removed [Trait("Area", "AppService")] from test class |
tools/Azure.Mcp.Tools.AppLens/tests/Azure.Mcp.Tools.AppLens.UnitTests/Resource/ResourceDiagnoseCommandTests.cs |
Removed [Trait("Area", "AppLens")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.UnitTests/Services/AppConfigServiceTests.cs |
Removed [Trait("Area", "AppConfig")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.UnitTests/KeyValue/Lock/KeyValueLockSetCommandTests.cs |
Removed [Trait("Area", "AppConfig")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.UnitTests/KeyValue/KeyValueSetCommandTests.cs |
Removed [Trait("Area", "AppConfig")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.UnitTests/KeyValue/KeyValueGetCommandTests.cs |
Removed [Trait("Area", "AppConfig")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.UnitTests/KeyValue/KeyValueDeleteCommandTests.cs |
Removed [Trait("Area", "AppConfig")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.UnitTests/Account/AccountListCommandTests.cs |
Removed [Trait("Area", "AppConfig")] from test class |
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.LiveTests/AppConfigCommandTests.cs |
Removed [Trait("Category", "Live")] from 5 test methods |
tools/Azure.Mcp.Tools.Acr/tests/Azure.Mcp.Tools.Acr.LiveTests/AcrCommandTests.cs |
Removed [Trait("Area", "Acr")] and [Trait("Category", "Live")] from test class |
servers/Azure.Mcp.Server/docs/new-command.md |
Removed trait attribute examples from integration test template and added documentation for environment variable mutation testing |
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/Services/Telemetry/WindowsInformationProviderTests.cs |
Removed [Trait("Category", "Live")] from test method |
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/Services/Telemetry/MacOSXInformationProviderTests.cs |
Removed [Trait("Category", "Live")] from test method |
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/Services/Telemetry/LinuxInformationProviderTests.cs |
Removed [Trait("Category", "Live")] from test method |
What does this PR do?
In the migration to
servers/andtools/, the use of[Trait()]attributes to separate tests for different tools and differentiate live tests from unit tests was replaced with simpler project path matching. The documentation was never updated to reflect this and the traits were gradually added back to some test classes. This PR removes the traits and updates the docs.GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline