dotnet-testing-test-naming-conventions

Standardize .NET unit test naming with three-part method formats.

28|4|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-test-naming-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-testing-test-naming-conventions
Source: https://github.com/kevintsengtw/dotnet-testing-agent-skills/tree/main/skills/dotnet-testing-test-naming-conventions
Command: npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-test-naming-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent test naming across a .NET codebase makes tests hard to read, maintain, and reason about. This skill standardizes naming to improve clarity, consistency, and documentation of test intent.

Core Features & Use Cases

  • Standardized method naming using the three-part format: <Method><Scenario><Expected>.
  • Consistent test class naming by suffixing with "Tests" (e.g., Calculator -> CalculatorTests).
  • Clear guidance for parameterized tests naming to improve readability and traceability.

Quick Start

Apply the three-part naming format to test methods. Rename test classes to end with "Tests". For parameterized tests, follow consistent naming like Method_Scenario_Input_Expected for each data case.

Frequently Asked Questions about dotnet-testing-test-naming-conventions

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

FAQPage Schema
What is the standard naming convention for .NET unit tests?

The standard naming convention for .NET unit tests uses a three-part format: <Method>_<Scenario>_<Expected>. This structure improves test readability, maintainability, and makes the test intent clear across the codebase.

How do I name test classes and parameterized tests in .NET?

To name test classes in .NET, append the suffix "Tests" to the class name, such as CalculatorTests. For parameterized tests, follow a consistent format like Method_Scenario_Input_Expected for each data case to ensure readability and traceability.

Why should I use a consistent test naming scheme in .NET?

Using a consistent test naming scheme resolves the problem of inconsistent test names that make .NET codebases hard to read and maintain. Standardizing method, class, and parameterized test names improves clarity and documents test intent effectively.

Does this three-part test naming format work for all .NET testing scenarios?

The three-part test naming format covers common .NET unit testing scenarios including standard method naming, test class naming, and parameterized test naming. It provides templates for consistent documentation across these testing situations.

What is the best way to document test intent in .NET unit tests?

The best way to document test intent in .NET unit tests is applying the three-part naming scheme: <Method>_<Scenario>_<Expected>. This format standardizes naming to explicitly state what scenario is tested and what the expected outcome is.

When do I need to standardize test naming conventions in a .NET project?

You need to standardize test naming conventions in a .NET project when inconsistent naming makes tests hard to read, maintain, and reason about, requiring a structured format to enforce clarity and consistency across the codebase.