AnsweredAssumed Answered

In Rally, Using Java REST API, How to get the complete list of test cases present in all sub-folders of a TestPlan folder?

Question asked by ganma05 Employee on Jul 5, 2018
Latest reply on Jul 25, 2018 by Michael Bulkeley

In query filter, i have tried with FormattedID, TestFolder.Parent.Name, TestFolder.Name. But could not get the test cases of all sub folders.

Here TestFolderID can be a TestPlan folder name OR any parent folder with subfolders.

With below code, I am getting only the test cases directly present in the folder, but not from all subfolders of a given folder name. 


QueryRequest queryRequest = new QueryRequest("TestCases");            
queryRequest.setFetch(new Fetch(new String[] {"Name", "TestCases","FormattedID","TestFolder"}));             
queryRequest.setQueryFilter(new QueryFilter("TestFolder.Parent.Name", "=",  TestFolderID) );             
QueryResponse queryResponse = null;            
JsonArray jsonarr = new JsonArray();            
queryResponse = restApi.get().query(queryRequest);            
int responseTotalResultsCount = queryResponse.getTotalResultCount