Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1465,11 +1465,11 @@ article.markdown p {
/* Heading hierarchy - clear visual distinction */
article.markdown h1 {
margin-top: 0;
margin-bottom: 1rem;
margin-bottom: 0.9rem;
font-size: 2.5rem;
font-weight: 800;
letter-spacing: -0.03em;
line-height: 1.2;
line-height: 1.4;
color: #111827;
}

Expand Down
2 changes: 1 addition & 1 deletion src/theme/Heading/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ the browser does not scroll that anchor behind the navbar
See https://twitter.com/JoshWComeau/status/1332015868725891076
*/
.anchorWithStickyNavbar {
scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem);
scroll-margin-top: calc(var(--ifm-navbar-height) + 0.2rem);
}

.anchorWithHideOnScrollNavbar {
Expand Down
Binary file added static/img/custom-function.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/global-functions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/global-vars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/multi-assertion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/schema-assertion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/var-extraction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/var-injection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
color: "var(--ifm-color)",
h1: {
color: "var(--ifm-color)",
lineHeight: "1.5",
},
h2: {
color: "var(--ifm-color)",
Expand Down Expand Up @@ -98,6 +99,13 @@ module.exports = {
},
},
},
lg: {
css: {
h1: {
lineHeight: "1.2",
},
},
},
},
transitionDelay: {
3000: "3000ms",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

- Go to the [Keploy Console](https://app.keploy.io/api-testing/generate)
- Upload your API input (schema, collection, or curl)
- 👊 Hit **Generate Tests** and Keploy will parse your input, hit the API, and generate validated test flows with response-based assertions.
- 👊 Keploy’s engine triggers live requests against your target environment to capture the full execution context—including the API response and the resulting
dependency interactions (DB queries, internal gRPC calls)—creating a deterministic 'Digital Twin' of the transaction.
- If private endpoints are detected, follow the agent setup prompt
- Review and edit your generated tests

## ⚠️ Private Endpoint API Warning

If your API is not publicly accessible, Keploy will show a warning when attempting to reach those endpoints. **To resolve this**, install the Keploy Agent proxy locally
If your API is not publicly accessible, Keploy will show a warning when attempting to reach those endpoints. **To resolve this**, install the Keploy Agent proxy locally.
The Agent acts as a local interceptor that uses eBPF to record your service's interactions with its dependencies (Databases, APIs), ensuring tests can be replayed without environment setup.

### Keploy Agent Installation

Expand All @@ -33,7 +35,8 @@
| **Linux** | - Run the following in your terminal: <br /><br /> `curl -L -O https://keploy-enterprise.s3.us-west-2.amazonaws.com/releases/latest/keploy-agent-linux-amd64.tar.gz` <br /><br /> `tar -xzf keploy-agent-linux-amd64.tar.gz` <br /><br /> `./keploy-agent` <br /><br /> |
| **Windows** | - [Download](https://keploy-enterprise.s3.us-west-2.amazonaws.com/releases/latest/Keploy+Agent-windows_amd64.zip) <br /><br /> Extract the zip file and Launch the Keploy Agent. <br /> |

> ✅ Once installed and running, return to the Keploy Console and hit **Generate API Tests**. The agent will proxy your local API to allow secure test generation.
> ✅ Once installed and running, return to the Keploy Console and hit **Generate API Tests**. The Keploy Agent creates a secure bridge to your local or private
environment, enabling our engine to interact with your service as if it were in production, capturing the underlying dependency calls (DB, 3rd party APIs) without code changes.

Check failure on line 39 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L39

[Google.Ordinal] Spell out all ordinal numbers ('3rd') in text.
Raw output
{"message": "[Google.Ordinal] Spell out all ordinal numbers ('3rd') in text.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 39, "column": 142}}}, "severity": "ERROR"}

## BEST Practices for BEST Test Output

Expand All @@ -50,13 +53,13 @@

| URL Example | | Why It's Good or Bad |
| --------------------------------------- | --- | -------------------------------------------- |
| `https://api.example.com` | ✅ | API subdomain — general and testable |

Check failure on line 56 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L56

[Google.EmDash] Don't put a space before or after a dash.
Raw output
{"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 56, "column": 63}}}, "severity": "ERROR"}
| `https://example.com/api` | ✅ | API under path — works across many endpoints |

Check failure on line 57 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L57

[Google.EmDash] Don't put a space before or after a dash.
Raw output
{"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 57, "column": 64}}}, "severity": "ERROR"}
| `https://example.com/api/v2` | ✅ | Versioned API route |
| `https://example.com/v2/orders` | ✅ | Specific API group — stable path |

Check failure on line 59 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L59

[Google.EmDash] Don't put a space before or after a dash.
Raw output
{"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 59, "column": 68}}}, "severity": "ERROR"}
| `https://example.com` | ❌ | Homepage — not an API |

Check failure on line 60 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L60

[Google.EmDash] Don't put a space before or after a dash.
Raw output
{"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 60, "column": 58}}}, "severity": "ERROR"}
| `https://example.com/index.html` | ❌ | Static file — not useful for API testing |

Check failure on line 61 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L61

[Google.EmDash] Don't put a space before or after a dash.
Raw output
{"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 61, "column": 61}}}, "severity": "ERROR"}
| `https://api.example.com/orders/126789` | ❌ | Too specific — single object, not general |

Check failure on line 62 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L62

[Google.EmDash] Don't put a space before or after a dash.
Raw output
{"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 62, "column": 62}}}, "severity": "ERROR"}

> ⚠️ Avoid using URLs pointing to static resources or deeply nested objects.

Expand All @@ -68,7 +71,7 @@
- ✅ Assertions on status, body, and headers
- ✅ Multi-step flow generation (e.g. POST → GET → DELETE)
- ✅ Automatic test deduplication
- ✅ Environment reusability for staging, QA, or CI

Check failure on line 74 in versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md

View workflow job for this annotation

GitHub Actions / vale

[vale] versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md#L74

[Vale.Spelling] Did you really mean 'reusability'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'reusability'?", "location": {"path": "versioned_docs/version-3.0.0/running-keploy/generate-api-tests-using-ai.md", "range": {"start": {"line": 74, "column": 17}}}, "severity": "ERROR"}
- ✅ Labeled, editable, and sharable from the dashboard

[//]: # "## Next Steps"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
id: api-testing-add-suite
title: Adding New Test Suites
description: Guide to adding to new Suites using "Add New"
sidebar_label: Adding New Suite
tags:
- api-testing
- test-organization
- test-suite
- test-management
---
import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

In this guide, we will walk through the process of adding a test suite in Keploy. Users can either manually provide the details for the test suite or directly import a curl command to create one.

## Steps to Add a Test Suite

1. **Click on the Plus Button**
- Navigate to the test suite section in the Keploy interface.
- Click on the `+` button to add a new test suite.

2. **Provide Test Suite Details**
- Fill in the following fields:
- **Name**: Enter a unique name for the test suite.
- **Details**: Provide a brief description of the test suite.
- **Request**: Specify the request details, such as the HTTP method, URL, headers, and body.
- **Assertions**: Define any Assertions related to the test suite.
![Add Suite](https://keploy-devrel.s3.us-west-2.amazonaws.com/add-new-suite-1.png)

3. **Import a Curl Command (Optional)**
- If you have a curl command, you can directly import it to create the test suite.
- Paste the curl command in the provided input field.
- Keploy will automatically parse the curl command and populate the test suite details.

4. **Save the Test Suite**
- Once all the details are filled in, click on the `Save` button to create the test suite.

## Example

### Manual Entry
```json
{
"name": "User Authentication",
"details": "Tests the login functionality.",
"request": {
"method": "POST",
"url": "https://api.example.com/login",
"headers": {
"Content-Type": "application/json"
},
"body": {
"username": "test_user",
"password": "secure_password"
}
}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Malformed JSON - extra closing brace }} makes this invalid JSON. The example is also missing the assertions field mentioned in the description above.

Suggested change
}}
}
}

```

### Importing a Curl Command
```bash
curl -X POST https://api.example.com/login \
-H "Content-Type: application/json" \
-d '{"username": "test_user", "password": "secure_password"}'
```

By following these steps, you can easily create and manage test suites in Keploy.
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
id: api-testing-adding-labels
title: Adding Labels to Test Suites
description: Guide to creating and assigning labels to test suites individually or in bulk
sidebar_label: Adding Labels
tags:
- api-testing
- test-organization
- labels
- test-management
---

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

Labels help you organize, categorize, and filter your test suites effectively. Keploy provides flexible labeling options that allow you to add labels to individual test suites or multiple suites at once.

## Overview

The labeling system includes:

- **Individual Labeling**: Add labels to specific test suites
- **Bulk Labeling**: Apply labels to multiple suites simultaneously
- **Label Management**: Create, edit, and delete custom labels
- **Filtering**: Use labels to filter and organize your test collection

## Adding Labels to Individual Test Suites

### Method 1: Using the Three Dots Menu

1. **Navigate to Test Suites**
- Go to your Test Suites Dashboard

2. **Access Suite Options**
- Locate the test suite you want to label
- Click the **three dots (⋮)** menu next to the test suite name

3. **Select Add Label Option**
- From the dropdown menu, click **"Add Labels"**

![Add Label](https://keploy-devrel.s3.us-west-2.amazonaws.com/add-labels-1.png)

## Label Assignment Interface

When you open the label assignment dialog, you'll see:

### Existing Labels Section
```
🏷️ Available Labels
├── 📊 Priority
│ ├── high-priority (P0)
│ ├── medium-priority(P1)
│ └── low-priority(P2)
```

### Assigning Existing Labels

1. **Browse Categories**
- Expand label categories to see available options
- Use the search box to find specific labels quickly

2. **Select Labels**
- Click on labels to select them
- Selected labels will be highlighted or marked with a checkmark ✓
- You can select multiple labels from different categories

3. **Apply Labels**
- Review your selections in the "Selected Labels" preview
- Click **"Apply Labels"** to assign them to the test suite

## Creating New Labels

### Creating During Assignment

1. **Open Label Dialog**
- Follow the steps above to open the label assignment interface

2. **Create New Label**
- Click **"Create Custom Label"**
- Enter label details in the creation form

3. **Label Creation Form**
- For Example:
```
Label Name: [smoke-critical]
Color: [🔴] (color picker)
```

## Bulk Label Assignment

### Using Checkbox Selection

1. **Select Multiple Suites**
- Navigate to the Test Suites list
- Use checkboxes to select multiple test suites
- After selecting suites, Click **"Add Labels"** or **"Create Custom Labels"** button

## Label Management Best Practices

### Naming Conventions

1. **Use Consistent Formatting**
```
✅ Good Examples:
- team-frontend
- priority-high
- env-production
- type-smoke-test

❌ Avoid:
- TeamFrontend
- HIGH_PRIORITY
- prod env
- smoke test type
```

2. **Category-Based Organization**
```
Priority: critical, high, medium, low
Environment: production, staging, development
Type: smoke, regression, integration, e2e
Team: frontend, backend, qa, devops
Status: active, deprecated, experimental
```

## Related Features

- **[Test Suite Management](./api-testing-edit-suites.md)**: Edit and organize test suites
- **[Selective Test Execution](./api-testing-running-selective.md)**: Run tests using label filters
- **[Test Reports](./api-testing-sharing-reports.md)**: Generate reports filtered by labels
- **[Custom Assertions](./api-testing-custom-assertions.md)**: Create assertions for labeled suites

Labels are a powerful organizational tool that help you maintain order in large test collections and enable efficient test management workflows.
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
id: api-testing-assertion-tree
title: Assertion Tree
sidebar_label: Assertion Tree
description: Visualize and manage your entire test flow in a structured tree format
tags:
- API testing
- test visualization
- assertion tree
- test flow
- automation
keywords:
- test suite visualization
- assertion tree
- API flow
- test step editor
- visual test builder
---

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

## Assertion Tree

The **Assertion Tree** allows you to visualize and manage your entire test suite in a structured, hierarchical format.

Instead of viewing tests as isolated steps, the Assertion Tree gives you a complete flow-level perspective — including requests, responses, and assertions — in one interactive interface.

---

## How to Access the Assertion Tree

1. Navigate to an individual **Test Suite**
2. Click on the **"Visualize"** button
3. The system renders the full test suite in a **tree format**

---
![Assertion tree](https://keploy-devrel.s3.us-west-2.amazonaws.com/assertion-tree-1.png)

## What You Can See

The Assertion Tree provides a visual representation of:

- All test steps in execution order
- Request details for each step
- Attached assertions

Each node in the tree represents a test step and contains:

- Request configuration
- Associated assertions
- Execution dependencies

This makes it easier to understand how your test suite behaves as a complete workflow.

## What You Can Do

The Assertion Tree is fully interactive. You can:

### 1. View Complete Flow
Understand the entire API workflow from start to finish without switching between screens.

### 2. Inspect Assertions Inline
Quickly see which assertions are attached to each step, including:

- Status code validations
- JSON validations
- Header validations
- Schema validations
- Custom function validations

### 3. Add a New Step in the Flow

You can insert a new test step directly within the tree.

This allows you to:

- Expand an existing workflow
- Add conditional validation steps
- Introduce additional API calls
- Build multi-step integration flows

The new step becomes part of the structured execution sequence.

## Why Use the Assertion Tree?

The Assertion Tree is particularly useful when:

- Your test suite contains multiple API calls
- You are testing end-to-end workflows
- Business logic spans multiple requests
- You need clarity on how validations are structured
- You want a visual representation instead of linear editing

It transforms test management from a flat list into a structured execution graph.

## Typical Use Cases

- Authentication → Resource Creation → Validation → Cleanup flows
- Multi-step payment processing validations
- E-commerce checkout journeys
- Webhook-triggered event testing
- Integration testing across services

## Best Practices

- Use the tree view to design full workflows before adding assertions
- Keep each step focused on a single responsibility
- Attach assertions at the correct step level
- Review flow dependencies to avoid unintended execution order
- Use visualization to debug failing multi-step tests faster


The Assertion Tree enables you to design, inspect, and extend complex API workflows with clarity and precision — all from a single visual interface.
Loading
Loading