How to link a bug created on Microsoft Test Manager to TFS? - tfs

I want to be able to see the bugs created on MTM in TFS without having to manually create them again. If anybody has any insight on how to automate this process please help.
Thanks

When you are working with MTM you are either executing Test Cases or doing Exploratory testing when you are creating bugs.
If you are executing test cases MTM will automatically associate any Bugs created with the Test Case in context. However, as your Test Case may test multiple PBI's the tool does not know which PBI is in context.
Note: I am not sure if, when using the 'Add Requirement' option to create a Test Suit that I linked to your PBI if the link to the PBI is created.
If you are doing exploratory testing, where you don't have a Test Case, then you can choose to "Explore a requirement". In this case both Bugs and Test Cases created are associated with the PBI in context.
If you run the reporting services Backlog Overview report you will see the number of tests passing and failing against PBI as this report follows the indirect links.

Related

Microsoft Test Manager 2015

Please see the picture below for reference. Does anyone know how to associate Test Runs to a PBI in TFS Microsoft Test manager. The 3 results I have circled below I had to manually associate each Test Run to the PBI. Is there a way to have them automatically link up? Test Cases automatically do this. (Tested By)
To associate automated test results with PBI, you could do this directly from test result page.
On the test results page, select the tests you want to link to PBI and choose the Associate tests to work item (link) icon.
Select the PBI from the list of suggested work items and choose Associate.

TFS / MTM 2015 - invite users to re-run tests after bugfix

Scope: I need a possibility to re-assign, on a bugs basis, the test case again to the same tester/testers which has reported this bug.
MTM 2015 got this "Verify function" under the testing center menu "Test" - Verify bugs and by right clicking on a bug in the list.
Now when I do this, it'll start the MTM test runner with me as the assigned tester. But thats actually not what I need.
I came as far as this with my researches:
TFS 2015 hasn't any "Verify" function - only available from version 2017.1 or later (more here on section: Verify a bug, re-run tests ...)
So could anybody help me out of this (updating to TFS 2017 or later is no option for the moment)?
The simplest and effective way still is using bug workitem workflow to track the process. Even without the verify function in TFS2015, you still could link your test case in the bug workitem. You need to customize the bug work item type. Add a custom filed such as retest and add a condition (retest filed need to change to pass) during the transform from active to resolve.
Then just set "assign to" filed = work item creator to make sure the test case run again by the same tester/testers which has reported this bug.
However this will create a new test result in a new test run. It will not update the original test result. If you just want to rerun failed test cases from TFS 2015. Unfortunately ,this is not an inbuilt feature. More details please refer this issue in GitHub.

Microsoft Test Manager initial test suite state 'In Progress'?

Why is the initial state of a test suite 'In Progress' then you flip it to 'In Planning' then back to 'In progress'? This doesn't make sense to me and I can't find any documentation regarding MTM 2013 states on why this was done? I don't want to edit the states if I don't have to but would like some justification to keep it as is.
You can set the state of a test suite to indicate whether you are ready to run its tests or whether its tests have all completed.
If you don't want to use this feature, leave the state at its default value of In Progress.
Set the state to inform other team members:
In Planning: The test cases in the suite are not yet ready to run.
In Progress: The test suite can be run.
Completed: The tests have completed and do not have to be re-run in this test suite. You might still run the same test cases
in other test suites or test plans.
Note: The tests in a test suite cannot be run unless its state is In Progress.
According to your description, seems you are lacking of the permission "Manage Test Suite" . Then you could not be able to change the state. You could double check this with your TFS Admin. More details please see this link: Test Suite Security Permissions in MTM
Update
In MTM2010, the default state for a test suite in a test plan is still In planning. It's hard to judge a specific period of a product. At that time , one of the top feature requests from Microsoft Test Manager/Test Case Management users across various forums has been the ability to customize the Test Plan and Test Suite artifacts. Based on the feedback, with Team Foundation Server 2013 Update 3, we are adding the functionality to add custom fields and workflows to Test Plans and Test Suites.
With TFS 2013 Update 3, you can customize test suite states, and removed the restriction to only let you run tests if the test suite state is “In Progress”. Some users like you might have their own custom states that they want to use for tests that can be run, so this change allows more flexibility.
Prior to TFS 2013 Update 3, test plans could only have “Active” and “Inactive” states and test suites could only have “In Planning”, “In Progress”, and “Completed” states. With Update 3, a test plan can be customized to have different workflow states. If you use an MTM client with a version of Visual Studio prior to Visual Studio 2013 Update 3, you might get an error when you try to update the state because this version of the client was not designed for custom states. Upgrade your MTM client to Visual Studio 2013 Update 3 and you will be able to change the states. Or you can open the test plan or test suite work item directly from MTM (type Ctrl+g, then enter the id of the work item).
More details please refer this blog: Test Plan and Test Suite Customization with TFS2013 Update3
So in your scenario, the best solution is updating your TFS to TFS2013 update3 or above and also updating VS to VS2013 update3 or above.

Uploaded test cases on TFS are not visible in Test Manager

I have uploaded some test cases form excel sheet in TFS under a specified project using 'Test case import utility' yet i am not able to see uploaded test cases in MTM for execution. Is there anything i might have missed.
In this scenario one must query the test cases in MTM and there it will list all the test cases, test cases can then be directly added to MTM corresponding to a particular suit.

Is it possible to link a bug to a unit test?

If I create a bug in TFS, is it possible to associate it with a unit test and be notified if this bug is fixed/broken?
Not exactly, but the workflow can go the other way: instead of creating a bug up-front, you can let Team Foundation Server handle the work item creation for you. If you create a continuous integration build that runs your unit tests, you can create a bug assigned to the user who submitted the changeset if that build fails (including because the unit tests fail.)
A good article on configuring continuous integration to do this is in MSDN Magazine.
A new feature in TFS 2010 is Gated Check-in, which will prevent this failing code from getting checked-in by requiring the build and test steps to complete successfully before they get committed.
There is, currently, no mechanism to do what you desire. You can force users to check in changes tagged with a work item, which you can then manually examine. Provided the user either alters a test class or creates a new one, and checks in with the fix, you can see whether it is done or not. But, there is no automagic "if this test is changed, alert me".
If you need some type of "change and alert" functionality, I would examine CodePlex and see if there are any tools of this type. It could be facilitated at the database layer, as well, but I am not sure what kind of monkeying that would take. I have not looked at the service endpoints for the latest TFS, so there may be a way to poll to see if there are changes.
Wish I had a better answer, but this is an interesting ASK, so I would consider going to Microsoft Connect for TFS and requesting the feature. It could be included in a future rev if enough people are interested in this feature.

Resources