Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This documentation explains the list of publicly available REST API in synapseRT to perform the products own actions via programmatically.

...

Expand
titleCreate New Test Case with Test Suite

POST: /rest/synapse/latest/public/testSuite/createTestCase

  • If 'testSuitePath' doesn't exist, a new Test Suite will be created by API and then link Test Case to it.
  • If 'TestSuitePath' exists, the Test Case will be linked to the Test Suite directly.

Status
colourBlue
titleRequest

Code Block
languagejs
{
  "fields": 
  {
    "project":
     {"key": "FRS"},
    "summary": "REST API Test Case with Test Suite",
    "description": "This Test Case Is Created from REST API",
    "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"}
  ],
   "linkToTestSuite":
	{
		"testSuitePath": "ROOT Test Suite/Sub Test Suite",
    	"projectKey": "FRS"
	}
}

 

Status
colourBlue
titleResponse

Code Block
languagejs
{
    "testSuitePath": "ROOT Test Suite/Sub Test Suite",
    "projectKey": "FRS",
    "testCaseKey": "FRS-146",
    "createdTestSuiteId": 281,
    "createdTestCase": {
        "id": 16282,
        "key": "FRS-146"
    }
}

 STATUS 200 Returned if the Test Case is successfully created

 STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

 STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

...

Expand
titleLink Existing Test Case/s to Test Suite

POST: /rest/synapse/latest/public/testSuite/linkTestCase

  • If 'testSuitePath' doesn't exist, a new Test Suite will be created by API and then link Test Case/s to it.
  • If 'TestSuitePath' exists, the Test Case/s will be linked to the Test Suite directly.

Status
colourBlue
titleRequest

Code Block
languagejs
{
	"testCaseKeys": ["FRS-14","FRS-15"],
	"testSuitePath": "ROOT Test Suite/Sub Test Suite",
	"projectKey": "FRS"
}

 

Status
colourBlue
titleResponse

 STATUS 200 Returned if the Test Case/s is successfully linked to specified Test Suite

 STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

 STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

...

Expand
titleGet Test Steps from a Test Case

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

Status
colourBlue
titleExample

Code Block
languagejs
[
  {
    "sequenceNumber": "1",
    "id": 1672,
    "step": "Login 'FRS' system valid u/p.",
    "expectedResult": "User logged in successfully.",
    "tcId": 15713
  },
  {
    "sequenceNumber": "2",
    "id": 1673,
    "step": "Choose any ticket and click on 'Purchase' button.",
    "expectedResult": "It redirects to 'Purchase' page.",
    "tcId": 15713
  }
]

 

Status
colourBlue
titleResponse

 STATUS 200 Returned if the Test Steps are successfully retrieved from the Test Case

 STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

 STATUS 404 Returned if the testCaseIssueKey provided is not found

 STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error


Expand
titleGet Time Tracking Information from a Test Case

GET /rest/synapse/latest/public/testCase/{testCaseIssueKey}/timeTracking

Status
colourBlue
titleExample

Code Block
languagejs
{
    "estimate": "10m",
    "forecast": "5m",
    "issueKey": "FRS-15",
    "issueId": "16110"
}

 

Status
colourBlue
titleResponse

 STATUS 200 Returned if the Time Tracking information is successfully retrieved from the Test Case

 STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

 STATUS 404 Returned if the testCaseIssueKey provided is not found

 STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

...