I am trying to use the TFS API to scan through all my bug workitems, and see if there are any with no associated test cases. I was thinking about using bug.Fields[26].Value == 0 to see how many Related Links there are, but I am not sure if test cases are the only things that are considered related links.
If there are no test cases associated with the bug, I want to create a test case for it. I already know how to create a test case in general, but not one that is associated with an existing bug.
Can someone tell me how to do these things? Thanks.
Any work item that is linked to your Bug is considered a
RelatedLink. Check here for the available types that derive fromLinkand also this SO-post by @bryanmac.With the following you should be able to retrieve the type of each related work item of your bug 123456.
(I had originally found the base of these sources in Scrum Dashboard)
In order to generate a new Test Case for your Bug 123456 you could try something like: