test-cases

Queue test runs for all test cases on a specific app file

Queue test runs for ALL test cases in your organization on a specific application file.

**Process:**
1. Validates that the requested device exists in the devices table with availability=True
2. Validates that app_file_id belongs to your organization
3. Fetches all active test cases for your organization (optionally filtered by category)
4. Creates test_run records for each test case with 'queued' status
5. Creates job records for the test execution queue

**Category Filtering:**
- Optional: Provide category_id to run only test cases in a specific category
- If category_id is provided, only test cases in that category will be queued
- If no category_id is provided, all active test cases will be queued

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

**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

**Note:**
- If there are no test cases (or no test cases in the specified category), returns empty jobs array
- Only active test cases are included
post/v1/test-cases/run-all

Headers

x-api-keystring

Request body

app_file_idstring required

ID of the uploaded application file to test against all test cases

category_idstring nullable

Optional category ID to filter test cases. If provided, only test cases in this category will be run.

execution_modestring nullable

Execution mode: 'agent' (AI-driven) or 'maestro' (replay cached YAML). Defaults to 'agent'. Tests without cached YAML will automatically fallback to agent mode.

Example request

{
  "app_file_id": "550e8400-e29b-41d4-a716-446655440000",
  "device": {
    "name": "iPhone 14 Pro",
    "platform": "iOS",
    "os_version": "17.0",
    "orientation": "portrait",
    "sms_enabled": true
  },
  "category_id": "770e8400-e29b-41d4-a716-446655440000",
  "execution_mode": "agent"
}

Response

Test runs successfully queued for all test cases

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.