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:
specify Work Item Type
= Test case.
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.