Skip to content
Merged
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
1 change: 1 addition & 0 deletions src/data/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const navigation = [
{ title: "Products", href: "/docs/api/products" },
{ title: "Features", href: "/docs/api/features" },
{ title: "User Stories", href: "/docs/api/user-stories" },
{ title: "User Story Version Executions", href: "/docs/api/user-story-version-executions" },
{ title: "Test Environments", href: "/docs/api/test-environments" },
{ title: "Binary Apps", href: "/docs/api/binary-apps" },
{ title: "Exploratory Tests", href: "/docs/api/exploratory-tests" },
Expand Down
160 changes: 158 additions & 2 deletions src/pages/docs/api/exploratory-tests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Exploratory Tests
description: Create and manage exploratory tests
description: Create, update, launch, duplicate, and manage exploratory tests
---

Create and manage exploratory tests for your products.
Expand All @@ -22,6 +22,12 @@ Retrieve a specific exploratory test by ID.

- `exploratory_test_id` (number, required) - ID of the Exploratory test

**Query Parameters:**

| Parameter | Type | Required | Description |
| ------------ | ----- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `includes[]` | array | No | Optional associations to expand. Supported value: `user_stories`. When included, `user_stories` in each feature returns objects with `id`, `path`, `title`, `feature_id` instead of plain strings. |

**Example Request:**

{% code language="bash" showLineNumbers=true %}
Expand All @@ -35,7 +41,7 @@ curl -X GET "https://api.test.io/customer/v2/exploratory_tests/123" \

**Response:** `200 OK`

Returns the exploratory test object with full details including test environment, features, requirements, and more.
Returns the exploratory test object with full details including test environment, features, requirements, and more. By default, `user_stories` in each feature is an array of path strings. Pass `includes[]=user_stories` to expand them into objects.

## List exploratory tests

Expand All @@ -49,6 +55,12 @@ Returns a paginated list of exploratory tests for the specified product.
- `page` (number, optional) - Page number of the result set
- `per_page` (number, optional) - Number of items per page when pagination is applied. Used only if **page** is provided. Default: 25

**Query Parameters:**

| Parameter | Type | Required | Description |
| ------------ | ----- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `includes[]` | array | No | Optional associations to expand. Supported value: `user_stories`. See [Get exploratory test](#get-exploratory-test) for details. |

**Notes:**

If `page` parameter is omitted, pagination is not applied and the last 150 tests are returned.
Expand Down Expand Up @@ -211,6 +223,150 @@ All attributes must be provided inside the root object `exploratory_test`.

Returns the created exploratory test object with full details.

> **Note on `user_stories` in response**: The `user_stories` field in the response is an array of path strings by default. To get expanded user story objects, use `includes[]=user_stories` on the GET endpoints (see [Get exploratory test](#get-exploratory-test)).

## Update exploratory test

Updates an existing exploratory test. You can modify test parameters, features, and the test environment.

**Endpoint:** `PUT /exploratory_tests/{exploratory_test_id}`

**Parameters:**

- `exploratory_test_id` (number, required) - ID of the Exploratory test

All attributes must be provided inside the root object `exploratory_test`. Only provided fields will be updated.

### Attributes

Same attributes as [Create exploratory test](#create-exploratory-test), with the following differences:

- `test_environment` (object, **optional**) - Test environment related attributes. If omitted, the existing test environment is kept
- `features` (array, optional) - Features to be tested. If omitted, existing features are kept
- `test_template` is **not available** for updates

**Example Request:**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X PUT "https://api.test.io/customer/v2/exploratory_tests/123" \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"exploratory_test": {
"test_title": "Updated Checkout Flow Test",
"goal": "Re-validate the checkout process after fixes",
"features": [
{
"id": 15
},
{
"title": "Payment Flow",
"description": "Verify payment methods work correctly.",
"howtofind": "Proceed to payment after adding items to cart.",
"user_stories": [
"As a customer, I want to pay with a credit card.",
"As a customer, I want to apply a discount code."
]
}
]
}
}'
```

{% /code %}

**Response:** `200 OK`

Returns the updated exploratory test object with full details.

## Launch exploratory test

Launches a previously created exploratory test that has not been launched yet. This is useful when the test was created with `auto_launch: false`.

**Endpoint:** `POST /exploratory_tests/{exploratory_test_id}/launch`

**Parameters:**

- `exploratory_test_id` (number, required) - ID of the Exploratory test

**Example Request:**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X POST "https://api.test.io/customer/v2/exploratory_tests/123/launch" \
-H "Authorization: Token YOUR_API_TOKEN"
```

{% /code %}

**Response:** `200 OK`

Returns the launched exploratory test object with full details.

## Duplicate exploratory test

Creates a copy of an existing exploratory test. The duplicated test will have the same configuration (features, test environment, requirements, etc.) but will be a new, independent test.

**Endpoint:** `POST /exploratory_tests/{exploratory_test_id}/duplicate`

**Parameters:**

- `exploratory_test_id` (number, required) - ID of the Exploratory test to duplicate

**Example Request:**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X POST "https://api.test.io/customer/v2/exploratory_tests/123/duplicate" \
-H "Authorization: Token YOUR_API_TOKEN"
```

{% /code %}

**Response:** `200 OK`

Returns the newly created (duplicated) exploratory test object with full details. The duplicated test will have a new ID.

## Create test template from exploratory test

Creates a reusable test template based on an existing exploratory test's configuration. The template captures the test scenario settings (features, requirements, etc.) so they can be reused when creating future tests.

**Endpoint:** `POST /exploratory_tests/{exploratory_test_id}/templates`

**Parameters:**

- `exploratory_test_id` (number, required) - ID of the Exploratory test to create a template from

**Request Body:**

- `test_template` (object, required)
- `title` (string, required) - Title for the new test template

**Example Request:**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X POST "https://api.test.io/customer/v2/exploratory_tests/123/templates" \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"test_template": {
"title": "Checkout Flow Template"
}
}'
```

{% /code %}

**Response:** `201 Created`

Returns the newly created test template object. See [Test Templates](/docs/api/test-templates) for more details on the response format.

### Building Requirements Array

The `requirements` array allows you to specify device targeting for your test. Each requirement object can include:
Expand Down
160 changes: 159 additions & 1 deletion src/pages/docs/api/features.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Features
description: List and create features
description: List, create, and copy features
---

Manage features for your products.
Expand All @@ -17,6 +17,14 @@ Retrieve all features for a specific product.

- `product_id` (number, required) - ID of the Product

**Query Parameters:**

| Parameter | Type | Required | Description |
| ------------ | ----- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `includes[]` | array | No | Optional associations to expand. Supported value: `user_stories`. When included, `user_stories` returns objects with `id`, `path`, `title`, `feature_id` instead of plain strings. |

> For products **with sections**, use `GET /products/{product_id}/sections/{section_id}/features` to list features scoped to a specific section. See [List features by section](#list-features-by-section) below.

**Example Request:**

{% code language="bash" showLineNumbers=true %}
Expand All @@ -30,6 +38,8 @@ curl -X GET "https://api.test.io/customer/v2/products/1/features" \

**Response:** `200 OK`

By default, `user_stories` is an array of path strings:

{% code language="json" showLineNumbers=true %}

```json
Expand All @@ -48,6 +58,100 @@ curl -X GET "https://api.test.io/customer/v2/products/1/features" \

{% /code %}

**Example Request (with expanded user stories):**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X GET "https://api.test.io/customer/v2/products/1/features?includes[]=user_stories" \
-H "Authorization: Token YOUR_API_TOKEN"
```

{% /code %}

**Response:** `200 OK`

When `includes[]=user_stories` is passed, each user story is returned as an object:

{% code language="json" showLineNumbers=true %}

```json
{
"features": [
{
"id": 1,
"title": "Account Management",
"description": "Manage your account information",
"howtofind": "Top right of the screen",
"user_stories": [
{
"id": 10,
"path": "User story 1",
"title": "User story 1",
"feature_id": 1
},
{
"id": 11,
"path": "User story 2",
"title": "User story 2",
"feature_id": 1
}
]
}
]
}
```

{% /code %}

## List features by section

Retrieve all features for a specific section of a product. Use this endpoint for products that have sections enabled.

**Endpoint:** `GET /products/{product_id}/sections/{section_id}/features`

**Parameters:**

- `product_id` (number, required) - ID of the Product
- `section_id` (number, required) - ID of the Section

**Query Parameters:**

| Parameter | Type | Required | Description |
| ------------ | ----- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `includes[]` | array | No | Optional associations to expand. Supported value: `user_stories`. See [List features](#list-features) for details. |

**Example Request:**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X GET "https://api.test.io/customer/v2/products/1/sections/2/features" \
-H "Authorization: Token YOUR_API_TOKEN"
```

{% /code %}

**Response:** `200 OK`

{% code language="json" showLineNumbers=true %}

```json
{
"features": [
{
"id": 1,
"title": "Account Management",
"description": "Manage your account information",
"howtofind": "Top right of the screen",
"user_stories": ["User story 1"]
}
]
}
```

{% /code %}

## Create feature

Create a new feature.
Expand Down Expand Up @@ -106,3 +210,57 @@ curl -X POST "https://api.test.io/customer/v2/features" \
```

{% /code %}

## Copy features

Copy all features (including their user stories) from one product to another. The features are duplicated into the destination product.

**Endpoint:** `PUT /products/{product_id}/features/copy`

**Parameters:**

- `product_id` (number, required) - ID of the source Product to copy features from
- `destination_product_id` (number, required) - ID of the destination Product to copy features to

**Query Parameters:**

| Parameter | Type | Required | Description |
| ------------ | ----- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `includes[]` | array | No | Optional associations to expand. Supported value: `user_stories`. See [List features](#list-features) for details. |

**Example Request:**

{% code language="bash" showLineNumbers=true %}

```bash
curl -X PUT "https://api.test.io/customer/v2/products/1/features/copy" \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"destination_product_id": 2
}'
```

{% /code %}

**Response:** `200 OK`

Returns the list of features in the destination product after copying.

{% code language="json" showLineNumbers=true %}

```json
{
"features": [
{
"id": 30,
"title": "Account Management",
"description": "Manage your account information",
"howtofind": "Top right of the screen",
"user_stories": ["User story 1"]
}
]
}
```

{% /code %}
Loading