5

I need to import test cases from Excel to TFS 2013. For this I have already gone through the link SQA and VSTS, but my issue is not getting resolved from these links. I can't use 'Test Case Migrator Plus' as for running any exe on my machine I need to ask special permissions from the IT help desk team which is in itself a big task.

Issue is I am not able to import Steps i.e. Action and Expected Result to TFS from Excel sheet. On trying to import these from Excel, everything (all actions and their expected results) get imported to one single column only, like shown below enter image description here

I have seen that when I export test cases from TFS to Excel then Actions and Expected Result get exported as <DIV><P>Step1</P></DIV><DIV><P>Result 1</P></DIV><DIV><P>Step2</P></DIV><DIV><P>Result 2</P></DIV> in Steps column, so as per this pattern I configured Actions and Expected Result in my Excel sheet with same DIV and P tags, but on importing they are not getting imported as required rather they are getting import to single column as shown above and all test cases sheet gets messed up in TFS.

In actual after import Steps should look like

enter image description here

How this thing can be achieved from Excel to TFS?

1
  • Could any one explain step by step , how to use clipbard.SetText to import or paste Testcases from excel to TFS
    – Abhi
    Commented Jul 8, 2018 at 23:13

4 Answers 4

6

I had the same issue when migrating tests from a legacy tool to TFS. It was simply not possible, independent of any choices offered by Excel and TFS (really, I tried them all and wrote a 43 page document about my test conversion efforts).

Finally I was able to workaround the issue like this:

  1. In TFS, switch to the grid view
  2. In Excel select all steps and copy it to the clipboard
  3. Back in TFS, paste the steps

If you use three columns in Excel, you can even import many test cases into TFS at once. Column 1 needs to contain the test name, column 2 the action and column 3 the expected result. This image helps you to better understand it:

Many test cases: copy Excel to TFS

Depending on what you have as input, you can also do it with a bit of code, e.g. in C#. Just append some text, split columns by \t and rows by \r\n. Use Clipboard.SetText() and then paste in TFS.

4
  • Sorry for the too late answer... Wish I had seen it before. Commented Oct 28, 2015 at 15:20
  • Thanks for the answer. I have a query regarding the same, does this mean that in my excel from where I am going to copy test cases, all the steps should be in separate rows? Like if I have 3 steps in a test case then I need to spread these steps in 3 rows and then paste them, Right?
    – Dhiman
    Commented Oct 28, 2015 at 15:34
  • @Dhiman: yes, right Commented Oct 28, 2015 at 15:35
  • Ok, I will give this a try :)
    – Dhiman
    Commented Oct 28, 2015 at 15:37
2

The above worked well, but it only works for brand new test cases. If you have test cases that already have a test ID, you have to copy and paste individual steps and results to each test case. I learned that the hard way!!

1
  • This either needs to be a comment or it needs to specify exactly what "the above" is in reference to. There are 2 other answers on this thread and this seems to append to one of them instead of stand alone.
    – mutt
    Commented Mar 16, 2017 at 19:45
1

After waiting long for this question, I am answering it myself.

I too searched a lot but didn't get any way for importing test cases from Excel to TFS in right format. One has to use Test Case Migrator Plus for importing test cases from Excel to TFS. Perhaps Microsoft has restricted import from Excel to TFS (using tags as described in question) for avoiding some kind of scripting.

Test Case Migrator Plus is a good, easy and only way for doing this. Our client agreed to this and he will raise an approval request for granting permissions to install and execute this import exe.

1
  • Can you please share a link to install "Test Case Migrator plus". I tried it from the below link but after installation it is showing "Work Item Migrator". That is not useful for me. Commented Dec 11, 2018 at 16:18
0

You have to format your test steps as XML:

<steps id="0" last="1">
    <step id="0" type="ValidateStep">
        <parameterizedString isformatted="true">Step 1</parameterizedString>
        <parameterizedString isformatted="true">Result 1</parameterizedString>
        <description/>
    </step>
    <step id="1" type="ValidateStep">
        <parameterizedString isformatted="true">Step 2</parameterizedString>
        <parameterizedString isformatted="true">Result 2</parameterizedString>
        <description/>
    </step>
</steps>

Found here: https://stackoverflow.com/a/54107054/4818105

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.