Odpovědět ITestManagementTeamProject.TestRuns.ByOwner question

  • 5. března 2012 23:07
     
     

    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

Všechny reakce

  • 7. března 2012 4:25
    Vlastník
     
     Odpovědět Obsahuje kód

    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

  • 12. března 2012 3:17
     
     Odpovědět

    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