API Reference
Test Templates
List test templates available for your products and sections.
What are Test Templates?
Once you’ve identified a test setup that consistently yields the results you want, save it as a Template so you can reuse it.
- You can save tests as Templates and reuse them in future tests
- Templates can be selected during test setup
- Templates can be named and deleted individually
- Limit of 10 templates per product
test IO Best Practice: Name templates so it’s obvious what their purpose is and how they differ from others, e.g.:
- Websites: "Staging - Checkout process"
- Mobile: "New User Registration - Rapid Test"
Prerequisites: You need a product to list test templates. See Products to get or create a product. Test templates can be used as an alternative to features when creating exploratory tests (see Exploratory Tests).
List test templates
Retrieve all test templates for a specific product, optionally filtered by section.
Endpoint: GET /test_templates
Query Parameters:
product_id(number, required) - ID of the Productsection_id(number, optional) - ID of the Section
Example Request:
1curl -X GET "https://api.test.io/customer/v2/test_templates?product_id=1" \
2 -H "Authorization: Token YOUR_API_TOKEN"Response: 200 OK
Returns an array of test template objects.
Each test template includes:
id(number) - Template IDtitle(string) - Title of test templatetest_scenario_template(string) - Type of test scenario templatemax_test_duration(number) - Max duration of the test in hoursmin_test_duration(number) - Min duration of the test in hoursdefault_test_duration(number) - Default duration of the test in hours