Over the past few days, I had the amazing opportunity to work on API testing using Keploy AI as part of the Keploy API Fellowship. In this post, I’ll walk you through everything I did — from building a Node.js API to running AI-powered tests and integrating it into a CI/CD pipeline.
🔧 My API Project
I built a Student Manager API using:
- Node.js & Express – for the backend
- MongoDB Atlas – as the database
- Swagger – to document the API
- Endpoints for GET, POST, PUT, DELETE at /api/students
GitHub Repository:
https://github.com/kishorecodesinpython/student-api-server
🧪 Task 1 – API Testing with Keploy AI
Step 1: Created an OpenAPI Schema
I defined all endpoints and schemas using Swagger UI, hosted at /api-docs.
Step 2: Ran Keploy in Docker
Since I’m using Windows, I had to use Docker with WSL2. I ran this command: docker compose up --build
This built and launched my API and Keploy CLI together inside containers.
Step 3: Recorded API Calls
I sent multiple requests using curl and Postman to record traffic, while Keploy captured them in real-time. Then I ran: keploy test ...
This generated multiple test cases from actual traffic. I got a Test Drive report with:
- 27 Test Suites
- 20 Accepted
- 7 Rejected
Step 4: Debugging Docker & Environment Issues
This was not all smooth! I faced a few problems:
- Docker WSL2 was broken (resolved via reset and reinstall)
- MongoDB URI wasn’t passed properly (fixed using dotenv)
- Curl commands needed to be corrected for schema match
Step 5: CI/CD Integration
I integrated Keploy testing into a GitHub Actions pipeline, which automatically:
- Built my app using Docker
- Ran all tests
- Validated test outputs
🌐 Task 2 – Chrome Extension API Testing
I explored the Keploy Chrome Extension to test real-world APIs.
Site 1: DummyJSON
I captured a GET request to /products using the Chrome console and the Keploy extension.
Site 2: JSONPlaceholder
Tested endpoints like GET /posts, POST /posts, and validated response handling.
The Chrome Extension made it incredibly easy to record calls and generate test cases on the fly.
💡 What I Learned
- Keploy’s AI-generated tests helped me go from zero to complete test coverage in minutes.
- Docker with WSL2 on Windows takes patience and careful setup.
- The Chrome extension is perfect for testing third-party/public APIs.
- CI/CD test integration adds confidence to production readiness.
📸 Final Screenshots I Shared:
- Swagger API Docs UI
- Keploy “Test Drive” bunny report
- Docker logs running Keploy
- MongoDB connected confirmation in terminal
🏁 Conclusion
Thanks to Keploy, I transitioned from writing tests manually to using AI for full automation. This fellowship was one of the most hands-on testing experiences I’ve had — and I’ll definitely be applying these workflows to future projects.
GitHub Repo:
https://github.com/kishorecodesinpython/student-api-server
Let me know what you think or if you want to connect!
Top comments (0)