API Reference
Test Case Tests
Create test case tests for your products.
Create a test case test
Create a new test case test.
Endpoint: POST /products/{product_id}/test_case_test
Parameters:
product_id(number, required) - ID of the Product
Request Body:
test_case_test(TestCaseTest Create, required) - Test case test objecttest_title(string, optional) - Title of the testgoal(string, optional) - Goal of the testout_of_scope(string, optional) - What is out of scope of the testinstructions(string, optional) - Additional instructions for the crowdstart_at(string, optional) - Start date and time of test. Default: within the next full hourduration(string, optional) - Duration of the test in hoursreport_language(ReportLanguage, optional) - Language for bug reportsrequirements(array[Requirement Create], optional) - Device requirementstest_cases(array[TestCase Create], required) - Array of test casestest_environment(TestEnvironment Create, required) - Test environment
Example Request:
1curl -X POST "https://api.test.io/customer/v2/products/1/test_case_test" \
2 -H "Authorization: Token YOUR_API_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "test_case_test": {
6 "test_title": "Login Flow Test",
7 "goal": "Validate login functionality",
8 "duration": "2",
9 "report_language": "en",
10 "test_cases": [
11 {
12 "id": 1
13 }
14 ],
15 "test_environment": {
16 "title": "Staging",
17 "url": "https://staging.example.com"
18 }
19 }
20 }'Response: 201 Created
Returns the created test case test object.
Building the requirements array
Use requirements to target devices/platforms exactly. A requirement is a small object with a type and value (and sometimes additional keys), and you can pass multiple to combine filters.
- Device types:
{ "type": "device_type", "value": "desktop" },{ "type": "device_type", "value": "mobile" } - Operating systems:
{ "type": "os", "value": "ios" },{ "type": "os", "value": "android" },{ "type": "os", "value": "windows" },{ "type": "os", "value": "macos" } - OS versions:
{ "type": "os_version", "value": ">=17" },{ "type": "os_version", "value": "13" } - Browsers:
{ "type": "browser", "value": "chrome" },{ "type": "browser", "value": "safari" } - Locales:
{ "type": "locale", "value": "de-DE" }
Example:
1{
2 "test_case_test": {
3 "test_title": "Checkout - iOS Safari",
4 "requirements": [
5 { "type": "device_type", "value": "mobile" },
6 { "type": "os", "value": "ios" },
7 { "type": "browser", "value": "safari" }
8 ],
9 "test_cases": [{ "id": 1 }],
10 "test_environment": { "title": "Staging", "url": "https://staging.example.com" }
11 }
12}See the dedicated Requirements page for full details and allowed values.