Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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

 Create New Test Case with Test Steps without Test Suite

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"}
  ]
}
 Create New Test Case with Test Steps with Test Suite

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"
  }
}
 Add Test Steps to a Test Case

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 Test Steps from a Test Case

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

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

REQUEST BODY NULL

 Update a Test Step from Test Case with Step ID

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" 
}
 Update a Test Step from Test Case with Step sequenceNumber

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 a Test Step from Test Case with Step ID

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

 Create Ad Hoc Test Run from a Test Case

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 Ad Hoc Test Run Details from a Test Case

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 All Linked Requirements from a Test Case

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 Requirement Associations from a Test Case

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 Defects Reported from a Test Case

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 Test Suite Information from a Test Case

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 Test Plan Information from a Test Case

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

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

REQUEST BODY NULL

 Link a Test Case to a Test Suite

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 Test Suite Information from a Test Case

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"]
}
  • No labels