Loading test cases to a User Story in Rally using the API randomly drops test cases
This was caused by the script attaching the test cases one at a time. This caused concurrency issues when the post before hadn't finished before the next post began.
https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement/<UserStoryObjectID>/testcases/add?fetch=Name
Body:
{
"CollectionItems": [
{
"Name": "New Test Case 4"
},
{
"Name": "New Test Case 5"
},
{
"Name": "New Test Case 6"
},
{
"Name": "New Test Case 7"
},
{
"Name": "New Test Case 8"
},
{
"Name": "New Test Case 9"
},
{
"Name": "New Test Case 10"
},
{
"Name": "New Test Case 11"
}
]
}