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 Test Runs with Run Attribute/s Assigned from an 'Advanced Test Cycle'

POST /rest/synapse/latest/public/testRun/createTestRuns

Note:

  1. If you want to leave 'Urgency' as blank, set value as: null
  2. If you want to leave 'Tester' as 'Unassigned', set value as: Unassigned
  3. If you only have one run attribute created in your project, specify following for "attributeValues": "AttributeName": "AttributeValue", "-": "-"
  4. If there are partial test runs created due to some invalid attribute input, it will still return code 200, succeed records will be listed in response and error for invalid input will also be there.
  5. Urgency’ and 'Tester' is set for run attribute level along with all its test runs, not for each independent test run in the list

Status
colourBlue
titleRequest

Code Block
languagejs
{
    "testCaseKeys": "FRS-14,FRS-15,FRS-16",
    "cycleId": "164",
    "attributeValues": 
    [
        {
            "Instance": "sbus.ins1", "Configuration": "-"
        }, 
        {   
            "Instance": "-", "Configuration": "Inter_Configure_1"
        },
        {
            "Instance": "sbus.ins1", "Configuration": "Inter_Configure_1"
        }
    ],
    "urgencyValue": "High,null,Low",
    "assignValue": "tester,cma,Unassigned",
    "progressKey": "bulkTestRun-Create"
}

Status
colourBlue
titleResponse

 STATUS 200 Returned if the Test Runs are successfully created from the Test Cycle

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

 STATUS 404 Returned if the testCaseKey or cycleId or attributeValues provided is not found

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

...

Expand
titleLink Bug to Test Run

POST /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/cycle/{cycleName}/linkBugToTestRun

Status
colourBlue
titleRequest

Code Block
languagejs
{
	"testcaseKey":"FRS-15",
	"bugs":["FRS-23","FRS-24"]
}

 

Status
colourBlue
titleResponse

 STATUS 200 Returned if the Bug is successfully linked to the Test Run

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

 STATUS 404 Returned if the testPlanIssueKey provided is not found

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


Add

 STATUS 200 Returned if the attachment is successfully added to Test Run

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

 STATUS 404 Returned if the runId provided is not found

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

Expand
titleAdd Attachments Link Bug to Test Run Step
title

POST /rest/synapse/latest/public/attachmenttestRun/{runId}/testrun

Please note that runId doesn't include the prefix 'TR'.

Supported content type: MULTIPART_FORM_DATA

 step/linkBug?tpKey=?&cycleName=?

Example:

POST /rest/synapse/latest/public/testRun/step/linkBug?tpKey=FRS-888&cycleName=Sprint 25 Cycle 1

Status
colourBlue
title
Response
Expand

Request

Case 1:

Code Block
languagejs
{
	"testCaseKey":"FRS-15",
	"stepOrderNumber":"2",
	"bugs":["FRS-33","FRS-36"]
}

Case 2:

Code Block
languagejs
{
	"testCaseKey":"FRS-15",
	"testRunStepId":"10000",
	"bugs":["FRS-33","FRS-36"]
}

Case 3:

Code Block
languagejs
{
	"testCaseKey":"FRS-15",
	"stepOrderNumber":"2",
	"iterationId":"1000",
	"bugs":["FRS-33","FRS-36"]
}

Status
colourBlue
titleResponse

 STATUS 200 Returned if the Bug is successfully linked to the Test Run

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

 STATUS 404 Returned if the testPlanIssueKey provided is not found

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


Expand
titleAdd Attachments to Test Run

POST /rest/synapse/latest/public/attachment/{runId}/testrun

Please note that runId doesn't include the prefix 'TR'.

Supported content type: MULTIPART_FORM_DATA

 

Status
colourBlue
titleResponse

 STATUS 200 Returned if the attachment is successfully added to Test Run

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

 STATUS 404 Returned if the runId provided is not found

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


Expand
titleAdd Attachments to Test Run Step

POST /rest/synapse/latest/public/attachment/{runId}/testrun/step/{stepno}

Please note that runId doesn't include the prefix 'TR'.

Supported content type: MULTIPART_FORM_DATA

 

Status
colourBlue
titleResponse

 STATUS 200 Returned if the attachment is successfully added to Test Run Step

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

 STATUS 404 Returned if the runId provided is not found

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

...

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
titleCreate a Requirement Suite from a Project

POST /rest/synapse/latest/public/requirementSuite/create

Status
colourBlue
titleRequest

Code Block
languagejs
{
   "projectKey": "FRS",
   "suiteName": "Root REQ Suite",
   "parentSuiteId": "0"
}

 

Status
colourBlue
titleResponse

Code Block
languagejs
{
	"projectId": 10500,
	"suiteName": "Root REQ Suite",
	"parentSuiteId": 0,
	"id": 44
}

 STATUS 200 Returned if the Requirement Suite is successfully created

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

 STATUS 404 Returned if the projectKey provided is not found

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

...