0

我是 Rally 的新用户。我们的项目有一堆测试用例,它们有标签。我想为每个标签创建测试文件夹,从而使我能够通过从每个标签中选择某些测试用例来为任何迭代创建测试计划团体。有什么简单的方法可以解决这个问题吗?

4

1 回答 1

0

MarkW 有一个应用程序(在这个 github repo中),它使用标签选择器并构建一个按标签过滤的缺陷网格。我通过将工作项更改为 TestCase 来扩展这个应用程序,并添加了一个功能来创建以选定标签命名的测试文件夹。您可以在此处的 github 存储库中看到完整的代码。

这是一种在确保尚不存在同名文件夹后创建测试文件夹的方法:

_createTestFolders: function(){
        var me = this;
        console.log(me._existingFoldersNames);
        Rally.data.ModelFactory.getModel({
            type: 'TestFolder',
            success: function(model) {  
                _.each(me._tagNames, function(tagName){
                    var exists = _.find(me._existingFoldersNames, function(existingName){return tagName === existingName});
                        if (exists === undefined) {
                            var folder = Ext.create(model, {
                                Name: tagName
                            });
                            folder.save({
                                callback: function(result, operation) {
                                    if(operation.wasSuccessful()) {
                                        console.log("Created TestFolder: _ref",result.get('_ref'), ' ', result.get('Name'));
                                    }
                                    else{
                                        console.log("error");
                                    }
                                }
                            });
                        }

                });
            }
        });
    }
于 2014-04-01T21:33:57.280 回答