I am in a situation where there are already some testcases associated to a testset and I want to add more testcases to that testset. Looking at WSAPI, I can only add a collection of testcases to a testset. What if I have to add only one more testcase to a testset? Currently, I am re-adding all testcases to the testset in form of a JsonArray? I would prefer a way by which i can simply add one testcase to a testset, adding a collection of testcases to a testset every time can potentially be a risky way.
Any suggestions?
Check out the answer to this question:
How do you remove (unmap) a Test Case from Test Set with Rally REST API?
It's going the opposite direction, i.e. removing rather than adding Test Cases from a Test Set, however, it illustrates the same thing - unfortunately you have to update the entire collection.
Your approach with the JsonArray is correct. You are also correct that this is not without risk - concurrency issues can occur if a Test Case within the collection should change during the update operation on the Test Set.