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.