test-cases

Queue test runs for execution

Queue one or more test runs for execution on specified or auto-selected devices.

**Smart Defaults:**
- Specify `platform` (ios/android) to auto-select the most recent app file and default device
- Or provide explicit `app_file_id` and/or `device` configuration
- Platform is required if app_file_id or device is not specified

**Device / SIM:**
- Optional `device.sms_enabled` (true/false): set when the user picks an SMS-enabled device (e.g. from GET /v1/devices).
- Optional `use_sim` (true/false): use simulator/SIM for SMS; if omitted, derived from `device.sms_enabled`.

**Limits:**
- Minimum: 1 job per request

**Process:**
1. Validates that the requested device exists in the devices table with availability=True
2. Validates that test_case_id and app_file_id belong to your organization
3. Creates test_run records with 'queued' status
4. Creates job records for the test execution queue

**Returns:**
- Links to view each test run at https://app.qualgent.ai/test-runs/{id}

**Transaction Handling:**
- If any job fails, all jobs in the batch are rolled back
- Ensures data consistency across test_runs and test_jobs_pgqueuer tables
post/v1/test-cases/run

Headers

x-api-keystring

Request body

Example request

{
  "jobs": [
    {
      "app_file_id": "550e8400-e29b-41d4-a716-446655440000",
      "device": {
        "name": "iPhone 14 Pro",
        "orientation": "portrait",
        "os_version": "17.0",
        "platform": "iOS",
        "sms_enabled": true
      },
      "test_case_id": "660e8400-e29b-41d4-a716-446655440000",
      "use_sim": true
    }
  ]
}

Response

Test runs successfully queued

successboolean required

Whether the operation succeeded

Example response

{
  "success": true,
  "jobs": [
    {
      "link": "https://app.qualgent.ai/test-runs/123"
    }
  ],
  "warnings": [
    {
      "code": "undeclared_reference"
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.