dotnet-xunit

Configures and executes xUnit v2 or v3 tests in .NET projects.

Updated May 29, 2023
One-click install
npx skills add https://github.com/HyperLee/Work_Memo --skill dotnet-xunit-hyperlee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-xunit
Source: https://github.com/HyperLee/Work_Memo/tree/main/DictionaryEquals%E7%94%A8%E6%B3%95/.github/skills/dotnet-xunit
Command: npx skills add https://github.com/HyperLee/Work_Memo --skill dotnet-xunit-hyperlee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps software teams configure, run, and repair unit tests written with xUnit in .NET projects, reducing time spent on setup and troubleshooting by providing precise guidance for the correct test framework version, runner, and CLI commands.

Core Features & Use Cases

  • Automates the selection between xUnit v2 and v3, ensuring the repo uses the appropriate runner and integration with VSTest or Microsoft Testing Platform.
  • Guides dependency management and test execution commands tailored to the project structure, including single-project, multi-project, and solution-level scenarios.
  • Provides actionable steps for adding, running, and diagnosing failing tests, with clear decision points and artifact outputs for CI.

Quick Start

Run this skill to determine the active xUnit model in the repository and generate the exact commands and files needed to add, run, or repair xUnit tests.

Frequently Asked Questions about dotnet-xunit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run xUnit tests in a .NET project from the CLI?

Running xUnit tests in a .NET project requires identifying whether the repository uses VSTest or Microsoft.Testing.Platform as the active runner, then executing the tailored CLI commands for your project structure.

What is the difference between xUnit v2 and v3 for .NET testing?

The difference between xUnit v2 and v3 involves the appropriate runner model and integration with VSTest or Microsoft Testing Platform. Selecting the correct version ensures proper dependency management and test execution within your specific project structure.

How do I configure xUnit tests for a multi-project .NET solution?

Configuring xUnit tests for a multi-project .NET solution requires analyzing test project files and the nearest AGENTS.md to generate exact commands. This guides dependency management and execution across single-project, multi-project, and solution-level scenarios.

Does xUnit work with Microsoft Testing Platform instead of VSTest?

Yes, xUnit works with Microsoft Testing Platform instead of VSTest. The framework supports both runner models, and you can decide between them by evaluating your repository's active runner model and required test project files.

How do I diagnose failing xUnit tests in a .NET repository?

Diagnosing failing xUnit tests in a .NET repository involves applying actionable steps for execution and validation based on the active xUnit version and runner. This provides clear decision points and artifact outputs for CI troubleshooting.