我正在使用拉力賽excel加載項並試圖檢索用戶故事和相關測試用例。我在報告「用戶故事」中添加了額外的列以檢索TestCase.Name並嘗試了TestCase.FormattedID。在這兩種情況下,我都會收到空欄。我究竟做錯了什麼? 此外還有一個「測試用例數量」列也總是不返回任何內容。檢索用戶故事及其相關測試用例
2
A
回答
1
這是一個自定義應用程序,它構建用戶故事和相關測試用例的網格。看起來這是你要顯示的數據:
的代碼在this git hub repo可用。您可以將html文件複製/粘貼到自定義頁面中。
Ext.define('CustomApp', {
extend: 'Rally.app.TimeboxScopedApp',
componentCls: 'app',
scopeType: 'iteration',
comboboxConfig: {
fieldLabel: 'Select an Iteration:',
labelWidth: 100,
width: 300
},
onScopeChange: function() {
Ext.create('Rally.data.WsapiDataStore', {
model: 'UserStory',
fetch: ['FormattedID','Name','TestCases'],
pageSize: 100,
autoLoad: true,
filters: [this.getContext().getTimeboxScope().getQueryFilter()],
listeners: {
load: this._onDataLoaded,
scope: this
}
});
},
_onDataLoaded: function(store, data){
var stories = [];
var pendingTestCases = data.length;
Ext.Array.each(data, function(story) {
var s = {
FormattedID: story.get('FormattedID'),
Name: story.get('Name'),
_ref: story.get("_ref"),
TestCaseCount: story.get('TestCases').Count,
TestCases: []
};
var testcases = story.getCollection('TestCases');
testcases.load({
fetch: ['FormattedID'],
callback: function(records, operation, success){
Ext.Array.each(records, function(testcase){
s.TestCases.push({_ref: testcase.get('_ref'),
FormattedID: testcase.get('FormattedID'),
Name: testcase.get('Name')
});
}, this);
--pendingTestCases;
if (pendingTestCases === 0) {
this._createGrid(stories);
}
},
scope: this
});
stories.push(s);
}, this);
} ,
_createGrid: function(stories) {
var myStore = Ext.create('Rally.data.custom.Store', {
data: stories,
pageSize: 100,
});
if (!this.grid) {
this.grid = this.add({
xtype: 'rallygrid',
itemId: 'mygrid',
store: myStore,
columnCfgs: [
{
text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn',
tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
},
{
text: 'Name', dataIndex: 'Name'
},
{
text: 'TestCase Count', dataIndex: 'TestCaseCount'
},
{
text: 'Test Cases', dataIndex: 'TestCases', flex:1,
renderer: function(value) {
var html = [];
Ext.Array.each(value, function(testcase){
html.push('<a href="' + Rally.nav.Manager.getDetailUrl(testcase) + '">' + testcase.FormattedID + '</a>' + ' ' + testcase.Name);
});
return html.join(', ');
}
}
]
});
}else{
this.grid.reconfigure(myStore);
}
}
});
如果希望通過發佈篩選,不迭代,你可以改變的Rally.app.TimeboxScopedApp
Ext.define('CustomApp', {
extend: 'Rally.app.TimeboxScopedApp',
componentCls: 'app',
scopeType: 'release',
comboboxConfig: {
fieldLabel: 'Select a Release:',
labelWidth: 100,
width: 300
},
scopeType
至於Excel加載項,我沒有看到一個用戶故事查詢可用列將顯示與故事相關的測試案例。由於TestCases是WS API中HierarchicalRequirement對象上的一個集合,因此需要單獨查詢以獲取單個測試用例。這就是我在上面的代碼中所做的。
這是我的Excel插件的截圖。有TestCaseStatus,這是預期的,但TestCases集合不包括在內,因爲集合只會返回一個uri。也許您正在使用自定義工具從Rally導出到Excel。
0
使用TestCases.FormattedID,它會給所有鏈接的測試用例用逗號隔開的單細胞。
相關問題
- 1. 檢索與版本相關的測試用例
- 2. 如何添加新的測試用例並將其與用戶故事中已存在的用戶故事相關
- 3. 提取屬於特定用戶故事集的測試用例
- 4. 與發佈相關的用戶故事
- 5. Excel宏導出測試用例以及相關需求Ids
- 6. 無法調用相關測試用例
- 7. 與測試計劃相關的探索性測試案例
- 8. 用戶及相關文章
- 9. 用戶故事vs使用案例
- 10. 維護用戶故事和用例
- 11. 用戶故事和用例場景
- 12. 從用戶故事中生成用例
- 13. C#在項目組中添加測試用例或用戶故事
- 14. 如何使用Rally REST API創建兒童故事並將其與父母用戶故事相關聯?
- 15. 根據條件檢索類別及其相關產品
- 16. 如何檢索LINQ對象及其所有相關信息?
- 17. 用戶故事驗收標準示例
- 18. Scrum用戶故事與功能相同
- 19. 關於JUnit測試用例
- 20. 關於Symfony測試用例
- 21. 使用Java從LDAP檢索所有用戶及其角色
- 22. 混合然後和當在BDD用戶故事/驗收測試
- 23. 爲「精益」用戶故事編寫驗收測試
- 24. Pygame圈及其關聯檢測碰撞檢測
- 25. 關閉其他故事板
- 26. 自動「測試」故事書
- 27. 解析:刪除用戶及其相關記錄
- 28. MySQL搜索用戶及其角色
- 29. MeteorJS:虛擬用戶及其角色做單元測試
- 30. 相關測試
感謝您提供此解決方案。問題:如何擺脫「迭代」下拉菜單,因爲我們實際上是按「釋放」條款操作的。 – stella
另外我發現了另一個解決方案:在Rally中創建報告,然後將其導出爲.csv,然後編寫一些excel宏以正確解析它。您是否知道在應用分組之前是否可以實際下載Rally報告爲純原始數據(在UI上顯示爲Pivot報告)? – stella
您可以將scopeType表單迭代更改爲發佈。我更新了該信息的帖子。獲取「原始數據」的方法是直接查詢WS API,但是如果需要獲取集合的元素,則需要兩個單獨的請求 - 一個用於用戶故事,包括測試用例集合,然後是集合本身。 – nickm