How to create a Test Set using the Rally Batch endpoint
search cancel

How to create a Test Set using the Rally Batch endpoint

book

Article ID: 277294

calendar_today

Updated On:

Products

CA Agile Central SaaS (Rally)

Issue/Introduction

I am commenting on the problem that a user has when using the API:

I am having problems with the request https://rally1.rallydev.com/slm/webservice/v2.x/batch which gives me the error "org.test.web.client.HttpServerErrorException: 500 Internal Server Error", I have executed the URL with and without parameters, I have reviewed the code but it works for requests that are not mass dumps such as the creation of TestFolders, testcases, steps and testsets. 

Resolution

Below is a successful creation of a Test Set using the Batch Endpoint:

Urlhttps://rally1.rallydev.com/slm/webservice/v2.0/batch

Headers:

ZSESSIONID: <APIKey>
JSESSIONID: <SECURITY_TOKEN>
Content-Type: application/json

 

Body:

{
"Batch":[
{
"Entry":{
"Path":"/testset/create",
"Method":"post",
"Body":{
"testset":{
"Owner":{
"_ref":"/user/<USER_OBJECTID>"
},
"Project":{
"_ref":"/project/<PROJECT_OBJECTID>"
},
"DisplayColor":"#848689",
"ScheduleState":"Active",
"Name":"ANOTHER TEST FOR BATCH ENDPOINT"
}
}
}
}]
}

 

If you continue to have problems, try this in a tool like Postman with the same Rally Userid that is being used in the script. This will serve as a Proof of Concept. I would start with a very basic post and then add your other fields.