SuperAPI AI Directory

dotnet-testing

Testing & quality

View repository

Updated 10-15 16:45

About this skill

.NET Testing Fundamentals Skills Overview

This file is a "navigation hub" that helps find the correct sub-skill. Sub-skills contain detailed code examples, best practices, and common pitfalls. Loading the correct sub-skill ensures users receive the most complete guidance.

Match the corresponding sub-skill based on user needs, load it using the Skill tool, and let the sub-skill provide professional testing guidance.


Quick Skill Reference Table

Keywords mentioned by the user → Sub-skill to load

Most Commonly Used Skills

User says... Load command Purpose description
Validator, validator, CreateUserValidator /skill dotnet-testing-fluentvalidation-testing FluentValidation testing
Mock, mocking, IRepository, IService /skill dotnet-testing-nsubstitute-mocking Mock external dependencies
AutoFixture, test data generation /skill dotnet-testing-autofixture-basics Automatically generate test data
Assertions、Should()、BeEquivalentTo /skill dotnet-testing-awesome-assertions-guide Fluent assertions (must-learn)
DateTime, time testing, TimeProvider /skill dotnet-testing-datetime-testing-timeprovider Time-related testing
File, file system, IFileSystem /skill dotnet-testing-filesystem-testing-abstractions File system testing
Bogus, fake data, Faker /skill dotnet-testing-bogus-fake-data Realistic data generation
Builder Pattern、WithXxx /skill dotnet-testing-test-data-builder-pattern Test Data Builder
Deep comparison, DTO comparison, Excluding /skill dotnet-testing-complex-object-comparison Complex object comparison

Foundational Introductory Skills

User says... Load command Purpose description
From scratch, testing fundamentals, FIRST principles /skill dotnet-testing-unit-test-fundamentals Unit testing fundamentals
Test naming, how to name tests /skill dotnet-testing-test-naming-conventions Naming conventions
Create test project, xUnit setup /skill dotnet-testing-xunit-project-setup Project setup

Advanced Skill Combinations

User says... Load command Purpose description
AutoFixture custom rules /skill dotnet-testing-autofixture-customization ISpecimenBuilder customization
AutoFixture + Bogus /skill dotnet-testing-autofixture-bogus-integration Automation + realistic data
AutoFixture + NSubstitute /skill dotnet-testing-autofixture-nsubstitute-integration Automatically create Mocks
AutoData, Theory testing /skill dotnet-testing-autodata-xunit-integration Parameterized testing
Test output, ITestOutputHelper /skill dotnet-testing-test-output-logging Test logging
Coverage, Coverlet /skill dotnet-testing-code-coverage-analysis Code coverage

Usage Flow Example

使用者:請幫我建立 CreateUserValidator 的測試

AI:我注意到您需要測試 Validator。根據快速對照表,
    我應該載入 dotnet-testing-fluentvalidation-testing skill。

    [使用 Skill tool 載入子技能]

AI:現在按照 FluentValidation Testing skill 的指引為您建立測試...

Complete Skill List

To view the complete list of 19 foundational skills, detailed decision tree, and learning path recommendations, please continue reading the subsequent content of this file.


Quick Decision Tree

Where should I start?

Scenario 1: Complete beginner, has never written tests

Recommended learning path:

  1. dotnet-testing-unit-test-fundamentals - Understand FIRST principles and the 3A Pattern
  2. dotnet-testing-test-naming-conventions - Learn naming conventions
  3. dotnet-testing-xunit-project-setup - Create your first test project

Why learn this way:

  • The FIRST principles are the foundation of all testing; establish the correct concepts first
  • Naming conventions make tests easy to read and maintain
  • Get hands-on and create a project, turning theory into practice

Scenario 2: You can write basic tests, but preparing test data is very troublesome

Recommended skills (choose one or combine):

Option A - Automation first → dotnet-testing-autofixture-basics Suitable for: needing large amounts of test data and reducing boilerplate code

Option B - Realistic data first → dotnet-testing-bogus-fake-data Suitable for: needing realistic test data (names, addresses, Email, etc.)

Option C - Semantic clarity first → dotnet-testing-test-data-builder-pattern Suitable for: needing high readability and clearly expressing test intent

Option D - Both → dotnet-testing-autofixture-basics + dotnet-testing-autofixture-bogus-integration Suitable for: needing both automation and realistic data


Scenario 3: There are external dependencies (databases, APIs, third-party services) that need to be simulated

Recommended skill combination:

  1. dotnet-testing-nsubstitute-mocking - NSubstitute Mock framework basics
  2. dotnet-testing-autofixture-nsubstitute-integration - (Optional) Integrate AutoFixture with NSubstitute

When you need the second skill:

  • If you are already using AutoFixture to generate test data
  • Want to automatically create Mock objects and reduce manual setup

Scenario 4: There are special scenarios in testing

Time-related testing → dotnet-testing-datetime-testing-timeprovider Handling: DateTime.Now, time zone conversion, time calculations

File system testing → dotnet-testing-filesystem-testing-abstractions Handling: file reading and writing, directory operations, path handling

Private/internal member testing → dotnet-testing-private-internal-testing Handling: need to test private and internal members (but should be used with caution)


Scenario 5: You need a better assertion approach

Basic need - fluent assertions → dotnet-testing-awesome-assertions-guide All projects should use this to improve test readability

Advanced need - complex object comparison → dotnet-testing-complex-object-comparison Handling: deep object comparison, DTO validation, Entity comparison

Validation rule testing → dotnet-testing-fluentvalidation-testing Handling: testing FluentValidation validators


Scenario 6: You want to understand test coverage

→ dotnet-testing-code-coverage-analysis Learn: use Coverlet to analyze code coverage and generate reports

Skill classification map

Divide the 19 foundational skills into 7 major categories (testing fundamentals, test data generation, test doubles, assertion validation, special scenarios, test metrics, framework integration), each containing a skill comparison table, learning path, and code examples.

For details, please refer to references/skill-classification-map.md

Common task mapping table

Provides skill combination recommendations, implementation steps, and prompt examples for 7 common testing tasks (building a project from scratch, service dependency testing, time logic testing, etc.).

For details, please refer to references/task-mapping-table.md

Learning path suggestions

Plan daily learning schedules for a beginner path (1-2 weeks) and an advanced path (2-3 weeks), including skills, learning focus, and hands-on exercises.

For details, please refer to references/learning-paths.md

Guided conversation examples

Show how AI interacts with you to help you choose the right skills, including 4 common conversation scenarios: beginner onboarding, handling dependencies, specific problems, and improving tests.

For details, please refer to references/conversation-examples.md

Relationship with advanced skills

After completing the foundational skills, if you need to perform integration testing, API testing, containerized testing, or microservices testing, please refer to:

Advanced Integration Testing → dotnet-testing-advanced

  • ASP.NET Core Integration Testing
  • Containerized Testing (Testcontainers)
  • Microservices Testing (.NET Aspire)
  • Test Framework Upgrade and Migration

Output Format

  • Recommend specific sub-skill names and load commands based on user needs
  • Provide a brief rationale explaining why that skill was chosen
  • If multiple skills are combined, list the recommended learning order

Related Resources

Original Data Sources

Learning Documentation

This skill set is distilled from the following complete teaching materials:

  • Agent Skills: From Architecture Design to Practical Application (docs/Agent_Skills_Mastery.pdf) A complete coverage of Agent Skills from theory to practice

  • Claude Code Skills: Turning AI into a Professional Craftsman (docs/Agent_Skills_Architecture.pdf) An in-depth analysis of Agent Skills' architecture design

  • .NET Testing: Write Better, Run Faster (docs/NET_Testing_Write_Better_Run_Faster.pdf) Test execution optimization and debugging techniques

Next Steps

Choose a skill that meets your needs to start learning, or tell me your specific situation, and I will recommend the most suitable learning path!

Quick Start:

  • Beginner → Start with dotnet-testing-unit-test-fundamentals to begin
  • Experienced → Tell me the specific problem you are encountering
  • Not sure → Tell me about your project situation, and I will help you analyze it