API Test Setup for GitHub CI/CD
Keploy makes it super simple to run API tests during your CI/CD pipeline on GitHub. Here’s a step-by-step guide to help you set it up in just a few minutes!
Step 1: Get the Test Command from Keploy Dashboard
- Go to app.keploy.io
- Click on Test Suite in the sidebar
- You'll see an option to “Run test suites natively”
- Copy the command
Step 2: Set Up GitHub Actions Workflow
Add the following steps to your .github/workflows/ci.yml
file:
Install Keploy CLI
- name: Install Keploy CLI
run: |
curl --silent -L https://keploy.io/ent/install.sh | bash
Run Keploy API Tests
Paste the command copied from the dashboard here:
- name: Run Keploy Test Suite
run: |
export KEPLOY_API_KEY=${{ secrets.KEPLOY_API_KEY }}
keploy test-suite --app=03d24177-315c-4ee1-a3ac-64ed0ab38567 --base-path http://localhost:8080/books --cloud
⚠️ Note
Don’t forget to add your KEPLOY_API_KEY
as a GitHub secret!
Go to your repo → Settings → Security → Actions → New Repository Secret
Replace --app
and --base-path
with your actual values from the Keploy Dashboard.
Output Example: Real-time Test Execution Logs
Once integrated, here’s what a successful run may look like in your GitHub Actions console:
🐰 Keploy: Running test suite {"name": "Create and update one book verify other is unaffected via list"}
🐰 Keploy: Running test case {"name": "Create Book A"}
🐰 Keploy: step passed {"step": "Create Book A"}
...
+------------------------------------------+--------+-------+
| Test Case | Status | Runs |
+------------------------------------------+--------+-------+
| Create book with only title | PASSED | 1 |
| Create book with invalid progress | PASSED | 1 |
| Delete book by very large ID | PASSED | 1 |
| Update book by invalid ID format | PASSED | 1 |
| ... | ... | ... |
+------------------------------------------+--------+-------+
Test suite execution summary
Total suites: 122
Passed suites: 122
Failed suites: 0
That's it!
With just a few lines of YAML, you’ve added AI-powered API test automation into your GitHub CI pipeline. Now every PR or deployment will be automatically tested with Keploy’s smart test engine.
Contact Us
If you have any questions or need help, please feel free to reach out to us at hello@keploy.io or reach out us on
or open a discussion on