/
Test Case Resource

Test Case Resource

Below are the list of REST APIs we developed related to test case

POST /rest/testray/latest/public/testCase/create/createTestCase

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/create/createTestCase

REQUEST body

{ "fields": { "project": {"key": "TAT"}, "summary": "[API] Test Case 1 without Test Suite information", "description": "This Test Case Is Created from REST API, [API] Test Case 1", "issueType": {"name": "Test Case"} }, "testCaseSteps": [ {"step":"It is the first Test Step", "stepData": "It is Test Data for the first Test Step", "expectedResult":"It is the Expected Result for the first Test Step"}, {"step":"It is the second Test Step", "stepData": "It is Test Data for the second Test Step", "expectedResult":"It is the Expected Result for the second Test Step"} ] }

POST /rest/testray/latest/public/testSuite/createTestCase

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testSuite/createTestCase

REQUEST body

{ "fields": { "project": {"key": "TAT"}, "summary": "[API] Test Case 2 with Test Suite information", "description": "This Test Case Is Created from REST API, [API] Test Case 1", "issueType": {"name": "Test Case"} }, "testCaseSteps": [ {"step": "It is the first Test Step", "stepData": "It is Test Data for the first Test Step", "expectedResult": "It is the Expected Result for the first Test Step"}, {"step": "It is the second Test Step", "stepData": "It is Test Data for the second Test Step", "expectedResult": "It is the Expected Result for the second Test Step"}, {"step": "It is the third Test Step", "stepData": "It is Test Data for the third Test Step", "expectedResult": "It is the Expected Result for the third Test Step"} ], "linkToTestSuite": { "testSuitePath": "TAT Test Suite 1/API Sub Suite 1/API Sub Suite 1-1", "projectKey": "TAT" } }

POST /rest/testray/latest/public/testCase/{testCaseIssueKey}/addSteps

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-1/addSteps

REQUEST body

[ { "step":"1st additional test step added via REST API", "stepData": "1st additional test data added via REST API", "expectedResult":"1st additional expected result added via REST API" }, { "step":"2nd additional test step added via REST API", "stepData": "", "expectedResult":"2nd additional expected result added via REST API" } ]

GET /rest/testray/latest/public/testCase/{testCaseIssueKey}/steps

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-1/steps

REQUEST body NULL

Put /rest/testray/latest/public/testCase/{testCaseIssueKey}/updateStep

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-1/updateStep

REQUEST body

{ "ID":"112233", "step":"Update Step XXX", "stepData":"Update Test Data ZZZ", "expectedResult":"Update Expected Result YYY" }

Put /rest/testray/latest/public/testCase/{testCaseIssueKey}/updateStep

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-1/updateStep

REQUEST body

{ "sequenceNumber":"3", "step":"Step 3 Updated", "stepData":"Test Data 3 Updated", "expectedResult":"Expected Result 3 Updated" }

Delete /rest/testray/latest/public/testCase/{testCaseIssueKey}/deleteStep/{testStepID}

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-1/deleteStep/133242

REQUEST body NULL

Put /rest/testray/latest/public/testRun/adhoc/create/{testCaseIssueKey}

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/adhoc/create/TAT-1

REQUEST body NULL

get /rest/testray/latest/public/testRun/adhoc/getTestRuns/{testCaseIssueKey}

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testRun/adhoc/getTestRuns/TAT-1

REQUEST body NULL

get /rest/testray/latest/public/testCase/{testCaseIssueKey}/linkedRequirements

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-110/linkedRequirements

REQUEST body NULL

delete /rest/testray/latest/public/testCase/{testCaseIssueKey}/deleteLinkedRequirements

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-110/deleteLinkedRequirements

REQUEST body

{ "requirementKeys":["TAT-100"] }

get /rest/testray/latest/public/testCase/{testCaseIssueKey}/getDefects

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-110/getDefects

REQUEST body NULL

get /rest/testray/latest/public/testCase/{testCaseIssueKey}/linkedTestSuites

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-110/linkedTestSuites

REQUEST body NULL

get /rest/testray/latest/public/testCase/{testCaseIssueKey}/linkedTestPlans

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testCase/TAT-100/linkedTestPlans

REQUEST body NULL

POST /rest/testray/latest/public/testSuite/linkTestCase

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testSuite/linkTestCase

REQUEST body

{ "testCaseKeys": ["TAT-1", "TAT-2"], "testSuitePath": "TAT Test Suite 1/API Sub Suite 1/API Sub Suite 1-1", "projectKey": "TAT" }

delete /rest/testray/latest/public/testSuite/{projectKey}/removeTestSuiteMember

SAMPLE http://testray.goldfingerholdings.onl/rest/testray/latest/public/testSuite/TAT/removeTestSuiteMember

REQUEST body

{ "testSuitePath": "TAT Test Suite 1/API Sub Suite 1/API Sub Suite 1-1", "testCaseKeys": ["TAT-1", "TAT-2"] }

Related content