简体   繁体   中英

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. 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.

Export to Excel(work item type):

You can use below way to export test cases(work items) from TFSto 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.

在此处输入图片说明

  1. Connect in 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. 在此处输入图片说明

Now all the test cases are export to 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.


Another way is using Offline Test Execution extension . You can export the entire test plan, or a filtered selection, to an Excel file. 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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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