Skip to content

AspNetCore.Simple.MsTest.Sdk

AspNetCore.Simple.MsTest.Sdk reduces boilerplate in ASP.NET Core API tests and makes request/response regression tests readable, repeatable, and maintainable.

NuGet downloads NuGet version

  • ASP.NET Core integration-test hosting
  • HTTP request helpers
  • Expected status-code validation
  • JSON response comparison
  • Snapshot and approval-style testing
  • Schema validation
  • Content-type assertions
  • Response-type assertions
  • Reusable request and response files
  • Filtering and tooling for large endpoint suites
  • Structured assertion output designed to be understandable by humans and automation

A test should communicate the scenario, input, expected response, and expected protocol behavior without pages of setup code.

await Client.AssertPostAsync<CreateRequest>(
"/api/v1/capabilities",
"Requests/Create.json",
"Responses/Create.json",
expectedStatusCode: HttpStatusCode.Created);

Large API suites repeat the same mechanics:

  1. construct a test host;
  2. create an HTTP request;
  3. load test data;
  4. send the request;
  5. validate the status code;
  6. normalize and compare JSON;
  7. assert headers and schemas;
  8. generate useful diagnostics.

Centralizing this flow improves consistency, readability, and failure analysis.

The download badge above shows the live figure from NuGet (more than 780,000 as of November 2026).