Integration tests for ASP.NET Core APIs — WebApplicationFactory, xUnit, ConfigureTestServices, FluentAssertions, database isolation
97
96%
Does it follow best practices?
Impact
99%
1.45xAverage score across 5 eval scenarios
Passed
No known issues
{
"instruction": "Use FluentAssertions, async patterns, and proper JSON assertion patterns in ASP.NET Core tests",
"relevant_when": "Agent writes ASP.NET Core API integration test assertions",
"context": "ASP.NET Core integration tests should use FluentAssertions .Should().Be() syntax, ReadFromJsonAsync<JsonElement>() for response deserialization, GetProperty() for JSON navigation, and PostAsJsonAsync for sending JSON payloads.",
"sources": [
{
"type": "file",
"filename": "skills/aspnet-testing/SKILL.md",
"tile": "tessl-labs/aspnet-testing@0.2.0"
}
],
"checklist": [
{
"name": "fluentassertions-should",
"rule": "Agent uses FluentAssertions .Should() syntax for assertions instead of Assert.* calls",
"relevant_when": "Agent writes test assertions in ASP.NET Core tests"
},
{
"name": "read-from-json-async",
"rule": "Agent uses ReadFromJsonAsync<JsonElement>() to deserialize HTTP response content",
"relevant_when": "Agent reads JSON responses in integration tests"
},
{
"name": "getproperty-json-navigation",
"rule": "Agent uses GetProperty() on JsonElement to navigate JSON response properties",
"relevant_when": "Agent asserts on JSON response structure"
},
{
"name": "post-as-json-async",
"rule": "Agent uses PostAsJsonAsync to send JSON payloads in tests",
"relevant_when": "Agent sends POST requests in integration tests"
},
{
"name": "status-code-assertion",
"rule": "Agent asserts HTTP status codes using response.StatusCode.Should().Be(HttpStatusCode.OK) pattern with FluentAssertions",
"relevant_when": "Agent checks HTTP status codes in test assertions"
},
{
"name": "async-test-methods",
"rule": "Agent writes test methods as 'public async Task' with proper await on HTTP calls",
"relevant_when": "Agent writes ASP.NET Core test methods"
}
]
}