Create or update test run
qase_run_upsertCreate or update a Qase test run to serve as the container for recording test results; supply a run ID to update an existing run or omit it to open a new one.
Instructions
Create or update a test run. Without id it opens a new run; with id it updates that one. A run is the container results are recorded into, so open it before calling qase_result_record. Optionally scope it to a milestone, an environment, a plan, or an explicit list of case IDs. To build a run from a suite or plan without listing cases yourself, use qase_regression_run. For a CI job that has already finished, use qase_ci_report instead — it opens the run, files the results and closes it in one call, so no half-finished run is left behind. Cost: one API call, about 0.5s.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Run ID — if provided, this is an update (note: Qase API has limited run update support) | |
| code | Yes | Project code (2-10 uppercase letters, numbers, or underscores) | |
| tags | No | Tag names, e.g. ["nightly", "smoke"] | |
| cases | No | Case IDs to include | |
| title | Yes | Run title | |
| plan_id | No | Test plan to base run on | |
| end_time | No | RFC3339 end time | |
| start_time | No | RFC3339 start time | |
| description | No | What this run covers | |
| is_autotest | No | True when the run is produced by automation rather than a person | |
| custom_field | No | Custom field values keyed by field ID, e.g. { "12": "value" } | |
| milestone_id | No | ID of the milestone the run belongs to | |
| environment_id | No | ID of the environment the run executes against |