Rally Software

  • 1.  Updating test sets with test cases via wsapi

    Posted Nov 30, 2018 05:02 AM

    Hi there, I am trying to add test cases to newly created test sets via the wsapi. I am able to create the test set and I can update the test set with one test case, when I try to add the second test case the first test case is removed and the second test case is added. Is there a way to add multiple test cases to a test set via the wsapi?



  • 2.  Re: Updating test sets with test cases via wsapi
    Best Answer

    Broadcom Employee
    Posted Nov 30, 2018 03:34 PM

    Hi Brett,

     

    Yes, you can create a Test Set with and associate with multiple Test Cases in a single WSAPI call. Here is an example:

     

    {
        "TestSet": {
             "Name":"Creating a TestSet with multiple TestCases",
             "TestCases": [
                      { "_ref": "/testcase/<The objectID of that test case>" },
                      { "_ref": "/testcase/<The objectID of that test case>" }
             ]
        }
    }

     

    Surely, you can include more fields to your Test Set definition than 'Name' which is in the above example.

     

    Please let us know if that helped.

     

    Thanks,

    Sagi



  • 3.  Re: Updating test sets with test cases via wsapi

    Posted Dec 03, 2018 04:11 AM

    Hi Sagi,

     

    Thank you thats excellent, I can now get multiple test cases  added. I was using "TestCase" instead of "_ref" for the individual test cases.

     

    Much appreciated.

     

    Kind Regards

    Brett