Skip to content

docs: add testing guide explaining unit and live/recorded tests using Search as an example#2901

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/explain-unit-live-tests
Draft

docs: add testing guide explaining unit and live/recorded tests using Search as an example#2901
Copilot wants to merge 2 commits into
mainfrom
copilot/explain-unit-live-tests

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

No single document explained both testing layers together with a concrete example. docs/recorded-tests.md covers the recording framework in depth but says nothing about unit tests; docs/new-command.md has template scaffolding but no real-code illustration.

Changes

  • docs/testing.md – new guide covering both test kinds side-by-side using the Azure AI Search toolset as the running example:
    • Unit tests (CommandUnitTestsBase<TCommand, TService>): DI setup, NSubstitute mock helpers, and real examples from ServiceListCommandTests, IndexGetCommandTests, and SearchServiceTests
    • Live/recorded tests (RecordedCommandTestsBase): base-class hierarchy, test proxy HTTP redirect, .testsettings.json modes, assets.json asset pointer, sanitizer configuration, and real examples from SearchCommandTests
    • File layout table mapping Search's unit vs. live test files
    • Run commands for both modes
    • Cross-reference to docs/recorded-tests.md for the full recording/push workflow

Invoking Livetests

Copilot submitted PRs are not trustworthy by default. Users with write access to the repo need to validate the contents of this PR before leaving a comment with the text /azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.

Original prompt

Explain how unit and live tests work in this repository using Search as an example

The user has attached the following file paths as relevant context:

  • tools\Azure.Mcp.Tools.Search\tests\Azure.Mcp.Tools.Search.Tests\SearchCommandTests.cs
  • .github\copilot-instructions.md
  • AGENTS.md

Created from VS Code.

Copilot AI changed the title [WIP] Add explanation of unit and live tests using Search example docs: add testing guide explaining unit and live/recorded tests using Search as an example Jun 16, 2026
Copilot AI requested a review from jairmyree June 16, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants