MTM Direct Links Query vs Query-based suit (direct-links) - tfs

Direct Links query can be created two ways in MTM
Plan->Contents->New Query-based suite->(query type)->Work Items and Direct Links
Track->Queries->New Direct-Link Query
First one creates a test suite in the end. Is there any other difference?

Your two techniques are doing different things and have different purposes.
Option 2 is simply doing a Work Item Query, the same way you can do in Team Explorer/Visual Studio and also Team Web Access.
Once you have viewed the information you can discard it or save it in "My Queries" or "Shared Queries". If you save it, you can view the results in Excel for example or perhaps share it with colleagues.
Option 1 is all about creating a Test Suite which is a grouping of Test Cases.
There are static suites which are essentially folders for grouping Test Cases.
There are requirements based suites - for example, add all the PBIs from Sprint 1 and then we can add Test Cases to ensure we have tested against their acceptance criteria.
Then there are query based suites which will add all the test cases which match your specified query. New test cases will be added if they match the query (eg. all high priority test cases)
Organizing Test Cases Using Test Suites(2012)
So, if you want a test plan then use option 1. If you want to simply run queries, use option 2 (or use team explorer/web access to do the same thing)

Related

TFS 2013 Queries through multiple work item hierarchies

RE: TFS/MTM: Plan>Contents>Create query-based suites...
I am trying to get all the test cases returned under each feature for targeted testing. But, the features aren't directly linked to the test cases. The features are linked directly to user stories which are directly linked to Test Cases.
So, How do I get a list of test cases by Feature when running query-based?
No, we cannot achieve that, multiple work item hierarchies (more than 2 hierarchies) is not supported for work item query.
We can only query 2 hierarchies (Parent/Child), just using the type of query Work items and direct links or Tree of work items to do that.
So, in your scenario you need to query the test cases by user stories, then filter the stories by Feature.

TFS 2017: Kanban card default Test Plan

I'm asking this question on behalf of a colleague (which means I may have the terminology incorrect).
When a colleague adds a Test Case to a card, a requirement test suite is created in the wrong test plan.
We don't want a test suite to be created, we just want the test cases to be on the card itself.
How can we change this behaviour in TFS?
I did not see any settings for the test plan creation. The test plan creation works with next steps (tested on vsts):
System tries to find any plan with requirement. If there is no any plan then next.
System tries to find any plan with the iteration path from requirement. If plan exists system will import requirement to that plan. If there is no any plan then next.
System creates plan with iteration path from requirement and with requirement.
So you may use a workaround:
Create iterations for all test plans that you plan to use.
Assign needed iteration for selected test plan.
Assign needed iteration for requirements that will be used for testing.
There is no option to disable this behavior. But you can create a test plan and then configure the VSTS/TFS to place all the test case there:
Click the "Configure team settings" button:
Navigate to "Tests" panel and then choose "Select a test plan".

Orphan Requirements in TFS

How can I make a query in TFS to say “Give me all the Project_A requirements that do not have any test cases linked to them”
I want to be able to easily look at what requirements have not been looked at by the test team and write/link test cases
You can use 'Work Items and Direct Links' type of query, e.g.

How to get information about destroyed workitems?

I use TFS 2010 and I need using TFS API to retrieve an information about work items that were deleted. There is a table [WorkItemsDestroyed] in the TFS DB that contains the information about destroyed work items. Is there any way to get that information using TFS API?
It depends on what information you want to retrieve. If you want to find out who deleted the work item then you can do that with sql (#pantelif comment).
If you want to retrieve information about the work item itself I think there is not any way to do that, either from TFS API or sql command. As described at this post, you cannot recover deleted work items:
Deleting Work Item Action Is Not Recoverable
Actually, as long as the test plan has not been deleted, there should be full history of the actual test results allowing you to recover from the deletion of a test suite...it may take a bit of time, but process works.
Try this to re-create your test suites and associated results.
Recreate the suite.
Add tests if not a query-enable suite.
From Test tab, select your suite within the hierarchy.
Create some initial results to allow you to see full history for each test. Within the test lists pane, mass-select all test results and set them to blocked.
Now when you open each test result, you will see full list of previous test results history associated to each test case at the bottom of the results window.
In other words, you need to trigger an initial result to see the full history.
For any results only carrying a single “Blocked” result, the test has not been executed. (first time the result has been made)
For tests that have additional results associated to it, identify the last known state (see the Created date column), then set it appropriately (Pass/Fail/Blocked)
NOTE: This will only work as long as the Test Plan has not been deleted. If it is simply a test suite, this should get you back up and running quickly.

TFS 2010: Queries based on the elements of other queries?

is it possible to create new queries in TFS 2010 based on the result of another query?
For example, one (parent) query selects all work items located under a certain work item (lets say work item with ID=5). And now I want to create other queries, that select all bugs, all tasks etc. from the results of the first query?
There, I only have to change the ID of the "parent" work item once and not in all subsequent queries.
Is this possible in TFS 2010 in combination with VST 2010?
Thanks
Konrad
There is a basic support for what you 're after in the GUI editor for WIQL: try with query of type "Tree of Work Items" - which creates a multi-level structure. There is minimal support to what you can handle in this context, for example it's not possible to pick work items with different criterias from level to level.
On the other hand you can implement a custom tool using the TFS-API. There you should be able to tailor to your needs exhaustively. I can support in such endeavor in case you 're interested.
What you want to do seems to be more of a report than a plain query. I think you should have a look at implementing custom reports.

Resources