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

aspnet-test-infrastructure.jsonverifiers/

{
  "instruction": "Set up ASP.NET Core test project with proper packages and WebApplicationFactory configuration",
  "relevant_when": "Agent creates integration tests for an ASP.NET Core API",
  "context": "ASP.NET Core test projects need Microsoft.AspNetCore.Mvc.Testing for WebApplicationFactory, Microsoft.EntityFrameworkCore.InMemory for test database, and FluentAssertions for readable assertions. The API project needs 'public partial class Program { }' to expose the entry point.",
  "sources": [
    {
      "type": "file",
      "filename": "skills/aspnet-testing/SKILL.md",
      "tile": "tessl-labs/aspnet-testing@0.2.0"
    }
  ],
  "checklist": [
    {
      "name": "mvc-testing-package",
      "rule": "Agent adds Microsoft.AspNetCore.Mvc.Testing package to the test project",
      "relevant_when": "Agent sets up an ASP.NET Core test project"
    },
    {
      "name": "inmemory-package",
      "rule": "Agent adds Microsoft.EntityFrameworkCore.InMemory or Microsoft.EntityFrameworkCore.Sqlite package for test database",
      "relevant_when": "Agent sets up an ASP.NET Core test project with EF Core"
    },
    {
      "name": "fluentassertions-package",
      "rule": "Agent adds FluentAssertions package to the test project",
      "relevant_when": "Agent sets up an ASP.NET Core test project"
    },
    {
      "name": "program-class-visible",
      "rule": "Agent adds 'public partial class Program { }' to the API project or uses InternalsVisibleTo to expose Program to the test project",
      "relevant_when": "Agent configures WebApplicationFactory<Program>"
    },
    {
      "name": "remove-existing-db-descriptor",
      "rule": "Agent removes the existing DbContext service descriptor before adding the test database, using SingleOrDefault to find and Remove to delete it",
      "relevant_when": "Agent replaces database configuration in test factory"
    },
    {
      "name": "unique-db-name",
      "rule": "Agent uses a unique database name per test class (e.g., Guid.NewGuid()) to prevent test interference",
      "relevant_when": "Agent configures in-memory database for tests"
    }
  ]
}

tile.json