DEV Community

Nishant Chaubey
Nishant Chaubey

Posted on

✨ From Manual Testing to AI Magic: My API Testing Journey with Keploy πŸš€

β€œI went from writing manual test scripts line-by-line to achieving 100% API test coverage in minutes β€” thanks to Keploy!”


πŸ‘‹ Who Am I?

Hi, I’m Nishant Kumar Chaubey, a B.Tech student at KIIT with a deep interest in web development and blockchain. As a developer, I’ve spent countless hours writing and debugging tests manually for APIs β€” and honestly, it hasn’t always been fun.

That’s why discovering Keploy, an AI-based API testing platform, was a game-changer.


🧲 Why API Testing Matters

When building full-stack applications β€” like my recent Pet Adoption Center project β€” one thing that’s essential but often overlooked is robust testing. Writing unit, integration, and API tests ensures:

  • APIs behave as expected
  • Bugs are caught early
  • Refactors don’t break things silently

But writing all of those tests manually is time-consuming and repetitive.


πŸ’‘ Enter Keploy β€” AI-Powered API Testing

Keploy made me rethink testing. Instead of writing boilerplate code for each endpoint, Keploy automatically generated test cases based on:

  • Live API traffic (from curl or browser)
  • OpenAPI schema
  • Chrome Extension traffic capture

🧩 Task 1: AI API Testing + GitHub Actions Integration

As part of the API Fellowship, my first challenge was to:

  • βœ… Create an OpenAPI schema
  • βœ… Capture curl traffic from real API usage
  • βœ… Generate tests using Keploy Cloud
  • βœ… Integrate those tests into GitHub Actions for CI/CD

πŸ› οΈ My Stack

  • Backend: Node.js + Express.js
  • Frontend: React.js
  • Database: MongoDB Atlas
  • Testing: Jest, Supertest, and now... Keploy AI

🧲 How I Used Keploy for API Testing

  1. Generated OpenAPI schema for my backend
  2. Used Keploy CLI to run:
   keploy record --command "npm start"
Enter fullscreen mode Exit fullscreen mode
  1. Performed real curl/API requests
  2. Keploy recorded the requests/responses and auto-created test cases
  3. I then ran:
   keploy test --config config.yaml
Enter fullscreen mode Exit fullscreen mode
  1. Result: It generated 20 suites, with 0 boilerplate written by me, and tested CRUD operations!

πŸ€– GitHub Actions Integration

I added the Keploy test suite into my GitHub workflow:

- name: Install Keploy CLI
  run: |
    curl --silent -L https://keploy.io/ent/install.sh | bash

- name: Run Keploy Test Suite
  run: |
    export KEPLOY_API_KEY=your_key && keploy test-suite --app=your_app_id --base-path http://localhost:5000/api --cloud
Enter fullscreen mode Exit fullscreen mode

Now, on every push, tests are triggered and verified via the Keploy Cloud Dashboard. 🌟


🌐 Task 2: Chrome Extension API Test Recording

Next, I tried Keploy's Chrome Extension β€” and it blew my mind how simple it was.


βš–οΈ Steps I Followed:

  1. Cloned the Keploy Chrome Extension Repo
  2. Loaded it into Chrome via chrome://extensions
  3. Visited two real-world websites to test their live API interactions:
    • πŸ›οΈ Flipkart – Browsed mobile phones, filtered by price and brand, opened product pages.
    • πŸ“¦ Amazon – Searched for books, explored product categories, checked product details.
  4. Clicked Start Recording on the Keploy Chrome Extension β†’ interacted with the websites.
  5. Clicked Stop Recording once done β†’ hit Generate Tests to let Keploy convert those captured API calls into ready-to-use test cases.

Keploy redirected me to the dashboard and generated tests based on the captured traffic β€” again, without writing a single line of test code.


βš™οΈ Manual vs Keploy AI β€” A Quick Comparison

Aspect Manual Testing Keploy AI Testing
Time to write test cases 2–3 hours (for 15 endpoints) Under 10 minutes
Maintenance Prone to human error Regenerates tests from traffic
Coverage Partial (usually) 100% coverage from recorded interactions
Setup Complexity Medium Low (just run with curl or browser)
Integration in CI/CD Manual with Jest/Supertest Seamless via GitHub Actions + CLI

😍 Final Thoughts

Using Keploy was like unlocking a cheat code in development. As someone who’s manually written hundreds of lines of test cases β€” I truly appreciate how:

  • Fast 🚨
  • Accurate βœ…
  • Intelligent πŸ€– Keploy is.

Whether through its CLI + GitHub CI pipeline or Chrome extension, I was able to move from 0 to 100% API test coverage in just a few minutes.


πŸ“œ What’s Next?

  • I’m planning to use Keploy in future backend projects β€” especially for microservices.
  • I’ll be exploring test assertions customization and mocking responses too.
  • And most importantly, I’ll recommend this to any developer building APIs.

πŸ”— Try It Yourself!


πŸ§‘β€πŸ’» About Me

Nishant Kumar Chaubey
B.Tech CSE | KIIT
πŸ’» Web Dev | 🧱 Blockchain | 🧲 API Enthusiast

Thanks for reading! Feel free to reach out or comment if you're exploring Keploy too πŸ™Œ

Top comments (0)