问题描述
您好
如果有人有想法请分享。
If someone has some ideas please share.
我在迁移TFS到VSTS时遇到问题,需要基于必需旧TFS中的测试套件有些套件与Bug有关,而在VSTS中则不允许,我的意思是选择"Microsoft.RequirementCategory"。作为仅包括
PBI的字段类别。接口很容易只需更改套件中的查询,创建并与bug相关,但ITestSuiteHelper类只有1个方法用于创建基于需求的测试套件 - IRequirementTestSuite CreateRequirement(WorkItem requirementWorkItem)。 RequirementTestSuite
类本身是内部的,因此无法创建实例。有没有人知道其他方法来创建RequirementTestSuite实例?
I have a problem during migration TFS to VSTS with Required-based test suites in old TFS some of suites were related with Bug whereas in VSTS its not allowed I mean if choose "Microsoft.RequirementCategory" as field category which include only PBI. It seams to be easy just change the query in suite, create and relate to a bug but ITestSuiteHelper class only has 1 method for create Requirement-based Test suite - IRequirementTestSuite CreateRequirement(WorkItem requirementWorkItem). RequirementTestSuite class itself is internal, so no way to create an instance. Does anyone know other ways to create RequirementTestSuite instance?
我尝试创建与bug相关的测试套件时得到的异常:
The exception i am getting when try to create test suite related to bug:
以下工作项类型无效:错误。您必须指定属于具有引用名称Microsoft.RequirementCategory的类别的有效工作项类型。
推荐答案
您可以使用
TFS REST API ,用于创建与bug相关的测试套件(在
" requirementIds" 中输入错误ID ):
You can use TFS REST API to create the test suite related to bug (type a bug id in "requirementIds"):
POST https:// {instance} / DefaultCollection / {project} / _apis / test / plans / {plan} / suites / {parent}?api-version = {version}
内容类型 :application / json
{
" suiteType" : " RequirementTestSuite" ,
" requirementIds" :[
x
] b
}
我已经过测试就我而言,它适用于错误ID。
I've tested on my side, it works with a bug id.
祝你好运,
这篇关于通过API创建与Bug相关的基于需求的测试套件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!