2013-10-02 2 views
0

특정 릴리스와 관련된 테스트 세트의 모든 테스트 케이스를 표시하기 위해 Rally custom html을 찾고 있습니다. 각 테스트 케이스와 함께 최신 결과가 표시되어야하지만 지정된 릴리스와 관련된 테스트 세트의 결과 만 표시해야합니다. 테스트 케이스가 릴리즈와 관련된 테스트 세트에 아무런 결과도없는 경우, 테스트 케이스는 여전히 나열되어 결과가없는 것으로 표시되어야합니다.릴리스와 관련된 테스트 세트에 모든 테스트 케이스를 표시하는 사용자 정의 html

우리는 릴리스를 병렬로 실행하기 때문에 릴리스와 관련된 테스트 세트 및/또는 결과를 식별하는 방법으로 릴리스 시작일 및 종료일에 해당하는 반복 날짜를 사용할 수 없습니다. Rally의 RQM 툴킷 예제의 일부입니다.

"Track - Release Status"를 수행하고 Test Cases를 클릭하면 너무 많은 클릭이 발생하지만 테스트 세트는 이야기 및 결함 목록을 통해 많은 페이지를 볼 수 있으며 높은 수준의 대시 보드.

도움을 주시면 감사하겠습니다.

감사합니다,

앤디 여기

답변

0

는 시작 수있는 예이다. 이 AppSDK2 앱은 릴리스별로 필터링 된 스토리 및 테스트 세트라는 두 개의 그리드를 만듭니다. Test Set gird는 관련 테스트 케이스 및 테스트 케이스 상태를 표시합니다. Rally에서 html 소스 코드를 사용자 정의 페이지의 HTML 섹션에 복사 할 수 있습니다. js 소스 파일은이 GitHub repo에 있습니다.

enter image description here

<!DOCTYPE html> 
    <html> 
    <head> 
     <title>Stories and TestSets by Release</title> 
     <script type="text/javascript" src="/apps/2.0rc1/sdk.js"></script> 
     <script type="text/javascript"> 
      Rally.onReady(function() { 
       Ext.define('CustomApp', { 
        extend: 'Rally.app.TimeboxScopedApp', 
        componentCls: 'app', 
        scopeType: 'release', 

        addContent: function() { 
         var panel = Ext.create('Ext.panel.Panel', { 
          width: 1200, 
          layout: 'column', 
          itemId: 'parentPanel', 
          componentCls: 'panel', 
          items: [ 
           { 
            xtype: 'panel', 
            title: 'Stories', 
            itemId: 'childPanel1', 
            columnWidth: 0.3 
           }, 
           { 
            xtype: 'panel', 
            title: 'Test Sets with Test Cases', 
            itemId: 'childPanel2', 
            columnWidth: 0.7 
           } 
          ] 
         }); 
         this.add(panel); 
         this._makeStore(); 
        }, 

        onScopeChange: function() { 
         console.log('onScopeChange'); 
         this._makeStore(); 
        }, 

        _makeStore: function(){ 
         var storyStore = Ext.create('Rally.data.WsapiDataStore', { 
          model: 'UserStory', 
          fetch: ['FormattedID','Name'], 
          pageSize: 100, 
          autoLoad: true, 
          filters: [this.getContext().getTimeboxScope().getQueryFilter()], 
          listeners: { 
           load: this._onStoriesLoaded, 
           scope: this 
          } 
         }); 
        }, 

         _onStoriesLoaded: function(store, data){ 
           var userStories = []; 
           Ext.Array.each(data, function(story) { 
            var s = { 
             FormattedID: story.get('FormattedID'), 
             _ref: story.get("_ref"), 
             Name: story.get('Name'), 
            }; 
            userStories.push(s); 
           }); 
           this._createStoryGrid(userStories); 
        }, 
        _createStoryGrid:function(stories){ 
         var that = this; 
         var storyStore = Ext.create('Rally.data.custom.Store', { 
           data: stories, 
           pageSize: 100 
          }); 
         if (!this.down('#storygrid')) { 
          this.down('#childPanel1').grid = this.down('#childPanel1').add({ 
          xtype: 'rallygrid', 
          itemId: 'storygrid', 
          store: storyStore, 
          columnCfgs: [ 
           { 
            text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn', 
            tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate') 
           }, 
           { 
            text: 'Name', dataIndex: 'Name',flex:2 
           } 
          ], 
          listeners: { 
           render: this._makeAnotherStore, 
           scope: this 
          } 
         }); 
         }else{ 
          this.down('#childPanel1').grid.reconfigure(storyStore); 
          this._makeAnotherStore(this); 
         } 
        }, 

        _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){ 
         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); 
       }, 

         _createTestSetGrid: function(testsets) { 
         var testSetStore = Ext.create('Rally.data.custom.Store', { 
           data: testsets, 
           pageSize: 100, 
          }); 
         if (!this.down('#testsetgrid')) { 
         this.down('#childPanel2').grid = this.down('#childPanel2').add({ 
          xtype: 'rallygrid', 
          itemId: 'testsetgrid', 
          store: testSetStore, 
          columnCfgs: [ 
           { 
            text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn', 
            tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate') 
           }, 
           { 
            text: 'Test Case Count', dataIndex: 'TestCaseCount', 
           }, 
           { 
            text: 'Test Case Status', dataIndex: 'TestCaseStatus',flex:1 
           }, 
           { 
            text: 'TestCases', 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>') 
             }); 
             return html.join(', '); 
            } 
           } 
          ] 
         }); 
         }else{ 
          this.down('#childPanel2').grid.reconfigure(testSetStore); 
         } 
        } 
    }); 

       Rally.launchApp('CustomApp', { 
        name:"Stories and TestSets by Release", 
        //parentRepos:"" 
       }); 

      }); 
     </script> 

     <style type="text/css"> 
    .app { 
     /* Add app styles here */ 
    } 

    .panel{ 
     left: 15% 
    } 

     </style> 

    </head> 
    <body></body> 
    </html>