AspNetCore.Simple.MsTest.Sdk
Purpose
Section titled “Purpose”AspNetCore.Simple.MsTest.Sdk reduces boilerplate in ASP.NET Core API tests and makes request/response regression tests readable, repeatable, and maintainable.
Core capabilities
Section titled “Core capabilities”- 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
Design goal
Section titled “Design goal”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);Why build a custom SDK?
Section titled “Why build a custom SDK?”Large API suites repeat the same mechanics:
- construct a test host;
- create an HTTP request;
- load test data;
- send the request;
- validate the status code;
- normalize and compare JSON;
- assert headers and schemas;
- generate useful diagnostics.
Centralizing this flow improves consistency, readability, and failure analysis.
Public impact
Section titled “Public impact”The download badge above shows the live figure from NuGet (more than 780,000 as of November 2026).