Test integration db

From duranserkan/DRN-Project · View interactive version

Test integration db is an AI agent skill from the GitHub repository duranserkan/DRN-Project. Use when testing repositories, ORM mapping, SQL queries, migrations, transactions, concurrency, or persistence behavior with a real database or container.

How to use this skill

Skill file

Database Component Testing

Isolated database-backed testing for repositories and persistence configuration. Apply repository-profile database and test-container conventions first.

When to Apply

Use this when you do not need the full web/API stack: complicated queries, mapping, migrations, transactions, triggers, concurrency, or repository behavior.

Setup Rules

Basic Repository Shape

Create an entity through its public contract, persist it, and read it through a separate context or scope. Assert the stored values. A read from the same tracked instance does not prove persistence.

Concurrency

Verify optimistic concurrency by using separate scopes, contexts, sessions, or connections. Assert the exact conflict behavior the repository exposes, not just the ORM exception type, unless the ORM exception is the public contract.

Composed Query Predicates

Apply MC/DC fixture rules to predicates that determine membership. Validate row truth tables before persistence and assert exact returned membership. Cover distinct provider translation and condition interactions.

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.