Skip to main content

Documentation Index

Fetch the complete documentation index at: https://easyaf.dev/llms.txt

Use this file to discover all available pages before exploring further.

Breakdance provides multiple approaches for testing web APIs, each suited to different scenarios. Choose based on your testing needs:

Choose Your Approach

In-Memory Testing

Best for: Unit testing HTTP APIs you’re building without deploying infraFast, no network overhead, great for CI/CD

Request Snapshots

Best for: Replicating requests from 3rd party APIs.http files with variables, request chaining

Response Snapshots

Best for: Replicating responses from 3rd party APIsCapture once, replay everywhere

Quick Comparison

FeatureIn-MemoryRequest SnapshotsResponse Snapshots
Network callsNoneOptionalCaptured
Test speedFastestFastFast (cached)
Real API testingNoYesInitial capture
Offline capableYesWith snapshotsYes
Request chainingManualBuilt-inN/A
Environment configsN/AYesPer-folder

Combining Approaches

These techniques work well together. See the Snapshots Overview for the full philosophy.
// Use .http file format with captured response snapshots
public class ApiTests : DotHttpTestBase
{
    protected override HttpMessageHandler CreateHttpMessageHandler()
    {
        // Serve responses from snapshot files
        return new ResponseSnapshotReplayHandler("ResponseSnapshots");
    }

    [TestMethod]
    public async Task GetUsers_Test()
    {
        SetVariable("baseUrl", "https://api.example.com");

        var response = await SendRequestAsync(new DotHttpRequest
        {
            Method = "GET",
            Url = "{{baseUrl}}/users"
        });

        await DotHttpAssertions.AssertValidResponseAsync(response);
    }
}

Guides

PackagePurpose
Breakdance.WebApiIn-memory Web API 2 testing on .NET Framework
Breakdance.AspNetCoreIn-memory ASP.NET Core testing with TestServer
Breakdance.DotHttp.http file parsing and test base class
Breakdance.AssembliesResponse snapshot handlers