Skip to content

Conversation

@hallipr
Copy link
Member

@hallipr hallipr commented Nov 12, 2025

What does this PR do?

In the migration to servers/ and tools/, 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

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

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 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

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants