[英]How can I migrate test cases with shared steps from TFS to Azure DevOps?
How can I migrate test cases with shared steps and shared parameters from TFS to Azure DevOps?如何将具有共享步骤和共享参数的测试用例从 TFS 迁移到 Azure DevOps? I could migrate test cases but they didn't include the shared steps and shared parameters.
我可以迁移测试用例,但它们不包括共享步骤和共享参数。
Found this GitHub thread: https://github.com/nkdAgility/azure-devops-migration-tools/issues/518 , which sharing one workaround as following.找到了这个 GitHub 线程: https://github.com/nkdAgility/azure-devops-migration-tools/issues/518 ,它共享一个解决方法如下。
User this tool: https://marketplace.visualstudio.com/items?itemName=nkdagility.vsts-sync-migration使用此工具: https://marketplace.visualstudio.com/items?itemName=nkdagility.vsts-sync-migration
In the configuration.json file update below code, it will migrate test cases along with Shared steps and shared parameters在下面代码的configuration.json文件更新中,它将迁移测试用例以及共享步骤和共享参数
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Test Case','Test Suite','Shared Steps','Shared Parameter')", "WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Test Case','Test Suite','Shared Steps','Shared Parameter')",
There are different work item types: Test case , Shared Steps and Shared Parameter .有不同的工作项类型:测试用例、共享步骤和共享参数。 You could export them to CSV files separately, and then import them to Azure DevOps projects.
您可以将它们单独导出到 CSV 文件,然后将它们导入到 Azure DevOps 项目中。
update>> If your test case adds shared steps, export it to csv from a query containing steps column, you will find that steps contains section like
<compref id="2" ref="734">
, the 734 is the id of shared steps in this project.更新>>如果您的测试用例添加了共享步骤,将其从包含步骤列的查询中导出到 csv,您会发现步骤包含类似
<compref id="2" ref="734">
的部分,其中 734 是此项目中的共享步骤。
Therefore, if you import shared steps to Azure DevOps project, the shared steps will own a new id, you need to edit the csv file to update the id of shared steps, and then import it to Azure DevOps project can find this previously imported shared steps. Therefore, if you import shared steps to Azure DevOps project, the shared steps will own a new id, you need to edit the csv file to update the id of shared steps, and then import it to Azure DevOps project can find this previously imported shared脚步。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.