SuperAPI AI Directory

dotnet-testing-advanced

Testing & quality

View repository

Updated 10-15 23:45

About this skill

.NET Advanced Testing Skills Overview

This file is the "Advanced Testing Navigation Hub", helping you find the correct advanced sub-skills. Advanced testing involves complex details such as container management and WebApplicationFactory configuration. Sub-skills include complete setup guidance and common troubleshooting, and loading the correct sub-skill ensures users receive complete guidance.

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


Quick Skill Reference Table

Keywords mentioned by the user → Advanced sub-skill to load

Integration Testing Skills

User says... Load command Purpose description
API testing, Controller testing, endpoint testing /skill dotnet-testing-advanced-aspnet-integration-testing Basic API integration testing
Complete CRUD, WebAPI testing, business process testing /skill dotnet-testing-advanced-webapi-integration-testing Complete API process testing
WebApplicationFactory、TestServer /skill dotnet-testing-advanced-aspnet-integration-testing WebApplicationFactory usage

Containerized Testing Skills

User says... Load command Purpose description
SQL Server container、PostgreSQL、MySQL /skill dotnet-testing-advanced-testcontainers-database Relational database container testing
MongoDB、Redis、Elasticsearch /skill dotnet-testing-advanced-testcontainers-nosql NoSQL database container testing
Real database, EF Core testing, Dapper testing /skill dotnet-testing-advanced-testcontainers-database Real database behavior testing
Testcontainers, container testing, Docker testing /skill dotnet-testing-advanced-testcontainers-database Testcontainers basics

Microservices Testing Skills

User says... Load command Purpose description
.NET Aspire, microservices testing, distributed testing /skill dotnet-testing-advanced-aspire-testing Aspire microservices testing
DistributedApplication, inter-service communication /skill dotnet-testing-advanced-aspire-testing Aspire application testing

Framework Upgrade Skills

User says... Load command Purpose description
xUnit upgrade, xUnit 3.x, version upgrade /skill dotnet-testing-advanced-xunit-upgrade-guide xUnit 2.x → 3.x upgrade
TUnit, new test framework, TUnit basics /skill dotnet-testing-advanced-tunit-fundamentals TUnit basics and migration
TUnit advanced, TUnit DI, parallel execution /skill dotnet-testing-advanced-tunit-advanced TUnit advanced features

Usage Flow Examples

使用者:請幫我建立 ProductsController 的 API 整合測試

AI:我注意到您需要進行 API 整合測試。根據快速對照表,
    我應該載入 dotnet-testing-advanced-aspnet-integration-testing skill。

    [使用 Skill tool 載入子技能]

AI:現在按照 ASP.NET Core Integration Testing skill 的指引為您建立測試...

Complete Skill List

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


Quick Decision Tree

Quickly find the corresponding advanced sub-skill based on the testing scenario (API testing, real database, microservices, framework migration). Covers 4 major scenarios and multiple option branches.

For detailed content, please refer to references/decision-tree.md


Skill Category Map

The 8 advanced skills are divided into three major categories: integration testing (4), microservices testing (1), and framework migration (3), including each skill's core value, suitable scenarios, learning difficulty, and prerequisites.

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


Common Task Mapping Table

A complete mapping of 7 common tasks, including scenario descriptions, recommended skills, implementation steps, prompt examples, and expected code structure.

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


Integration Testing Level Mapping

Choose a suitable testing strategy based on project complexity:

Level 1: Simple WebApi project

Project characteristics:

  • Simple CRUD API
  • No external dependencies or uses in-memory implementations
  • Simple business logic

Recommended skills:

  • dotnet-testing-advanced-aspnet-integration-testing

Testing focus:

  • Route validation
  • Model binding
  • HTTP response
  • Basic business logic

Example project:

  • TodoList API
  • Simple product catalog

Level 2: WebApi project with dependent Services

Project characteristics:

  • Has a business logic layer (Services)
  • Depends on external services (can be Mocked)
  • Medium complexity

Recommended skill combination:

  1. dotnet-testing-advanced-aspnet-integration-testing(Basic)
  2. dotnet-testing-nsubstitute-mocking(Mock dependencies)

Testing strategy:

  • Use NSubstitute to create Service stubs
  • Test the interaction between Controller and Service
  • Verify error handling

Example project:

  • E-commerce API (with inventory and order services)
  • CMS system

Level 3: Complete WebApi project

Project characteristics:

  • Complex business logic
  • Requires a real database
  • May have external API integration
  • Complete error handling

Recommended skill combination:

  1. dotnet-testing-advanced-webapi-integration-testing(Complete workflow)
  2. dotnet-testing-advanced-testcontainers-database(Real database)
  3. dotnet-testing-advanced-testcontainers-nosql(If NoSQL is used)

Testing strategy:

  • Use Testcontainers to set up a real database
  • Complete end-to-end testing
  • Test data preparation and cleanup
  • Verify all error scenarios

