How to get currently active Test Plan within MTM within a custom WorkItem control?
-
Saturday, February 04, 2012 7:51 AM
I am writing a custom WorkItem control and it integrates nicely into MTM. I can easily find out the current Project loaded into MTM via the WorkItem; but I can't work out how to get the currently selected TestPlan within MTM.
Can I find out the currently selected Test Plan within a custom WorkItem control within MTM?
The TestPlan contains lots of extra information we can use within the control and it will be a better experience if the user does not have to explicitly specify the Test Plan given the context is clear.
Grey Ham
Blog: http://www.havecomputerwillcode.com/blog
All Replies
-
Wednesday, February 22, 2012 10:29 AMOwner
Hi,
Do you want this information manually or through code?
Thanks
-
Thursday, February 23, 2012 5:34 AM
Through code.
The ServiceProvider passed in to the IWorkItemControl doesn't seem to expose anything to give me access to the currently selected Test Plan. Given that the Test Plan *HAS* to be selected before I can open a Work Item / Test Case within MTM, and my custom control is intended to be used within MTM, it would be ideal if I could determine the Test Plan automatically via a Service call. I can easily deal with the situation where the control is used within VS2010 and the Test Plan is not available.
If I can get to the Test Plan through the API, I can locate all of its information that I need automatically and that will improve the user experience.
Grey Ham
PS: I am aware I can have the user manually select the Test Plan within the control, but it seems... redundant, given the context is already clearly established.
Blog: http://www.havecomputerwillcode.com/blog
- Edited by Grey Ham Thursday, February 23, 2012 11:11 AM PS:
-
Wednesday, March 28, 2012 12:19 PM
I have the same Problem. I'm running a test over MTM. At the testingmachine there is no way to get over the TFS-API to the current Testplan, in that the test is running.
It would be very helpful to get a hint how to get that info.
Thanks
Look to the future - and explore it!

