Below are the list of REST APIs we developed related to test run.
Get Test Run Details
get /rest/testray/latest/public/testRun/{testRunID}
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/60000
REQUEST body NULL
Update Test Run Result
PUT /rest/testray/latest/public/testRun/update
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/update
REQUEST body
{
"runId":60000,
"result": "Failed",
"comment": "REST API Comment",
"bugs":["TPB-1278", "TPB-1279"],
"testRunFields":
{
"Run Field 1":["Run Field 1 - Value 1", "Run Field 1 - Value 2"],
"Run Field 2":["Run Field 2 - Value 1", "Run Field 2 - Value 2"]
},
"executorId": "5f115539e5efc1001bbd5051"
}
Update Test Step Result from a Test Run
PUT /rest/testray/latest/public/testRun/updateStep
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/updateStep
REQUEST body
{
"runStepId": 392720,
"result": "Passed",
"actualResult": "REST API Updated Actual Result, Step 1",
"bugs":["TPB-1212"],
"executorId": "5f115539e5efc1001bbd5051"
}
Update Multiple Test Run Results
post /rest/testray/latest/public/testPlan/{testPlanIssueKey}/bulkStatusUpdate
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testPlan/TAT-200/bulkStatusUpdate
REQUEST body
{
"testCycleId":600,
"status":"Passed",
"runIds":[60000,60001]
}
Link Bug/s to a Test Run
post /rest/testray/latest/public/testPlan/{testPlanIssueKey}/cycle/{testCycleID}/linkBugToTestRun
REQUEST body
{
"testCaseKey":"TAT-1000",
"bugs":["TAT-1212"]
}
Add Attachment to a Test Run
post /rest/testray/latest/public/testRun/attachment/{testRunID}/testrun
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/attachment/60000/testrun
REQUEST body
supported content type MULTIPART_FORM_DATA
Note Make sure to include key named "files" and of type "File" to select the files
Add Attachment to a Test Run Step
post /rest/testray/latest/public/testRun/attachment/{testRunID}/testrun/step/{testRunStepID}
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/attachment/60000/testrun/step/100000
REQUEST body
supported content type MULTIPART_FORM_DATA
Note Make sure to include key named "files" and of type "File" to select the files
Get Attachment Details from a Test Run
get /rest/testray/latest/public/testRun/{testRunID}/getAttachmentDetails
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/60000/getAttachmentDetails
REQUEST body NULL
Delete Attachment from a Test Run
delete /rest/testray/latest/public/testRun/{testRunID}/deleteAttachment/{attachmentID}
SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/60000/deleteAttachment/500
REQUEST body NULL