リリースに関連するテスト ケースを取得する方法。
リリースに関連するテスト ケースに関するデータを取得したいと考えています。しかし、テスト ケースにはリリース ファイルがありません。ところで、テスト ケースには、このテスト ケースが作成された WorkProduct があります。しかし、テスト ケース オブジェクトから WorkProdut を取得しようとすると、米国名以外に有用な情報がありません。実際には、この名前を使用して正当な米国オブジェクトを取得できます。
でも難しそうですね…
TestCases は、TestSets を介して Iterations と Releases にスケジュールされます。この github リポジトリには、リリースが予定されているストーリーのグリッド、リリースが予定されているテストセット、および関連するテストケースを構築するアプリがあります。
以下は、TestSet オブジェクトが TestCases コレクションとともに読み込まれ、次に TestCases コレクションがハイドレートされるコード フラグメントです (これは単一の要求では実行できないため)。
_makeAnotherStore: function(){
Ext.create('Rally.data.WsapiDataStore', {
model: 'TestSet',
fetch: ['FormattedID', 'TestCases', 'TestCaseStatus'],
pageSize: 100,
autoLoad: true,
filters: [this.getContext().getTimeboxScope().getQueryFilter()],
listeners: {
load: this._onTestSetsLoaded,
scope: this
}
});
},
_onTestSetsLoaded: function(store, data){
console.log('store...',store);
console.log('data...',data);
var testSets = [];
var pendingTestCases = data.length;
console.log(data.length);
if (data.length ===0) {
this._createTestSetGrid(testSets);
}
Ext.Array.each(data, function(testset){
var ts = {
FormattedID: testset.get('FormattedID'),
_ref: testset.get('_ref'),
TestCaseStatus: testset.get('TestCaseStatus'),
TestCaseCount: testset.get('TestCases').Count,
TestCases: []
};
var testCases = testset.getCollection('TestCases');
testCases.load({
fetch: ['FormattedID'],
callback: function(records, operation, success){
Ext.Array.each(records, function(testcase){
ts.TestCases.push({_ref: testcase.get('_ref'),
FormattedID: testcase.get('FormattedID')
});
}, this);
--pendingTestCases;
if (pendingTestCases === 0) {
this._createTestSetGrid(testSets);
}
},
scope: this
});
testSets.push(ts);
},this);
}
、