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

criteria.jsonevals/scenario-4/

{
  "context": "Tests whether the agent correctly sets up SQLite in-memory database isolation for ASP.NET Core integration tests when referential integrity is required. Evaluates the SQLite connection string format, OpenConnection/EnsureCreated calls, descriptor removal pattern, and proper test isolation.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "SQLite package added",
      "description": "Microsoft.EntityFrameworkCore.Sqlite package is added to the test project (not only the InMemory package)",
      "max_score": 10
    },
    {
      "name": "DataSource :memory: connection string",
      "description": "The SQLite database is configured with `\"DataSource=:memory:\"` as the connection string",
      "max_score": 12
    },
    {
      "name": "DbContext descriptor removed",
      "description": "The existing DbContext descriptor is removed using `SingleOrDefault` + `services.Remove()` before adding the SQLite database",
      "max_score": 12
    },
    {
      "name": "OpenConnection called",
      "description": "After building the service provider, `db.Database.OpenConnection()` is called before using the in-memory SQLite database",
      "max_score": 12
    },
    {
      "name": "EnsureCreated called",
      "description": "`db.Database.EnsureCreated()` is called after `OpenConnection()` to initialize the schema",
      "max_score": 12
    },
    {
      "name": "ConfigureTestServices used",
      "description": "All test database configuration is done inside `ConfigureTestServices` (not `ConfigureServices`)",
      "max_score": 10
    },
    {
      "name": "IClassFixture used",
      "description": "Test class uses `IClassFixture<>` with the custom factory",
      "max_score": 8
    },
    {
      "name": "FluentAssertions syntax",
      "description": "Test assertions use `.Should()` syntax from FluentAssertions",
      "max_score": 8
    },
    {
      "name": "Async Task [Fact]",
      "description": "Test methods are declared `public async Task` and decorated with `[Fact]`",
      "max_score": 8
    },
    {
      "name": "UseEnvironment Testing",
      "description": "The factory calls `builder.UseEnvironment(\"Testing\")` in ConfigureWebHost",
      "max_score": 8
    }
  ]
}

evals

tile.json