Example project:

  • Large e-commerce platform
  • Enterprise-level management system
  • SaaS application

Learning path recommendations

Includes a complete learning plan and daily learning focus, such as integration testing introduction (1 week), microservices testing specialization (3-5 days), and framework migration path.

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


Skill combination recommendations

Based on different project requirements, the following skill combinations are recommended:

Combination 1: Complete API testing project

Suitable for: Building a complete test suite for a formal project

Skill combination:

  1. dotnet-testing-advanced-aspnet-integration-testing(Basic)
  2. dotnet-testing-advanced-testcontainers-database(Real database)
  3. dotnet-testing-advanced-webapi-integration-testing(Complete workflow)

Learning order:

  1. First learn aspnet-integration-testing to understand the basics
  2. Then learn testcontainers-database to master database testing
  3. Finally learn webapi-integration-testing for integrated application

Expected outcome:

  • Able to build complete tests for Web API projects
  • Validate behavior using a real database
  • Test all CRUD endpoints and error handling

Combination 2: Microservices Testing Solution

Suitable for: Microservices architecture, distributed systems

Skill combination:

  1. dotnet-testing-advanced-aspire-testing(core)
  2. dotnet-testing-advanced-testcontainers-database(database)
  3. dotnet-testing-advanced-testcontainers-nosql(NoSQL)

Learning order:

  1. First learn testcontainers (database testing fundamentals)
  2. Then learn aspire-testing (microservices testing)

Expected outcomes:

  • Test .NET Aspire projects
  • Verify communication between services
  • Test using a containerized environment

Combination 3: Framework Modernization

Suitable for: Test framework upgrades or migrations

Option A: xUnit upgrade

Skills:

  • dotnet-testing-advanced-xunit-upgrade-guide

Suitable for:

  • Existing projects using xUnit 2.x
  • Want to upgrade to the latest version

Option B: TUnit migration

Skill combination:

  1. dotnet-testing-advanced-tunit-fundamentals(fundamentals)
  2. dotnet-testing-advanced-tunit-advanced(advanced)

Suitable for:

  • Choosing a test framework for a new project
  • Considering migrating from xUnit

Learning order:

  1. First learn fundamentals to understand the basics
  2. Then learn advanced to master advanced features

Prerequisite skill requirements

Before learning advanced skills, it is recommended to first master the following foundational skills (from the dotnet-testing foundational skill set):

Required skills

1. dotnet-testing-unit-test-fundamentals

Why it is required:

  • Integration tests also follow the 3A Pattern
  • The FIRST principles also apply
  • Need to understand basic testing concepts

2. dotnet-testing-xunit-project-setup

Why it is required:

  • Need to create a test project
  • Understand the project structure
  • Understand package management

3. dotnet-testing-awesome-assertions-guide

Why it is required:

  • Integration tests need to verify HTTP responses
  • FluentAssertions.Web provides powerful API assertions
  • Improve test readability

Recommended skills

1. dotnet-testing-nsubstitute-mocking

Why it is recommended:

  • Integration tests may need to mock external services
  • WebApplicationFactory needs to replace services

2. dotnet-testing-autofixture-basics

Why it is recommended:

  • Quickly generate test data
  • Reduce boilerplate code in integration tests

Guided conversation examples

4 complete conversation examples showing how AI guides the selection of the correct skills: API testing, microservices testing, framework upgrades, TUnit evaluation.

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


Relationship with foundational skills

Advanced skills build on foundational skills:

Basic testing capabilities → dotnet-testing(foundational skill set)

  • Unit testing fundamentals
  • Test data generation
  • Assertions and mocking
  • Special scenario handling

↓ Advanced application

Advanced integration testing → dotnet-testing-advanced(this skill set)

  • Web API integration testing
  • Containerized testing
  • Microservices testing
  • Framework upgrades

Learning advice: First complete the dotnet-testing core skills of the foundational skill set, then proceed to this advanced skill set.


Output format

  • Recommend specific advanced sub-skill names and loading commands based on user needs
  • Provide a brief rationale explaining why that skill was chosen
  • If multiple skill combinations are involved, list the suggested learning order

Related Resources

Original Data Sources

Technical Requirements

Integration Testing Skills:

  • .NET 8+
  • Docker Desktop
  • WSL2 (Windows environment)

Aspire Testing Skills:

  • .NET 8+
  • .NET Aspire Workload
  • Docker Desktop

Next Steps

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

Quick Start:

  • Want to test an API → Start with dotnet-testing-advanced-aspnet-integration-testing start
  • Need a real database → Start with dotnet-testing-advanced-testcontainers-database start
  • Microservices project → Use dotnet-testing-advanced-aspire-testing
  • Framework upgrade → Use the corresponding upgrade guide
  • Not sure → Tell me about your project situation and I will help you analyze it