Updating the Results of a Test Run of a Test Case
Finding the test runs generated for a test case
If you generate a test run for a test case, two test runs will be created, one visible and one hidden, to store the results.
Use the following endpoint to find the hidden item. The hidden item is needed to update the results we need.
URL
POST /v2/item
Request Body Example
{
"page": 1,
"pageSize": 25,
"queryString": "referenceToId ={testCaseItemId} AND description LIKE '%TEST_CASE_INDEX%'"
}
Response Body Example
{
"page": 1,
"pageSize": 25,
"total": 1,
"items": [
{
"id": 1142,
"uri": "/item/1142",
"name": "Run of My first Test Case",
"type": "TrackerItem",
"parent": {
"id": 1141,
"uri": "/item/1141",
"name": "Quick Test Run for My first Test Case at Aug 22 2019",
"type": "TrackerItemReferenceField"
},
"version": 1,
"description": "//TEST_CASE_INDEX:0",
"descriptionFormat": "Wiki",
...
"customFields": [
{
"fieldId": 10000,
"uri": "/tracker/6606/field/10000",
"name": "Sequential",
"type": "BoolCustomFieldReference",
"value": false
},
{
"fieldId": 1000000,
"uri": "/tracker/6606/field/1000000",
"name": "Test Cases",
"type": "TableCustomFieldReference",
"values": [
[
{
"fieldId": 1000001,
"uri": "/tracker/6606/field/1000001",
"name": "Test Case",
"type": "ChoiceCustomFieldReference",
"values": [
{
"id": 1135,
"uri": "/item/1135",
"name": "My first Test Case",
"type": "TrackerItemReference"
}
]
}
]
]
},
{
"fieldId": 10002,
"uri": "/tracker/6606/field/10002",
"name": "Run only Accepted TestCases",
"type": "BoolCustomFieldReference",
"value": false
},
{
"fieldId": 2000000,
"uri": "/tracker/6606/field/2000000",
"name": "Test Step Results",
"type": "TableCustomFieldReference",
"values": [
[
{
"fieldId": 2000001,
"uri": "/tracker/6606/field/2000001",
"name": "Action",
"type": "WikiTextCustomFieldReference",
"value": "First action"
},
{
"fieldId": 2000002,
"uri": "/tracker/6606/field/2000002",
"name": "Expected result",
"type": "WikiTextCustomFieldReference",
"value": "First expected result"
},
{
"fieldId": 2000003,
"uri": "/tracker/6606/field/2000003",
"name": "Critical",
"type": "BoolCustomFieldReference",
"value": false
}
],
[
{
"fieldId": 2000001,
"uri": "/tracker/6606/field/2000001",
"name": "Action",
"type": "WikiTextCustomFieldReference",
"value": "Second action"
},
{
"fieldId": 2000002,
"uri": "/tracker/6606/field/2000002",
"name": "Expected result",
"type": "WikiTextCustomFieldReference",
"value": "Second expected result"
},
{
"fieldId": 2000003,
"uri": "/tracker/6606/field/2000003",
"name": "Critical",
"type": "BoolCustomFieldReference",
"value": false
}
]
]
}
],
...
}
]
}
Update the test step results
After finding the item, update the table field which contains the actual results and update the status of the test run.
URL
PUT /v2/item/{hiddenTestRunId}/field
Request Body Example
{
"fieldValues": [
{
"fieldId": 7, // Updating the status
"type": "SingleOptionChoiceFieldValue",
"value": 4 // to Finished
}
],
"tableValues": [
{
"fieldId": 2000000, // Table field containing the actual results
"type": "TrackerItemTableFieldValue",
"rows": [
{
"fieldValues": [
{
"fieldId": 2000001, // Action of the test step
"type": "WikiTextFieldValue",
"value": "Brake with semi-metallic brake pads"
},
{
"fieldId": 2000002, // Expected result of the test step
"type": "WikiTextFieldValue",
"value": "The car brake pads work fine and the car stops"
},
{
"fieldId": 2000003, // Criticality of the test step
"type": "BoolFieldValue",
"value": false
},
{
"fieldId": 2000004, // Actual result of the test step
"type": "WikiTextFieldValue",
"value": "The car brake pads work fine and the car stops"
},
{
"fieldId": 2000005, // Result of the test step
"type": "TextFieldValue",
"value": "PASSED"
}
]
},
{
"fieldValues": [
{
"fieldId": 2000001,
"type": "WikiTextFieldValue",
"value": "1"
},
{
"fieldId": 2000002,
"type": "WikiTextFieldValue",
"value": "1"
},
{
"fieldId": 2000003,
"type": "BoolFieldValue",
"value": false
},
{
"fieldId": 2000004,
"type": "WikiTextFieldValue",
"value": "1"
},
{
"fieldId": 2000005,
"type": "TextFieldValue",
"value": "PASSED"
}
]
}
]
}
]
}
* 
Provide all the information as table fields are considered as one value. If you only provide the fields which you want to change, it would mean that you want to delete the rest.
Was this helpful?