Real Database, Replayed APIs, Auto-Seeded Data
BitDive boots the full Spring context with a real database via Testcontainers. External APIs are replayed from captured traces. The database is auto-seeded from production data.
Record Everything
BitDive captures the full execution trace: HTTP entry, method calls, SQL queries with results, API responses, Kafka messages, and the database state needed to reproduce the scenario.
Hybrid Execution
The database runs in a real Testcontainer (PostgreSQL, MongoDB). Your SQL hits real indexes, constraints, and types. External HTTP and Kafka calls are replayed from traces. No flakiness from 3rd-party services.
Production Data State
BitDive seeds the Testcontainer with the exact data state from your captured trace. No manual SQL fixtures, no factory classes, no YAML files. The database starts with the data your code actually ran against.
Bugs That Only Real Databases Reveal
H2 and mocked repositories hide production-breaking issues
H2 doesn't support JSONB, partial indexes, or database-specific collations. Mocked repositories don't catch constraint violations. A real PostgreSQL or MongoDB in a Testcontainer catches the bugs that matter.
- Schema Drift: A migration renames a column. Your JPQL query still compiles but fails at runtime. Real DB catches it.
- Constraint Violations: Unique constraints, foreign keys, CHECK constraints. Only a real database enforces them.
- Type-Specific Behavior: JSONB operators, array columns, enum types, collation-dependent sorting. None of this works in H2.
Zero-Boilerplate Setup
Same ReplayTestBase, real database under the hood
Inherit from `ReplayTestBase` with Testcontainers mode enabled. BitDive manages the container lifecycle, seeds the database, and replays external API calls. Your test code stays minimal.
- Managed Lifecycle: BitDive starts and stops Testcontainers automatically. No @Container annotations needed.
- Auto-Seeded Data: The database is populated from captured trace data. No manual fixtures to maintain.
- External APIs Still Replayed: HTTP calls to other microservices are replayed from traces. No flakiness from external systems.
Two Modes, One Platform
Choose the right level of realism for each test
Replay mode replays everything (including DB) from traces. Zero infrastructure, maximum speed. Testcontainers mode runs a real database for maximum realism. Both share the same test harness and captured traces.
- Replay Mode: All deps replayed. No Docker needed. Catches wiring, serialization, validation, @Transactional bugs.
- Testcontainers Mode: Real DB in Docker. Same bugs PLUS schema drift, constraint violations, migration issues, real SQL behavior.
- Same Traces: Both modes use the same captured production traces. Switch modes per test class.
Frequently Asked Questions
Common questions about the platform.
Test Against Real Databases. No Manual Fixtures.
Real PostgreSQL, MongoDB, Redis via Testcontainers. Auto-seeded from production data. External APIs replayed from traces. Start testing with real databases today.