Export Test Cases including Steps & Results from Rally to TFS - tfs

I would like to export test cases (including steps & expected results) from Rally to TFS.
As of now, i see we can export only test cases using plug in or Rally-TFS connector.

The best way to export Test Cases with their Steps and Expected Results would be using the Excel Add-In. You could select Test Case Step as the query type then the following columns should get you the information you are looking for:
CreationDate,ExpectedResult,Input,StepIndex,TestCase,TestCase.FormattedID,TestCase.Type,TestCase.WorkProduct
You can find more information on the Excel Add-In here:
http://help.rallydev.com/rally-add-excel
As for importing them into TFS, please note that the TFS connector does not provide support for Test Case Steps.

Related

How to get nUnit test report after TFS 2015 build?

Good day.
I have a TFS build and a Visual Studio Test step there. All test are run, but I can't get detailed info about them, only quantity, passed\failed\others, run duration.
Also, I see "Outcome: Failed" and "This build doesn't have test results for the outcome you've selected".
How to configure this outcome?
You can't directly use the build-in outcome to analysis the detail test result.
You need to run the Publish Test Result task. First generate an XML file which contains the results. And then use the publish results step and pointing to that file so that the test results will show up in the build output.
More details about how to use this, please refer this similar tutorial with xUnit test: Execute and publish xUnit Tests results with .NET Core and VSTS
Note: For now VSTS/TFS does not support NUnit3 format. Source Link: Support NUnit2 format

TFS 2015 >> Exporting Test Cases and associated detail Steps in excel

We can import the test cases with their associated steps from excel to TFS.
Is there any way or tool for exporting the test cases with their associated detail steps into excel?
Currently i am using TFS 2015.
You can query the test case work items and select Steps Column in VS, then export the query to Excel directly. But you need to reorganize the format of the Steps:
You can export test artifacts data on TFS Web Access so that they can either be sent via email or printed. The Export capability allows you to customize what data you want to export. https://msdn.microsoft.com/en-us/library/dd380763.aspx
For exporting to Excel, you can choose the Print or Email option from
the Export dialog box, then choose Cancel from the Print dialog box.
The data for the report is displayed. Select the test cases and
associated steps, then you can copy and paste it into a Excel if you
want. All the formatting in the report is retained.

How to create Test result in TFS2015 and add them to summary page

I need to see my test's result in the summary page. The test report in custome format, so I can't use 'in-box' testing task of TFS, but I would like to have the same behaviour as for Unit tests:
statistic in summary page with link leading to Test details tab
Tab with tests details in build summary
TestRun in 'Test->Run' category (optional)
Detail information for each test.
I found how to make it in 'Test->Run' with this link How to create a test run and result using the Team Foundation Server API? (many thanks to author). In this solution Test created base on Test Plan and Test Suite. According to my experience, the Unit test creates Test Run base on Build, and I belive that should be TFS API to do it programmatically.
Could someone suggest me where such API could be found. And if p1 and p2 possible to make and how?
For your requirement, you may have to create a section or a tab by writing your own vsts extension to display the info in build result report and build summary.
You can upload the xml result file as 'testrun-attachment' via REST-interface and got the pieces in place to show the summary values on the build summary tab or on your own extended “test result” tab.
Here is a example with how to display opencover result for your reference: vsts-opencover, finally will get the result as below:
How to write your own extension:
Overview of extensions for Visual Studio Team Services
Some examples :
https://github.com/Microsoft/vsts-tasks
https://github.com/Microsoft/vsts-extension-samples

Create result from excel into TFS

I want to create result in TFS through an excel sheet. I need to have different iterations and my excel contains individual step results in each and every row.
This is related to offline test execution, however this feature is still in planning process. Refer to this link for details: http://visualstudio.uservoice.com/forums/330519-team-services/suggestions/3596154-offline-test-execution-allow-users-to-execute-tes
For now, I would recommend you to use Microsoft Test Manager to run the test. If you do want to do it via excel, you could save the test result in excel and then develop some code to read the test result information in the excel file and import the test result via TFS Test Management API. For the instruction about TFS TestManagement API, check this link and this link for details.

Exporting Test Cases and Shared Steps

Is there any way of exporting Test Cases and Shared Steps from one project to another in TFS 2012 using database queries?
I have tried TFS Integration tool, but it did not work as I expected, so I was wondering if there is any way of doing this by connecting to SQL Server and exporting all items directly from and to the databases.
A few days ago I needed an Excel testcase export for a newer version of TFS (TFS 2013). Turns out that there is still no export to Excel function built-in to TFS (in contrast to E-Mail and Printing) and the tools became incompatible over time.
But I found this Revival-Tool that seems to work:
https://github.com/jorupp/ExportTestCases
Just wanted to point that out even if it may not be directly related to this topic with TFS2012.
You shouldn't work directly in the database, because it is not supported by Microsoft and you could harm it a lot.
I used the TFS Integration Platform tools a lot for migrating TFS2010 projects, but never used it for TFS2012. My experience with that were good and it shouldn't be a problem to migrate all Test Cases and Shared Steps into another TeamProject. If you have the same Work Item Type Definitions in both projects, you don't need to create field mappings.
Another option would be to use Excel as "Export" and "Import" cache, but you might loose some information, because not everything could be shown in Excel, e.g. Steps of a TestCase, the history, Work Item Links.
If you are skilled in programming using TFS API, you could write your own small migrator, but this could be a lot of effort.
All in all the TFS Integration Platform should be the easiest and best way, so what have been your expectations that have not been fulfilled?
You can use an alternative methods.
First export all Test cases using "Test case extractor."
Them import them in new project using "Test case import tool."
Adding to the point mentioned above, for exporting the test cases you might find the below link more useful:
http://tfstestcaseexporttoexcel.codeplex.com/
I have given it a try and found it very useful and easy to use.

Resources