Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>C# Test Explorer · Copilot ReadyNew to Visual Studio Code? Get it now.
C# Test Explorer · Copilot Ready

C# Test Explorer · Copilot Ready

Mohit Ghodke

|
3 installs
| (0) | Free
Discover, browse, and organize C# unit tests by category — with MSTest, NUnit, and xUnit support — grouped by test category, right from the VS Code sidebar.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C# Test Explorer · Copilot Ready

Discover, browse, and organize C# unit tests by category — with MSTest, NUnit, and xUnit support — grouped by test category, right from the VS Code sidebar.

Features

Test Explorer

  • Automatically discovers all C# test files in your workspace
  • Parses test classes and test methods (supports [TestMethod], [Test], [Fact], [Theory])
  • Supports data-driven tests ([DataRow], [TestCase], [InlineData]) — all rows are aggregated and the worst-case status (failed > skipped > passed) is shown per test method
  • Run all tests, test classes, or individual tests with a single click
  • View test results with pass/fail/skip status and duration

Tests by Category

  • Automatically reads categories from test attributes:
    • MSTest: [TestCategory("CategoryName")]
    • NUnit: [Category("CategoryName")]
    • xUnit: [Trait("Category", "CategoryName")]
  • Groups tests by their categories in a dedicated sidebar view
  • Run all tests in a specific category
  • See uncategorized tests in a separate group

Dashboard

  • Visual progress bar showing test health
  • Pass/fail/skip counts with percentages
  • Per-category breakdown with mini progress indicators

Watch Mode

  • Automatically re-runs tests when .cs files change
  • Toggle on/off from the status bar or toolbar

GitHub Copilot Integration

  • Language model tools that Copilot can invoke automatically in Agent Mode
  • Get test summaries, list failing tests, run all tests, run tests by category, run a specific test class, and list available categories

Requirements

  • .NET SDK installed and dotnet available in PATH
  • A C# project with unit tests (MSTest, NUnit, or xUnit)

Extension Settings

Setting Default Description
csharpTestExplorer.include **/*.cs Glob pattern for C# test files to include
csharpTestExplorer.exclude **/obj/** Glob pattern for files to exclude
csharpTestExplorer.dotnetTestArgs "" Additional arguments to pass to dotnet test
csharpTestExplorer.noBuild false Skip rebuilding the project before each test run. Leave false (the default) so source changes (e.g. adding or removing [Ignore]) are always picked up. Set to true only when you want faster runs on a project you know is already up-to-date.

GitHub Copilot Integration

If you have GitHub Copilot installed, this extension provides language model tools that Copilot can use automatically in Agent Mode.

Available Tools

Tool What it does Example prompt
#csharpTestSummary Returns pass/fail/skip counts "How are my backend C# tests doing?"
#csharpFailedTests Lists all failing tests with error details "What .NET tests are failing?"
#csharpRunAllTests Runs all tests via dotnet test "Run all the backend tests"
#csharpRunTestsByCategory Runs tests by category name "Run backend tests with category Smoke"
#csharpRunClassTests Runs all tests in a specific test class "Run backend tests for UserServiceTests"
#csharpListCategories Lists all categories with test counts "What categories do my C# tests have?"

How to Use

  1. Open Copilot Chat in VS Code.
  2. Switch to Agent Mode.
  3. Ask about your C# tests (e.g. "Run the smoke tests", "What tests are failing?", "Run tests for UserServiceTests").
  4. Copilot identifies the right tool, shows a confirmation, and executes it.
  5. Test results update in the C# Test Explorer · Copilot Ready sidebar in real time.

Note: GitHub Copilot is not required to use this extension. All sidebar features work independently.

Usage

  1. Open a workspace containing a C# test project
  2. Click the beaker icon in the Activity Bar to open C# Test Explorer · Copilot Ready
  3. Browse tests in the Test Explorer or Tests by Category view
  4. Click the play button to run tests
  5. View results in the Dashboard
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft