DEV Community

Akash Kumar
Akash Kumar

Posted on

🧠 From Building Habits to Breaking Testing Barriers – My API Testing Journey with Keploy

Building APIs is fun β€” but testing them? That used to feel like a chore.
As part of the Keploy GitHub Learning Program, I recently built a full-stack Habit Tracker API using Flask and MongoDB β€” but the real shift came when I got to test it using AI.

πŸ“Œ The Project: Habit Tracker API

The idea was simple β€” track personal habits for different users with full CRUD operations. I built:

A custom REST API in Flask

A MongoDB backend

A basic HTML + JavaScript frontend for testing

5 core endpoints: Add, Get, Update, and Delete habits
Enter fullscreen mode Exit fullscreen mode

Sounds complete, right? Almost. But what about testing?
😫 The Problem: Manual API Testing

Initially, I tried writing unit tests manually β€” and it worked, but:

It was time-consuming

I struggled to cover all use cases

Every time I changed my API, I had to update my tests again
Enter fullscreen mode Exit fullscreen mode

That’s when Keploy entered the scene.
πŸ€– The Game Changer: Keploy's AI Testing

With Keploy CLI, I was able to:

βœ… Automatically record API calls
βœ… Replay them as test cases
βœ… Achieve real test coverage without manually scripting each test

I used curl commands and the frontend UI to simulate real use, while Keploy silently captured everything β€” and then turned those interactions into executable test cases.
Literally zero code for test writing!

πŸ› οΈ CI/CD Integration with GitHub Actions

Testing alone isn’t enough β€” it needs to be automated.

So I went ahead and:

Created an OpenAPI schema (using Flasgger)

Integrated Keploy test execution in GitHub Actions

Ensured my pipeline runs tests on every push and pull request
Enter fullscreen mode Exit fullscreen mode

This step made my API production-ready in the truest sense.
🌐 Chrome Extension Bonus

To take it one step further, I used Keploy’s Chrome Extension to test APIs on real-world websites.
It felt amazing to inspect network traffic and capture meaningful test data without dev tools or Postman.

πŸ’‘ What I Learned

Testing doesn’t have to be painful.

AI + DevTools = game-changing productivity

CI/CD is not complete without reliable test automation

Real coverage > theoretical coverage
Enter fullscreen mode Exit fullscreen mode

🧩 Tech Stack Used

Backend: Flask (Python), MongoDB

Frontend: HTML + JS

Testing: Keploy CLI, Keploy Chrome Extension

CI/CD: GitHub Actions
Enter fullscreen mode Exit fullscreen mode

πŸ”— See it in action:

πŸ‘‰ GitHub Repo Link – Habit Tracker API

Big shoutout to @keploy for building such a developer-friendly tool and helping students like me explore test automation with real-world projects.

Want to test APIs like a pro?
Try Keploy β€” you might just fall in love with testing πŸ’™

Top comments (0)