API Reference

Test Cases

Create test cases for your products.

Create a bulk of test cases

Create multiple test cases at once.

Endpoint: POST /products/{product_id}/test_cases

Parameters:

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

Request Body:

  • test_cases (array[TestCase], required) - Array of test case objects

TestCase Object:

  • title (string, required) - Title of the test case
  • feature_id (number, required) - ID of the Feature the test case belongs to
  • test_case_steps (array[Step], required) - Array of step objects
  • target_idx (string, optional) - Reference of the test case in other system

Step Object:

  • description (string, required) - Description of the step
  • target_idx (string, optional) - Reference of the test case step in other system

Example Request:

1curl -X POST "https://api.test.io/customer/v2/products/1/test_cases" \
2  -H "Authorization: Token YOUR_API_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "test_cases": [
6      {
7        "title": "Login Test",
8        "feature_id": 123,
9        "test_case_steps": [
10          {
11            "description": "Navigate to login page"
12          },
13          {
14            "description": "Enter credentials"
15          },
16          {
17            "description": "Click login"
18          }
19        ]
20      }
21    ]
22  }'

Response: 201 Created

Returns an array of created test case objects.

In the response, the steps field is returned as steps (not test_case_steps as in the request). Each step object in the response also includes id, test_case_id, and target_idx fields.

Previous
Bug Report Confirmations