Skip to content
/ keploy Public

Unit and Integration Test generation for Developers. Generate tests and stubs for your application that actually work!

License

Notifications You must be signed in to change notification settings

keploy/keploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

keploy logo

⚑️ API tests faster than unit tests, from user traffic ⚑️

🌟 The must-have tool for developers in the AI-Gen era 🌟


Keploy is developer-centric API testing tool that creates tests along with built-in-mocks, faster than unit tests.

Keploy not only records API calls, but also records database calls and replays them during testing, making it easy to use, powerful, and extensible.

Convert API calls to test cases

🐰 Fun fact: Keploy uses itself for testing! Check out our swanky coverage badge: Coverage Status  

🚨 Here for Unit Test Generator (ut-gen)?

Keploy has newly launched the world's first unit test generator(ut-gen) implementation of Meta LLM research paper, it understands code semantics and generates meaningful unit tests, aiming to:

  • Automate unit test generation (UTG): Quickly generate comprehensive unit tests and reduce redundant manual effort.

  • Improve edge cases: Extend and improve the scope of automated tests to cover more complex scenarios, often missed manually.

  • Boost test coverage: As codebases grow, ensuring exhaustive coverage should become feasible, aligning with our mission.

πŸ“œ Follow Unit Test Generator README! βœ…

πŸ“˜ Documentation!

Become a Keploy pro with Keploy Documentation.

Record Replay Testing

πŸš€ Quick Installation (API test generator)

Integrate Keploy by installing the agent locally. No code-changes required.

curl --silent -O -L https://keploy.io/install.sh && source install.sh

🎬 Recording Testcases

Start your app with Keploy to convert API calls as Tests and Mocks/Stubs.

keploy record -c "CMD_TO_RUN_APP" 

For example, if you're using a simple Python app the CMD_TO_RUN_APP would resemble to python main.py, for Golang go run main.go, for java java -jar xyz.jar, for node npm start..

keploy record -c "python main.py"

πŸ§ͺ Running Tests

Shut down the databases, redis, kafka or any other services your application uses. Keploy doesn't need those during test.

keploy test -c "CMD_TO_RUN_APP" --delay 10

βœ… Test Coverage Integration

To integrate with your unit-testing library and see combine test coverage, follow this test-coverage guide.

If You Had Fun: Please leave a 🌟 star on this repo! It's free and will bring a smile. πŸ˜„ πŸ‘

One-Click Setup πŸš€

Setup and run keploy quickly, with no local machine installation required:

GitHub Codescape

πŸ€” Questions?

Reach out to us. We're here to help!

Slack LinkedIn YouTube Twitter

🌐 Language Support

From Go's gopher 🐹 to Python's snake 🐍, we support:

Go Java NodeJS Rust C# Python

🫰 Keploy Adopters 🧑

So you and your organisation are using Keploy? That’s great. Please add yourselves to this list, and we'll send you goodies! πŸ’–

We are happy and proud to have you all as part of our community! πŸ’–

🎩 How's the Magic Happen?

Keploy proxy captures and replays ALL (CRUD operations, including non-idempotent APIs) of your app's network interactions.

Take a journey to How Keploy Works? to discover the tricks behind the curtain!

Here are Keploy's core features: πŸ› 

  • ♻️ Combined Test Coverage: Merge your Keploy Tests with your fave testing libraries(JUnit, go-test, py-test, jest) to see a combined test coverage.

  • πŸ€– EBPF Instrumentation: Keploy uses EBPF like a secret sauce to make integration code-less, language-agnostic, and oh-so-lightweight.

  • 🌐 CI/CD Integration: Run tests with mocks anywhere you likeβ€”locally on the CLI, in your CI pipeline (Jenkins, Github Actions..) , or even across a Kubernetes cluster.

  • πŸ“½οΈ Record-Replay Complex Flows: Keploy can record and replay complex, distributed API flows as mocks and stubs. It's like having a time machine for your testsβ€”saving you tons of time!

  • 🎭 Multi-Purpose Mocks: You can also use keploy Mocks, as server Tests!

πŸ‘¨πŸ»β€πŸ’» Let's Build Together! πŸ‘©πŸ»β€πŸ’»

Whether you're a newbie coder or a wizard πŸ§™β€β™€οΈ, your perspective is golden. Take a peek at our:

πŸ“œ Contribution Guidelines

❀️ Code of Conduct

🐲 Current Limitations!

  • Unit Testing: While Keploy is designed to run alongside unit testing frameworks (Go test, JUnit..) and can add to the overall code coverage, it still generates integration tests.
  • Production Lands: Keploy is currently focused on generating tests for developers. These tests can be captured from any environment, but we have not tested it on high volume production environments. This would need robust deduplication to avoid too many redundant tests being captured. We do have ideas on building a robust deduplication system #27

✨ Resources!

πŸ€” FAQs

πŸ•΅οΈβ€οΈ Why Keploy

βš™οΈ Installation Guide

πŸ“– Contribution Guide