简体   繁体   English

我们如何将测试用例从 Microsoft Foundation Server (TFS) 导出为 excel 格式?

[英]How can we export test cases from Microsoft foundation server(TFS) to an excel format?

I have test cases created in Team Foundation server, now I want to export those test cases from Microsoft foundation server(TFs) to excel format for the reporting purpose.我在 Team Foundation 服务器中创建了测试用例,现在我想将这些测试用例从 Microsoft Foundation Server(TF)导出为 excel 格式以用于报告目的。 We do have in-built option of exporting test,email or print in word format, but Is it possible to write some python code to export the tests cases directly into excel sheet.我们确实有以word格式导出测试、电子邮件或打印的内置选项,但是是否可以编写一些python代码将测试用例直接导出到excel表中。

Export to Excel(work item type):导出到 Excel(工作项类型):

You can use below way to export test cases(work items) from TFSto MS excel:您可以使用以下方式将测试用例(工作项)从 TFS 导出到 MS excel:

  1. Define a query for the test case you want to export.为要导出的测试用例定义查询。 Create new query for all test case -> specify Work Item Type = Test case.为所有测试用例创建新查询 -> specify Work Item Type = Test case.

在此处输入图片说明

  1. Connect in MS excel.在 MS excel 中连接。 MS excel -> Team ribbon -> New List -> Servers -> add -> input VSTS URL( https://tfsseverurl.com ) -> OK -> Close -> select a team project -> connect -> choose Query list -> select the query you just created -> OK. MS excel -> 团队功能区 -> 新建列表 -> 服务器 -> 添加 -> 输入 VSTS URL( https://tfsseverurl.com ) -> 确定 -> 关闭 -> 选择团队项目 -> 连接 -> 选择查询列表-> 选择您刚刚创建的查询 -> 确定。 在此处输入图片说明

Now all the test cases are export to MS excel.现在所有的测试用例都导出到MS excel。 And you can click Choose Columns to add or remove displayed columns which corresponding to selective fields.您可以单击选择列来添加或删除与选择字段对应的显示列。

在此处输入图片说明

Note: This will not include test steps.注意:这不包括测试步骤。 For test steps, it's still a user voice:对于测试步骤,它仍然是用户的声音:

Exporting Test Cases with Steps to Word/Excel You could kindly vote up and track the progress. 将带有步骤的测试用例导出到 Word/Excel您可以投票并跟踪进度。


Another way is using Offline Test Execution extension .另一种方法是使用离线测试执行扩展 You can export the entire test plan, or a filtered selection, to an Excel file.您可以将整个测试计划或筛选的选择导出到 Excel 文件。 Filter the export to the entire test plan, the selected suite with or without children, configuration and/or tester before exporting.在导出之前过滤导出到整个测试计划、带有或不带有子项的选定套件、配置和/或测试器。

This will view test cases offline in excel as below.这将在 excel 中离线查看测试用例,如下所示。 But this Add-in can eventually only update the stuff in existing Test Cases.但是这个插件最终只能更新现有测试用例中的内容。 for Ex.对于前。 You can export scripts to Excel and make them Pass/Fail/Block and again import the Sheet.您可以将脚本导出到 Excel 并使它们通过/失败/阻止,然后再次导入工作表。 But if you need to do a fresh Import of Test Cases which you are not able to do.但是,如果您需要重新导入测试用例,而您无法做到。

在此处输入图片说明

But this solution also have a limitation, it will not allow you to be able select with some selective fields.但是这个解决方案也有一个限制,它不允许你能够选择一些选择性字段。

Hope it helps.希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM