Rally Software

 View Only
  • 1.  How to GET Rally API testcases & defects with one query ?

    Posted 14 days ago
    How to GET Rally API testcases & defects details with one query ?
    Below GET API returns Full testcase Object classes but defects objects are very minimal . Only _ref objects are available for defects. I am looking for Defect name , FormattedID and Owner along with testcase details . Appreciate your help here. Thank you
     https://URL/slm/webservice/v2.0/TestCase?query=(FormattedID = "TCID01")&
    

    fetch=Name,FormattedID,Defects,Description,Objective,Notes,LastRun&order=LastRun desc

    "_rallyAPIMajor": "1", "_rallyAPIMinor": "26", "_ref": "https://rally1.rallydev.com/slm/webservice/1.26/task/9872916743.js", "_refObjectName": "Update XYZ when ABC", "_type": "Task" }


  • 2.  RE: How to GET Rally API testcases & defects with one query ?

    Broadcom Employee
    Posted 13 days ago
    Hi Gopinath,

    There isn't a way in a single WSAPI query to get both test-cases along with the actual details of their associated defects. You will need to execute two queries, one (as you're doing) to get the test-cases, the other to get the details of their defects fetching the defect fields you need.

    The reason you can't combine it to a single query is that Rally's REST API allows posting to a single URL which is associated with a single endpoint (object type). The URL to query a Defect will be: //URL/slm/webservice/v2.0/Defect?  ... ... ...  while for TestCase it is //URL/slm/webservice/v2.0/TestCase? ... ...

    The 'Defects' field that you see in the TestCase object is only a reference to a collection of defects associated to that test-case, it only provides you the count of this collection and a reference (_ref) to bring up this collection in a subsequent query.

    You have two options to get the details of these defects associated to your test-case: Either query the collection URL by its provided reference, or you can query the Defect endpoint with a filter such as: query=(TestCase.FormattedID = "TCID001") , this will get you the same defects. But either way, it will be a separate query of the one looking up the testcase itself.


    I hope this helps. Please let us know.
    Sagi


  • 3.  RE: How to GET Rally API testcases & defects with one query ?

    Posted 13 days ago
    Thank you sagi for the clarity. I aggred with your comments . Going with seperate URL to get the defects details. Thank you once again for your time.


  • 4.  RE: How to GET Rally API testcases & defects with one query ?

    Posted 7 days ago

    Within Rally, you can use test plans to organize and manage test cases. You can represent a test plan with a test folder. When you plan your test effort, use test plans (test folders) to assemble your test cases in a hierarchy of folders, and to view the summarized results of all the tests in a group. When viewing test plans, you can scope your view to a particular project or projects (teams). Your ability to view and edit test plans is dependent upon the user permissions you have been assigned. Test plans are represented by test folders. You can work with test plans on the Test Plans page or the Quality Management page.