|
| 1 | +--- |
| 2 | +id: review-and-improve-ai-generated-tests |
| 3 | +title: Review & Improve AI-Generated API Tests |
| 4 | +sidebar_label: Review & Improve Tests |
| 5 | +description: Learn how to inspect, edit, self-heal, and enhance Keploy’s AI-generated API test suites for maximum coverage and reliability. |
| 6 | +--- |
| 7 | +After you’ve generated a starter test suite with Keploy’s AI engine, the next step is to review, refine, and harden those tests so they stay trustworthy as your API evolves. |
| 8 | + |
| 9 | +## Open the Test Review Workspace |
| 10 | + |
| 11 | +Head to the Keploy Console → API Test Generation › Test Suite |
| 12 | +Based on the app that is selected, you can view the test suite for that app |
| 13 | + |
| 14 | +## Filtering by Status, Method & Endpoint |
| 15 | + |
| 16 | +Use the **Filter Options** bar in the left **Test‑Suites** pane to slice large suites down to exactly what you need: |
| 17 | + |
| 18 | +| **Filter Tab** | **How It Helps** | |
| 19 | +|------------------|----------------------------------------------------------------------------------| |
| 20 | +| **Status Code** | Type `2` to list every 2xx, `30` for redirects, or an exact code like `404`. | |
| 21 | +| **HTTP Method** | Toggle to isolate `GET`, `POST`, `PUT`, `DELETE`, and other verbs. | |
| 22 | +| **Endpoint** | Start typing a path fragment (e.g. `/orders`, `/auth`) to instantly narrow matching flows. | |
| 23 | + |
| 24 | +You can **combine these filters** with the search bar—for example, view only failed `DELETE` calls on eg: `/employees`—making it painless to triage huge test suites. |
| 25 | + |
| 26 | +## Edit Test Step – Request & Assertions |
| 27 | + |
| 28 | +Keploy lets you refine both the **request definition** and the **assertions** from a single modal: |
| 29 | + |
| 30 | +1. Click the ✏️ **Edit** icon on any step card. |
| 31 | +2. The modal opens with two tabs: |
| 32 | + |
| 33 | + |
| 34 | +### 📨 Request Details |
| 35 | +- Change the HTTP method (`GET`, `POST`, …) |
| 36 | +- Update the URL path |
| 37 | +- Add or remove headers via `+ Add Header` |
| 38 | +- Edit the request body (JSON, form‑data, etc.) |
| 39 | + |
| 40 | + |
| 41 | +### ✅ Assertions |
| 42 | +- Append new checks with `+ Add Assertion` |
| 43 | +- Pick the assertion type: |
| 44 | + - Status Code |
| 45 | + - Header Equal / Contains |
| 46 | + - Body JSONPath |
| 47 | + - Regex |
| 48 | + - Numeric `>` / `<`, etc. |
| 49 | +- Modify comparators or expected values in‑place |
| 50 | + |
| 51 | + |
| 52 | +### Save & Rollback |
| 53 | +Hit **Save Changes** – every edit is version‑controlled so you can roll back anytime. |
| 54 | + |
| 55 | +## Edit or Delete a Test Suite |
| 56 | + |
| 57 | +Manage entire suites easily from the **Test Suites** list: |
| 58 | + |
| 59 | +- **︙ Menu**: Hover over any suite row to reveal options: |
| 60 | + - ✏️ **Rename** – Update the title and description. |
| 61 | + - 📄 **Duplicate** – Clone the suite with all steps and tags. |
| 62 | + - 🗑️ **Delete** – Permanently remove the suite (with confirmation). |
| 63 | + |
| 64 | +All changes are saved instantly and logged. |
| 65 | +> ⚠️ Deletion is irreversible. Use Git history or backups to restore. |
0 commit comments