How to create a TestSet in Orchestrator using Swagger APIs using POST Method?

Hi ,

How to create a TestSet in Orchestrator using Swagger APIs using POST Method?
I need JSON Payload for request body .

Use the Inspect tool from your browser and notice the POST call and analyze it.

Example:

URL: https://cloud.uipath.com/marianplatonov/DefaultTenant/orchestrator_/odata/TestSets
Method: POST
Headers:

Authorization: Bearer + access_token
X-UiPath-Organizationunitid: FOLDER_ID
Content-Type: application/json
Accept: application/json

Body of type JSON:

{"Name":"TestSet1","Description":"TestSet1_description","Packages":[{"PackageIdentifier":"TestAutomationProject1","VersionMask":"1.0.*","IncludePrerelease":true}],"TestCases":[{"DefinitionId":34215,"ReleaseId":661512,"VersionNumber":"1.0.114285370","Enabled":true}],"InputArguments":[],"RobotId":994169,"EnableCoverage":true}
1 Like

Hi @SHAIK_HUSSAIN

Can you try this JSON Payload-

{
“Name”: “TestSet Name”,
“Description”: “TestSet Description”,
“ReleaseId”: 12345,
“EnvironmentId”: 54321,
“Priority”: “High”,
“CreationTime”: “2023-05-18T10:00:00Z”,
“StartTime”: “2023-05-19T09:00:00Z”,
“EndTime”: “2023-05-19T17:00:00Z”,
“JobsCount”: 10,
“Source”: “Manual”,
“SourceParameters”: {
“Param1”: “Value1”,
“Param2”: “Value2”
}
}

Thanks!!

1 Like

How can i add test cases to it while creating the test set?

This is what I used:
{
“Name”: “demo”,
“Packages”: [
{
“VersionMask”: “1.0.*”,
“PackageIdentifier”: “<package_name>”
}
],
“TestCases”: [
{
“DefinitionId”: 12345,
“ReleaseId”: 54321,
“VersionNumber”: “”
}
]
}