e2e-testing

Validate backend HTTP APIs with black-box end-to-end tests.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/FoxSilou/ConfigurationClaude --skill e2e-testing-foxsilou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2e-testing
Source: https://github.com/FoxSilou/ConfigurationClaude/tree/main/backend/.claude/skills/e2e-testing
Command: npx skills add https://github.com/FoxSilou/ConfigurationClaude --skill e2e-testing-foxsilou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

E2E testing conventions ensure the backend HTTP API is validated from the outside as a black box, preventing brittle tests that rely on internal domain objects or direct database assertions and focusing verification on what clients actually observe.

Core Features & Use Cases

  • Black-box HTTP flow: Act with a single state-changing HTTP call (POST/PUT/PATCH/DELETE) and assert via a subsequent GET on the resource.
  • Isolated infrastructure: Guidance to use WebApplicationFactory paired with Testcontainers SQL Server and an xUnit collection fixture to provide reproducible, isolated databases per test session.
  • Deterministic assertions: Emphasizes status-code checks and DTO deserialization assertions rather than raw JSON or DB state; prescribes test file organization and naming conventions for critical-path scenarios.
  • Use Case: Validate the create-and-retrieve path for a Parties API by posting a party payload, asserting Created, then fetching the resource and asserting the PartieDto fields.

Quick Start

Create an E2E test that posts a resource, asserts the creation status code, then performs a GET to validate the returned DTO using the WebApplicationFactory and Testcontainers SQL Server setup.

Frequently Asked Questions about e2e-testing

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

FAQPage Schema
How do I write black-box E2E tests for backend HTTP APIs?

Black-box E2E testing validates backend HTTP APIs by exercising create and read flows from the outside without relying on internal domain objects. You execute a state-changing HTTP call like POST, assert the status code, then perform a GET to verify the returned DTO fields.

What is the best way to isolate SQL Server databases for xUnit E2E tests?

Isolating SQL Server databases for xUnit E2E tests is achieved by pairing WebApplicationFactory with Testcontainers and an xUnit collection fixture. This setup provides reproducible, isolated databases per test session for deterministic HTTP status and DTO assertions.

Why should API E2E tests use DTO assertions instead of raw JSON or database checks?

API E2E tests should use DTO assertions instead of raw JSON or database checks to prevent brittle tests and focus verification on client-facing responses. Asserting deserialized DTO fields and HTTP status codes ensures validation strictly targets what clients actually observe.

Does WebApplicationFactory work with Testcontainers for HTTP API integration testing?

WebApplicationFactory works with Testcontainers to provide isolated SQL Server infrastructure for HTTP API integration testing. Paired with an xUnit collection fixture, this combination supplies reproducible databases per test session for verifying critical happy-paths and error responses.

How do I validate a create-and-retrieve path for an HTTP API using xUnit?

To validate a create-and-retrieve path for an HTTP API using xUnit, post a resource payload and assert the Created status code. Then fetch the resource with a GET request and assert the returned DTO fields match the expected values.