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"]
}