backend-testing

Create and debug C# backend tests with xUnit and AppWebHostFactory.

2.5k|507|Updated Feb 7, 2014
One-click install
npx skills add https://github.com/exceptionless/Exceptionless --skill backend-testing-exceptionless
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-testing
Source: https://github.com/exceptionless/Exceptionless/tree/main/.agents/skills/backend-testing
Command: npx skills add https://github.com/exceptionless/Exceptionless --skill backend-testing-exceptionless

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing, debugging, and maintaining C# backend tests, ensuring code quality and reliability.

Core Features & Use Cases

  • Test Writing Assistance: Provides guidance on best practices for naming, structure, and common testing patterns (xUnit, integration, unit).
  • Debugging Support: Helps in understanding and resolving test failures by showing how to filter and run specific tests.
  • Infrastructure Setup: Demonstrates how to set up integration tests using AppWebHostFactory and manage time-sensitive operations with ProxyTimeProvider.
  • Use Case: When a new API endpoint is developed, use this Skill to create comprehensive unit and integration tests following established patterns, ensuring the endpoint functions as expected under various scenarios.

Quick Start

Use the backend-testing skill to write a new xUnit test for the EventControllerTests class.

Frequently Asked Questions about backend-testing

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

FAQPage Schema
How do I write C# integration tests using xUnit?

To write C# integration tests using xUnit, you can use the `AppWebHostFactory` to set up the test infrastructure and `FluentClient` to execute API endpoint assertions.

What is the best way to debug failing C# backend tests?

The best way to debug failing C# backend tests is by filtering and running specific xUnit test cases to isolate the failure, applying patterns and infrastructure guidance to resolve the issue.

How do I manipulate time in C# integration tests?

You manipulate time in C# integration tests by using the `ProxyTimeProvider` component, which allows you to manage and control time-sensitive operations during test execution.

Can I use this to set up test infrastructure for new API endpoints?

Yes, you can use this to set up test infrastructure for new API endpoints by following established xUnit patterns and using `AppWebHostFactory` to ensure the endpoint functions as expected.

What testing patterns are recommended for C# backend unit tests?

Recommended patterns for C# backend unit tests include following established xUnit naming and structure conventions, alongside utilizing specific test components for comprehensive coverage.