ITestManagementTeamProject.TestRuns.ByOwner question
-
Monday, March 05, 2012 11:07 PM
Hello again,
I am trying to use this api to access all test runs by the owner of the test run.
It requires a TeamFoundationIdentity parameter. I have no idea how to generate a TeamFoudationIdentity from a domain\user name.
How do I do this?
And, while you're at it, what is the Uri that I should be generating in order to get all test runs by build (TestRuns.ByBuild(Uri))?
- Bruce
Bruce
All Replies
-
Wednesday, March 07, 2012 4:25 AMOwner
Hello Bruce,
According to Taylor's blog, you need to use the following sample code to get the appropriate TeamFoundationIdentity information:
TfsTeamProjectCollection currentUserCollection; IIdentityManagementService identityManagementService =currentUserCollection.GetService<IIdentityManagementService>(); TeamFoundationIdentity identity = identityManagementService.ReadIdentity(IdentitySearchFactor.AccountName, username, MembershipQuery.None, ReadIdentityOptions.None)
For the Build Uri, please right-click the build definition you are using and click Properites, take the value of the Url property which should be simmilar to:"vstfs:///Build/Definition/1", and the Build Uri need to be "vstfs:///Build/Build/1"
Thanks.Vicky Song [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Vicky SongOwner Monday, March 19, 2012 4:06 AM
-
Monday, March 12, 2012 3:17 AM
Take a look at the smaple which describes how to get test results for a test run http://social.technet.microsoft.com/wiki/contents/articles/3279.tfs-2010-api-get-results-of-a-test-run.aspx
Thanks,
Anuj
http://www.anujchaudhary.com
- Marked As Answer by Vicky SongOwner Monday, March 19, 2012 4:06 AM

