test-integration-api

Bootstrap an ASP.NET Core test host with authentication and HTTP mocking.

20|3|Updated Aug 13, 2023
One-click install
npx skills add https://github.com/duranserkan/DRN-Project --skill test-integration-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-integration-api
Source: https://github.com/duranserkan/DRN-Project/tree/main/.agent/skills/test-integration-api
Command: npx skills add https://github.com/duranserkan/DRN-Project --skill test-integration-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a framework for end-to-end API testing by bootstrapping a WebApplicationFactory instance, wiring up authentication, and enabling HTTP dependency mocking to validate full request pipelines.

Core Features & Use Cases

  • End-to-end testing of controllers and endpoints using a fully wired ASP.NET Core test host.
  • Mock downstream HTTP calls via Flurl and typed HTTP clients to simulate real service interactions.
  • Validate routing, authentication flows, and integration scenarios across services.

Quick Start

Run an integration test that boots the test host, mocks external calls, and asserts expected responses.

Frequently Asked Questions about test-integration-api

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

FAQPage Schema
How do I write end-to-end API integration tests that mock downstream HTTP calls?

End-to-end API integration tests mock downstream HTTP calls by bootstrapping a WebApplicationFactory test host, wiring up authentication, and using Flurl to intercept typed HTTP clients. This validates full request pipelines and routing within an isolated environment.

What is the best way to test ASP.NET Core controllers and routing with authentication?

Testing ASP.NET Core controllers and routing with authentication is best handled by bootstrapping a fully wired test host. This approach exercises the complete request pipeline, validating authentication flows and integration scenarios across services.

Can I use Flurl and typed HTTP clients to simulate real service interactions in API testing?

Yes, you can use Flurl and typed HTTP clients to simulate real service interactions in API testing. The framework wires up HTTP dependency mocking capabilities to intercept downstream calls, allowing you to validate integration scenarios without live dependencies.

Does WebApplicationFactory support isolating test environments for e2e-testing?

WebApplicationFactory supports isolating test environments for e2e-testing by bootstrapping a fully wired ASP.NET Core test host instance. It applies to scenarios that exercise controllers, routing, authentication, and downstream service interactions across the full request pipeline.

When do I need HTTP mocking capabilities for integration testing?

You need HTTP mocking capabilities for integration testing when validating full request pipelines that interact with downstream services. It allows you to simulate external service responses, ensuring tests remain isolated, deterministic, and independent of live network calls.