{"repo":"vashishthask/mocktail","free":true,"listed":false,"github":"https://github.com/vashishthask/mocktail","clone":"git clone https://github.com/vashishthask/mocktail.git","description":"Mocktail records the real response of any Java method call to disk on the first run, then replays it instantly on every run after. Think of it as VCR for your Java code.","language":"Java","stars":14,"topics":["betamax","database","dependencies","interfaces","java","mocking","rest-api","restful-api","testing","vcr"],"license":null,"category":"databases-storage","readme_excerpt":"Mocktail 🍹 Run integration tests 10× faster — no Docker, no hand-written stubs, no drifting fixtures. Mocktail records the real response of any Java method call to disk on the first run, then replays it instantly on every run after. Think of it as VCR for your Java code — not just HTTP, but any method: JPA repositories, AWS SDKs, Kafka consumers, legacy DAOs, gRPC clients — all of it. --- The Problem You have integration tests that call a database, an external SDK, or an internal service. Your choices today feel like a trade-off you can't win: Approach The hidden cost --- --- Testcontainers 10–30s Docker startup per test suite. Breaks in airgapped CI. WireMock Only intercepts HTTP. Useless for JPA, SDKs, message buses. Mockito stubs Hand-written. Never match real data. Drift silently. H2 in-memory SQL dialect differences cause false passes and false failures. Mocktail is none of those. It captures the real response once, checks it into source control, and replays it from disk in milliseconds forever. --- Quick Start 1. Add the dependency You also need the AspectJ compiler plugin to enable method interception: 2. Configure which methods to intercept Create src/test/resources/mocktail.xml : Modes: - recording — Record the response once; replay on every subsequent call (recommended for CI) - recording new — Always re-record, overwriting what's on disk (use to refresh fixtures) 3. Wrap your test That's it. On the first run Mocktail calls the real findByEmail , saves the response","default_branch":null,"files":null,"tree":[],"storefront":"/r/vashishthask","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vashishthask/mocktail/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}