-
Notifications
You must be signed in to change notification settings - Fork 1
Run
When you start a new test run, you can choose to either include all cases of a test suite or select the cases manually. If you include all cases in a test run, new cases that you add to the test suite are also automatically added to the run.
A run consists of individual tests for each case that you add. By default, each test has one of five different statuses that are signaled in TestRail by specific colors.
Once a test run has been completed, you can close it from the run's edit page. Tests of a closed run cannot be edited or changed, making it ideal for archiving test runs. Additionally, if you change any of the associated cases' attributes (such as the expected result), the change won't be applied to the closed and archived run.
Name | Type | Description | Request Methods |
---|---|---|---|
blockedCount | Int | The amount of tests in the test run marked as blocked | getRun, getRuns |
completedOn | Timestamp | The date/time when the test run was closed (as UNIX timestamp) | getRun, getRuns |
config | String | The configuration of the test run as string (if part of a test plan) | getRun, getRuns |
configIds | List<Int> | The array of IDs of the configurations of the test run (if part of a test plan) | getRun, getRuns |
createdBy | Int | The ID of the user who created the test run | getRun, getRuns |
createdOn | Timestamp | The date/time when the test run was created (as UNIX timestamp) | getRun, getRuns |
customStatus1Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
customStatus2Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
customStatus3Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
customStatus4Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
customStatus5Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
customStatus6Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
customStatus7Count | Int | The amount of tests in the test run with the respective custom status | getRun, getRuns |
failedCount | Int | The amount of tests in the test run marked as failed | getRun, getRuns |
id | Int | The unique ID of the test run | getRun, getRuns, updateRun, closeRun, deleteRun |
isCompleted | Boolean | True if the test run was closed and false otherwise | getRun, getRuns |
planId | Int | The ID of the test plan this test run belongs to | getRun, getRuns |
passedCount | Int | The amount of tests in the test run marked as passed | getRun, getRuns |
projectId | Int | The ID of the project this test run belongs to | getRun, getRuns, addRun |
retestCount | Int | The amount of tests in the test run marked as retest | getRun, getRuns |
untestedCount | Int | The amount of tests in the test run marked as untested | getRun, getRuns |
url | String | The address/URL of the test run in the user interface | getRun, getRuns |
suiteId | Int | The ID of the test suite this test run is derived from | getRun, getRuns, addRun |
assignedToId | Int | The ID of the user the entire test run is assigned to | getRun, getRuns, addRun |
name | String | The name of the test run | getRun, getRuns, addRun, updateRun |
description | String | The description of the test run | getRun, getRuns, addRun, updateRun |
milestoneId | Int | The ID of the milestone this test run belongs to | getRun, getRuns, addRun, updateRun |
includeAll | Boolean | True if the test run includes all test cases and false otherwise | getRun, getRuns, addRun, updateRun |
caseIds | List<Int> | An array of case IDs for the custom case selection | addRun, updateRun |
Returns an existing test run. Please see get_tests for the list of included tests in this run.
Name | Type | Description | Required |
---|---|---|---|
runId | Int | The ID of the test run | Yes |
val someRun = Run().getRun(runId = 1)
Returns a list of test runs for a project. Only returns those test runs that are not part of a test plan
Name | Type | Description | Required |
---|---|---|---|
projectId | Int | The ID of the project | Yes |
createdAfter | Timestamp | Only return test runs created after this date (as UNIX timestamp). | No |
createdBefore | Timestamp | Only return test runs created before this date (as UNIX timestamp). | No |
createdBy | List<Int> | A comma-separated list of creators (user IDs) to filter by. | No |
isCompleted | Boolean | True to return completed test runs only. False to return active test runs only. | No |
limit | Int | Limit the result to limit test runs. | No |
offset | Int | Use offset to skip records. | No |
milestoneId | List<Int> | A comma-separated list of milestone IDs to filter by. | No |
suiteId | List<Int> | A comma-separated list of test suite IDs to filter by. | No |
- List<Run>
val someRunList = Run().getRuns(projectId = 1)
Creates a new test run.
val someRun = Run(
name = "Some Run Name",
projectId = 1
)
someRun.addRun()
Updates an existing test run (partial updates are supported, i.e. you can submit and update specific fields only).
val someRun = Run(
name = "Some Updated Run Name",
id = 1
)
Closes an existing test run and archives its tests & results.
val someRun = Run(
id = 1
)
someRun.closeRun()
Deletes an existing test run.
val someRun = Run(
id = 1
)
someRun.deleteRun()