What Keploy Does
Keploy takes a fundamentally different approach to test generation that eliminates the most tedious part of testing: writing test cases and maintaining mocks. Rather than developers manually crafting test scenarios, Keploy records actual API interactions from your running application and converts them into deterministic test suites. The eBPF-based capture mechanism works at the network layer, requiring zero code modifications.
Traffic Recording and Database Mocking
The recording process is elegantly simple. Run your application with Keploy's record command, exercise your API through normal usage or existing test suites, and Keploy captures every API call, database query, and external service interaction. These recordings become KTests (test cases) and KMocks (data mocks) that replay deterministically without requiring any external dependencies.
Database mock coverage sets Keploy apart from API-only recording tools. It captures interactions with PostgreSQL, MySQL, MongoDB, Redis, and other databases, plus message queue operations on Kafka and RabbitMQ. When replaying tests, these mocked interactions return the exact same responses as the original recording, creating isolated production sandboxes without provisioning test infrastructure.
eBPF Architecture and Test Deduplication
The eBPF instrumentation is the technical enabler that makes this code-less approach possible. By hooking into the Linux kernel's network stack, Keploy intercepts traffic without modifying application code, adding SDKs, or changing deployment configurations. This language-agnostic approach means it works with Go, Python, Java, Node.js, and any other runtime without framework-specific integrations.
Test deduplication automatically removes duplicate tests that do not contribute to coverage improvement. For large teams where multiple developers record tests from similar workflows, this prevents test suite bloat. The system calculates both statement and branch coverage for developers, plus API schema and business use-case coverage for QA teams.
AI Test Generation and CI Integration
The AI-powered test expansion feature uses existing recordings and OpenAPI schemas to find missing coverage areas: boundary values, missing or extra fields, wrong types, out-of-order sequences, and timeout scenarios. This goes beyond simple replay to actively identify gaps in test coverage that manual testing might miss.
CI/CD integration works with Jenkins, GitHub Actions, and other pipelines. Tests run with mocks anywhere — locally on the CLI or in CI — without requiring test environments, database instances, or external service availability. This eliminates the common problem of flaky integration tests that fail due to environment issues rather than actual bugs.
Editor Support and Limitations
The VS Code extension brings Keploy's capabilities into the editor with in-editor test execution, coverage visualization, and AI-assisted test creation. This integration makes testing accessible during development rather than being a separate post-development activity.