테스트 케이스는 TestSets를 통해 반복 및 자료에 예정 얻을. 나는 릴리스 용으로 계획된 스토리 그리드와 릴리스 및 관련 테스트 케이스 용 테스트 세트를 빌드하는 this github repo의 앱을 보유하고 있습니다.
_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);
}
,
을 (이는 하나의 요청으로 수행 할 수 없기 때문에) 여기서
는 테스트 세트 오브젝트가 그들의 테스트 케이스 컬렉션,로드 된 코드 단편하고 테스트 케이스 컬렉션 수화