Skip to main content
Version: 1.0.0

Introduction to Keploy (v1.0.0)

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.

Test Case Generation

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.

Keploy Features

1. Convert API calls from anywhere to Test-Case

Keploy captures all the API calls and subsequent network traffic served by the application. You can use any existing API management tools like Postman, Hoppscotch, Curl to generate test-case.

API Tools

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.

Mock Application Dependencies

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.

API Tools

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 go-test, jUnit, jest. Code coverage will be reported with existing and Keploy recorded test cases and can also be integrated in existing CI pipelines easily.

Keploy Integration with Testing Libraries

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.

Keploy SDK

A Keploy SDK is a language-specific library that offers APIs to do the following:

  1. Capture all the network calls like

    • API Request
    • Dependency calls
    • API Response
  2. Replay the API request with captured dependency mocks to identify noisy fields.

  3. 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.

Integrate SDK

Choose programming language to integrate Keploy SDK.