Open source · .NET · MIT

Test against real databases.
Throw the container away.

dbaitest builds open-source .NET libraries for database integration testing. Real engines in Docker, nothing shared touched, docs in English and Vietnamese.

Example dotnet test run: one test passes on PostgreSQL, SQL Server and MySQL, then the containers are removed.
  • SQL Server
  • PostgreSQL
  • MySQL
Needs Docker and .NET 8 or newer

projects

Libraries you can drop into a test project today.

db-test

Release v0.3.0

Database integration tests that run the same test body against SQL Server, PostgreSQL and MySQL, each in a throwaway container.

  • SQL Server
  • PostgreSQL
  • MySQL
  • One abstract test class, one small class per engine
  • The shape guard blames the test that reshaped the schema
  • CleanAsync() empties every table, whatever the foreign keys
PostgresCustomerTests.cs
[TestClass]
public sealed class PostgresCustomerTests : CustomerTests
{
    protected override DbEngine CreateEngine() => new PostgreSqlEngine();
    protected override string SchemaRoot => "Schema/postgres";
}

principles

How every dbaitest project is built.

  • Real engines, never fakes

    Tests run against SQL Server, PostgreSQL and MySQL in Docker: the engines you ship on, with their real behaviour.

  • Nothing shared is touched

    Every run gets throwaway containers, removed when the run ends. No shared, staging or production database is involved.

  • Docs in English and Vietnamese

    Every project ships full docs in both languages, built from the pinned release so code samples never drift.