Test Case Resource
- Cheney Ma
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