generate_db_integration_test
Generate database integration tests against a real database (Testcontainers): create/read/update/delete, transaction rollback and unique-constraint tests with your sample data. Prisma, TypeORM (TypeScript) or plain drivers (Python).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database": "<database>",
"tableName": "<tableName>"
},
"name": "generate_db_integration_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orm | No | prisma/typeorm → TypeScript + Jest; others → Python + pytest with the plain driver | |
| model | No | Prisma model / TypeORM entity name (default: singular PascalCase of tableName) | |
| database | Yes | ||
| operation | No | ||
| sampleRow | No | A valid record without id, e.g. {"email": "a@b.co", "total_cents": 1200} | |
| schemaSql | No | CREATE TABLE statement for the plain-driver (Python) tests | |
| tableName | Yes | ||
| entityPath | No | TypeORM entity import path (default ../src/entities/<Entity>) | |
| uniqueField | No | Column with a unique constraint (enables the duplicate test) |