cURL
curl --request POST \ --url https://api.example.com/api/trpc/test-runs.create \ --header 'Content-Type: application/json' \ --data ' { "test_id": "<string>", "agent_id": "<string>", "environment": "<string>", "configuration": { "timeout": 123, "retry_count": 123, "parallel_steps": true, "screenshot_on_failure": true, "video_recording": true }, "variables": {} } '
{ "id": "<string>", "status": "<string>", "created_at": "<string>", "started_at": "<string>", "test": { "id": "<string>", "name": "<string>" }, "agent": { "id": "<string>", "name": "<string>" }, "400 Bad Request": {}, "401 Unauthorized": {}, "404 Not Found": {}, "409 Conflict": {} }
Create and execute a new test run
Show properties
queued
running
completed
failed
timeout
curl -X POST https://api.tryiris.dev/api/trpc/test-runs.create \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "0": { "json": { "data": { "test_id": "tst_1a2b3c4d5e", "agent_id": "agt_7f8d9e2a1b3c", "environment": "staging", "configuration": { "timeout": 300, "retry_count": 2, "parallel_steps": true, "screenshot_on_failure": true, "video_recording": true }, "variables": { "USER_EMAIL": "test@example.com", "PRODUCT_SKU": "DEMO-123" } } } } }'
{ "id": "run_2f3e4d5c6b", "status": "queued", "created_at": "2024-01-20T14:00:00Z", "started_at": null, "test": { "id": "tst_1a2b3c4d5e", "name": "Product Purchase Flow" }, "agent": { "id": "agt_7f8d9e2a1b3c", "name": "e2e-test-agent" }, "configuration": { "timeout": 300, "retry_count": 2, "parallel_steps": true, "screenshot_on_failure": true, "video_recording": true }, "variables": { "USER_EMAIL": "test@example.com", "PRODUCT_SKU": "DEMO-123" } }
{ "error": "invalid_request", "message": "Invalid test_id provided" }
{ "error": "unauthorized", "message": "Invalid API key provided" }
{ "error": "not_found", "message": "Test not found" }
{ "error": "conflict", "message": "Agent is currently executing another test" }