CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/aspnet-testing

Integration tests for ASP.NET Core APIs — WebApplicationFactory, xUnit, ConfigureTestServices, FluentAssertions, database isolation

97

1.45x
Quality

96%

Does it follow best practices?

Impact

99%

1.45x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Evaluation results

100%

30%

Bootstrap Integration Tests for a Product Catalog API

Test project setup and WebApplicationFactory configuration

Criteria
Without context
With context

xUnit project in tests/

75%

100%

Mvc.Testing package

100%

100%

InMemory package

100%

100%

FluentAssertions package

0%

100%

Program class exposed

100%

100%

Custom factory subclass

100%

100%

ConfigureTestServices used

0%

100%

DbContext descriptor removed

100%

100%

Guid.NewGuid() database name

100%

100%

UseEnvironment Testing

0%

100%

IClassFixture on test class

100%

100%

100%

24%

Add Comprehensive Tests to an Inventory Management API

The 5 essential integration tests

Criteria
Without context
With context

Happy path GET test

50%

100%

Validation POST test

100%

100%

Not found test

100%

100%

Persistence round-trip test

100%

100%

Error shape consistency test

100%

100%

FluentAssertions syntax

0%

100%

ReadFromJsonAsync<JsonElement>

100%

100%

GetProperty navigation

100%

100%

PostAsJsonAsync used

100%

100%

Async Task with [Fact]

100%

100%

Status code FluentAssertions

0%

100%

100%

24%

Add Tests for a Secured HR Portal API

Authentication testing with TestAuthHandler

Criteria
Without context
With context

TestAuthHandler class

100%

100%

HandleAuthenticateAsync override

100%

100%

Claims included in ticket

100%

100%

AddAuthentication in ConfigureTestServices

0%

100%

Named scheme used

100%

100%

Protected endpoint tested

100%

100%

FluentAssertions in auth tests

0%

100%

IClassFixture used

100%

100%

Async Task [Fact]

100%

100%

96%

26%

Harden Test Database Isolation for an E-Commerce Order API

SQLite in-memory database isolation

Criteria
Without context
With context

SQLite package added

100%

100%

DataSource :memory: connection string

100%

100%

DbContext descriptor removed

100%

100%

OpenConnection called

66%

66%

EnsureCreated called

100%

100%

ConfigureTestServices used

0%

100%

IClassFixture used

100%

100%

FluentAssertions syntax

0%

100%

Async Task [Fact]

100%

100%

UseEnvironment Testing

0%

100%

100%

49%

Test a Notification-Driven User Registration API

Service override and fake dependency injection

Criteria
Without context
With context

RemoveAll pattern used

46%

100%

Fake implementation class

100%

100%

Fake registered as singleton

100%

100%

ConfigureTestServices used

0%

100%

IClassFixture used

0%

100%

Tests verify isolated behavior

100%

100%

FluentAssertions syntax

0%

100%

Async Task [Fact]

100%

100%

UseEnvironment Testing

0%

100%

DbContext descriptor removed

33%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents