Keploy is functional testing toolkit for developers. It generates E2E tests for APIs (KTests) along with mocks or stubs(KMocks) by recording real API calls.
KTests can be imported as mocks for consumers and vice-versa.
Merge KTests with unit testing libraries(like Go-Test, JUnit..) to track combined test-coverage.
KMocks can also be referenced in existing tests or use anywhere (including any testing framework). KMocks can also be used as tests for the server.
1. Convert API calls from anywhere to Test-Case
2. Automatically mock Mutations
Keploy automatically mocks network/external dependencies for all CRUD operations with correct responses.
Data dumps, stubs or mocks for dependencies like DBs, internal services, or third party services like twilio, shopify or stripe are not required.
Please check list of currently supported dependencies in Go, Java and Node.
Keploy can safely replay writes or mutations by capturing from local or other environments and replaying without API chaining.
Idempotency guarantees are also not required in the application. Multiple Reads after write operations can be replicated automatically too.
3. Accurate Noise Detection
Keploy identifies noisy fields in the responses accurately like (timestamps, random values) to ensure high quality tests.
As the application serves the API, Keploy re-run that API request with the captured dependency mocks.
Keploy then compares if the responses of the API requests disagree with each other. If any of the fields of the API responses are different they are marked as random/non-deterministic fields.
4. Native interoperability
Keploy has native integrations with popular testing libraries like
Code coverage will be reported with existing and Keploy recorded test cases and can also be integrated in
existing CI pipelines easily.
5. Easy Integration Framework for new Libraries
Keploy has Instrumentation/Integration framework to easily add the new libraries/drivers within ~100 lines of code. Please check-out the contribution guide.
A Keploy SDK is a language-specific library that offers APIs to do the following:
Capture all the network calls like
- API Request
- Dependency calls
- API Response
Replay the API request with captured dependency mocks to identify noisy fields.
Replay all the test-cases captured and mock the dependencies for the application
Comparing the expected and actual responses for an API call happens at the Keploy Server.
A Keploy SDK mocks the external dependencies while testing APIs, eliminating the need to setup test-environment. This allows the application to isolate itself from external dependencies.
Choose programming language to integrate Keploy SDK.