A minimal two-module testing skeleton:
bitdive-testing-core– fluent APIBitDiveTest, trace store, replay skeletons (HTTP/DB), basic comparisons.bitdive-testing-spring-boot-starter– auto-config for thebitdive-testprofile, registers @Primary replayers.
BitDiveTest.run()
.springBootApp(App.class)
.traceId("51df62ed-7544-11f0-8895-81497df45889")
.classForTest(Controller.class)
.methodForTest("updateStudent", StudentRecord.class, Integer.class)
.typeComparison(BitDiveTest.ComparisonMode.ALL)
.replayHttp(true).replayDb(true)
.execute().assertOk();By default, the trace is loaded from the classpath: /bitdive/traces/<traceId>.json
and extracts the args and methodReturn fields.
Important: in this skeleton, the DataSource and HTTP replay are placeholders.
They compile, but SQL replay requires implementing Connection/Statement/ResultSet,
and the HTTP record lookup must be wired to your own restCalls format.
mvn -q -DskipTests clean install- HTTP:
io.bitdive.testing.core.http.BitDiveRestReplayInterceptor+ mappingstore.findHttp(...) - DB:
io.bitdive.testing.core.db.BitDiveReplayDataSource(implement replay connections/statements) - Store/Loader: parse
sqlCalls,restCalls,queueCallsand return them by keys/order - Comparison:
Comparator(currently simple Jackson-based comparison),SequenceVerifierfor call ordering