-1

I have a requirement to import the Excel Based Test Cases into VSTS and Export Test Cases from VSTS into MS Excel. VSTS(Not TFS)

Rodger Nadal
  • 309
  • 2
  • 8
  • 21

1 Answers1

6

You can use below way to export test cases from VSTS to 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.

    enter image description here

  2. Connect in MS excel. MS excel -> Team ribbon -> New List -> Servers -> add -> input VSTS URL(https://account.visualstudio.com) -> OK -> Close -> select a team project -> connect -> choose Query list -> select the query you just created -> OK.

    enter image description here

Now all the test cases are export to MS excel. And you can click Choose Colums to add or remove displayed columns.

enter image description here

Import to VSTS: You can add new WIT in MS excel, and then click Publish to import new created WIT to VSTS.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • While trying Step 2: I am getting an TFS Error TFS31002 "Unable to Connect to this Team Foundation Server: {VSTSProjectPath} Can you please guide where I am going wrong – Rodger Nadal Jun 13 '17 at 08:31
  • When does the error occur?Was it after you input your username and password for you VSTS account? – Marina Liu Jun 13 '17 at 08:55
  • And what's your office excel version and visual studio version? – Marina Liu Jun 13 '17 at 09:02
  • I follow below steps 1.Click on New List > Click Servers > Add > Enter Project Dashobard URL 2. Enter the Username and Password for Project. After that Step, Facing the Error "TFS31002- Unable to connect to this Team Foundation Server: {ProjectPath} Possible Reasons for failure include- -The Name, port Number, or protocol for TFS is incorrect -The Team Foundation Server is offline -The Password is expired or incorrect I am using MS Excel 2010 and VSTS 2017 – Rodger Nadal Jun 13 '17 at 12:34
  • 1
    The URL is incorrect, please use `https://account.visualstudio.com` instead. And I add the detail URL in my answer :) – Marina Liu Jun 14 '17 at 02:59
  • Looks like I am not having access to my Project TFS. Its giving me below Error. do you know what can be the issue? TFS31003:- Either you have not entered the necessary credentials or your user account does not have the permission to connect to TFS. – Rodger Nadal Jun 14 '17 at 06:14
  • Do you use VSTS or TFS? If you use VSTS, please refer my last comment to change your server URL. For TFS, you can still use the url for the whole server (not a project dashboard url), such as `http://account:8080/tfs`. – Marina Liu Jun 14 '17 at 06:18
  • I am having VSTS, I am using https://account.visualstudio.com but getting the Error as mentioned above. – Rodger Nadal Jun 14 '17 at 07:23
  • Did you use password to verify your VSTS account or personal access token? And are you an administrator for this account? – Marina Liu Jun 14 '17 at 07:38
  • Hi @Marina, I have frequently tried another way and able to export and import from VSTS to Excel. There is an InBuilt Addin called "Offline Test Execution" in VS MarketPlace. Once you download and install the Plugin, Offline Test Execution Addin can be seen in your Project Test Plan Folder. – Rodger Nadal Jun 16 '17 at 08:33
  • Is it still has problems for you to export by MS excel? The main reason may permissions or your excel and vs versions. But it's glad to hear your solve it :) You can write it as answer and mark it. – Marina Liu Jun 16 '17 at 09:54
  • Actually I used Inbuilt Addin called "Offline Test Execution" in VS MarketPlace.But this Addin can eventually only update the stuff in existing Test Cases. for Ex. I can export scripts to Excel and make them Pass/Fail/Block and again import the Sheet. But I need to do a fresh Import of Test Cases which I am not able to do. As per your method, I am getting TFS Errors as mentioned above, are you sure it remains same when we upload into VSTS and not TFS. – Rodger Nadal Jun 20 '17 at 10:22
  • Yes, I used VSTS. You can upgrade your excel and have a try aganin. – Marina Liu Jun 28 '17 at 04:34
  • I am able to import the Test Case in Excel. But When I choose Column "Steps" from Choose Columns, All my Test Steps are getting converted into simple Text along with html tags. Have you tried any solution for this. Actually After Export to Excel, I want to test the Steps Edit,Add, Remove Functionality and then import back to VSTS. – Rodger Nadal Jul 06 '17 at 10:25
  • i am able to create test case copy but teststeps are not getting copied, whats the solution – Gaurav Khurana Mar 15 '19 at 13:10