-
Notifications
You must be signed in to change notification settings - Fork 1
Result
The data type for the result of a test execution.
Name | Type | Description | Request Methods |
---|---|---|---|
createdBy | Int | The ID of the user who created the test result | getResults, getResultsForCase, getResultsForRun |
createdOn | Timestamp | The date/time when the test result was created (as UNIX timestamp) | getResults, getResultsForCase, getResultsForRun |
id | Int | The unique ID of the test result | getResults, getResultsForCase, getResultsForRun |
testId | Int | The ID of the test this test result belongs to | getResults, getResultsForCase, getResultsForRun, addResults |
caseId | Int | The ID of the case this test result belongs to | getResultsForCase, addResultForCase, addResultsForCases |
statusId | Int | The status of the test result, e.g. passed or failed | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
comment | String | The comment or error message of the test result | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
version | String | The (build) version the test was executed against | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
elapsed | Timespan | The amount of time it took to execute the test (e.g. "1m" or "2m 30s") | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
defects | String | A comma-separated list of defects linked to the test result | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
assignedToId | Int | The ID of the assignee (user) of the test result | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
customStepResults | String | An array of objects specifying the step results. | getResults, getResultsForCase, getResultsForRun, addResult, addResultForCase, addResults, addResultsForCases |
Returns a list of test results for a test.
Name | Type | Description | Required |
---|---|---|---|
testId | Int | The ID of the test | Yes |
limit | Int | Limit the result to limit test results. | No |
offset | Int | Use offset to skip records. | No |
statusId | List<Int> | A comma-separated list of status IDs to filter by. | No |
- List<Result>
val someResultsList = Result().getResults(testId = 1)
Returns a list of test results for a test run and case combination.
Name | Type | Description | Required |
---|---|---|---|
runId | Int | The ID of the test run | Yes |
caseId | Int | The ID of the test case | Yes |
limit | Int | Limit the result to limit test results. | No |
offset | Int | Use offset to skip records. | No |
statusId | List<Int> | A comma-separated list of status IDs to filter by. | No |
- List<Result>
val someResultsList = Result().getResultsForCase(runId = 1, caseId = 1)
Returns a list of test results for a test run.
Requires TestRail 4.0 or later.
Name | Type | Description | Required |
---|---|---|---|
runId | Int | The ID of the test run | Yes |
createdAfter | Timestamp | Only return test results created after this date (as UNIX timestamp). | No |
createdBefore | Timestamp | Only return test results created before this date (as UNIX timestamp). | No |
createdBy | List<Int> | A comma-separated list of creators (user IDs) to filter by. | No |
limit | Int | Limit the result to limit test results. | No |
offset | Int | Use offset to skip records. | No |
statusId | List<Int> | A comma-separated list of status IDs to filter by. | No |
- List<Result>
val someResultsList = Result().getResultsForRun(runId = 1)
Adds a new test result, comment or assigns a test. It's recommended to use add results instead if you plan to add results for multiple tests.
val someResult = Result(testId = 1, statusId = 1)
someResult.addResult()
Adds a new test result, comment or assigns a test (for a test run and case combination). It's recommended to use add results for cases instead if you plan to add results for multiple test cases.
val someResult = Result(caseId = 1, statusId = 1)
someResult.addResultForCase(runId = 1)
Adds one or more new test results, comments or assigns one or more tests. Ideal for test automation to bulk-add multiple test results in one step.
Requires TestRail 3.1 or later.
- List<Result>
val someResultsList = Result().addResults(runId = 1, Results(
listOf(
Result(testId = 1, statusId = 1)
)
)
)
Adds one or more new test results, comments or assigns one or more tests (using the case IDs). Ideal for test automation to bulk-add multiple test results in one step.
Requires TestRail 3.1 or later.
- List<Result>
val someResultsList = Result().addResultsForCases(runId = 1, Results(
listOf(
Result(caseId = 1, statusId = 1)
)
)
)