2013-07-29 31 views
2

拉力REST API:Java代碼來獲取用戶故事/的TestCases /缺陷數給定項目

我尋找Java程序給定項目獲取用戶故事,測試案例數量和缺陷總。

我試圖轉儲所有的層次數據 - 並對其進行數據挖掘 - 以構建數據度量 - 但它花費了太多時間 - 我有大量數據(2000個項目,每個項目有3/4千個用戶故事)

是否有任何查詢 - 我可以在一個項目中獲得所需的數據?

請幫忙。

感謝 VG

回答

2

對於每一個項目,每類簡單地做一個頁面大小的查詢和檢查TotalResultCount財產。這會給你匹配記錄的總數,而不實際檢索所有數據。

下面的示例演示如何使用Rally REST Toolkit for Java做到這一點:

RallyRestApi restApi = new RallyRestApi(new URI("https://rally1.rallydev.com"), "[email protected]", "password"); 

//retrieve only 1 
QueryRequest defectCount = new QueryRequest("defect"); 
defects.setPageSize(1); 
defects.setLimit(1); 

//for a specific project 
defectCount.setProject("/project/12345"); 
defectCount.setScopedUp(false); 
defectCount.setScopedDown(false); 

QueryResponse defectCountResponse = restApi.query(defectCount); 
int total = defectCountResponse.getTotalResultCount(); 
相關問題