none
VSTest credentials parameter RRS feed

  • Question

  • Hello,

    At my company, we've been using vstest.console.exe to run our unit tests. We recently updated our build machine from 15.2 to 15.3.3, and we've started seeing an error come up during our vstest runs. This error comes up no matter who runs the command on 15.3.3, and it does not come up no matter who runs it on 15.2. The vstest.console.exe version associated with the build machine is 15.0.26720.2, and the vstest.console.exe version associated with my machine (which is using Visual Studio 15.2, and does not exhibit the problem) is 15.0.26228.0. The command we are running (modified to not show our dll names) is:

    vstest.console.exe ourtestdll1.dll ourtestdll2.dll ourtestdll3.dll "/logger:TfsPublisher;Collection=<TFS URI HERE>;BuildName=<BUILD NAME HERE>;TeamProject=<TEAM NAME HERE>;Platform=x64;Flavor=Release_VS2017;" "/Platform:x64"

    The output previously just ran the tests and reported the results to our tfs collection. Now, it runs the tests, but the logger is not used, with the output:

    Microsoft (R) Test Execution Command Line Tool Version 15.0.26720.2

    Copyright (c) Microsoft Corporation.  All rights reserved.

    Error: Exception occurred while initializing logger with URI 'logger://Microsoft/TestPlatform/TfsLogger/v1'.  The logger will not be used.  Exception: System.ArgumentNullException: Value cannot be null.
    Parameter name: credentials
       at Microsoft.VisualStudio.Services.Common.ArgumentUtility.CheckForNull(Object var, String varName, String expectedServiceArea)
       at Microsoft.TeamFoundation.Client.TfsConnection..ctor(Uri uri, VssCredentials credentials, IdentityDescriptor identityToImpersonate, String locationServiceRelativePath, ITfsRequestChannelFactory channelFactory)
       at Microsoft.TeamFoundation.Client.TfsTeamProjectCollection..ctor(Uri uri, VssCredentials credentials)
       at Microsoft.VisualStudio.TestPlatform.Extensions.TfsLogger.TfsLogger.GetTcmPublisherInstance(String collectionUrl, String buildName, String teamProject, String testRunName, String buildPlatform, String buildFlavor, Boolean flavorOrPlatformOverridden, String personalAuthenticationToken)
       at Microsoft.VisualStudio.TestPlatform.Extensions.TfsLogger.TfsLogger.Initialize(TestLoggerEvents events, Dictionary`2 parameters)
       at Microsoft.VisualStudio.TestPlatform.Common.Logging.TestLoggerManager.AddLogger(Uri uri, Dictionary`2 parameters)

    The documentation for vstest.console.exe does not mention this credentials parameter anywhere, nor does filling it out provide any information as to what it should look like. Our builds are not publishing our test results to our tfs collection anymore, and we'd really like to get that functionality back.

    Thanks,

    David


    • Edited by Ironman1478 Tuesday, September 5, 2017 9:37 PM
    Tuesday, September 5, 2017 9:36 PM

Answers

  • Hi David,

    I just tested it in our side with my colleague assistance which is in TFS team, we found out that vstest.console.exe from both vs2017 15.2 and VS2015 could run it with no problem, the error only happens on VS2017 15.3, so I think it's limitation of this latest update.

    So I suggest you submit this issue to VS develop team directly.

    Thanks for your understanding.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Thursday, September 7, 2017 8:41 AM
    • Marked as answer by Ironman1478 Thursday, September 7, 2017 5:45 PM
    Thursday, September 7, 2017 8:41 AM

All replies

  • Hi David,

    You could try to clean the credentials stored with cmdkey. And then, miracle, it fixed the problem for others before.

    The steps:

    cmdkey.exe/list : List the credentials. Find the one that is linked to TFS.

    cmdkey.exe/delete CREDENTIALNAME to delete this credential

    Hope it helps.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Wednesday, September 6, 2017 3:17 AM
    • Proposed as answer by zodchiy Tuesday, July 17, 2018 9:39 PM
    Wednesday, September 6, 2017 3:17 AM
  • Hello Fletch,

    I'm not sure that that solution is applicable to our problem. After running cmdkey /list, we don't have any credentials related to TFS or VSTS at all, let alone stale ones. Here's our output from cmdkey /list, in case it helps:

     Target: WindowsLive:target=virtualapp/didlogical
     Type: Generic
     User: <USERNAME HERE>
     Local machine persistence

     Target: LegacyGeneric:target=MicrosoftOffice15_Data:SSPI:<USER EMAIL>

     Type: Generic

    If it makes any difference, our TFS server itself is TFS 2013, even though we're using Visual Studio 2017 (15.3.3). We are still seeing the logger error message as seen above, with the same stack trace, even with no obvious stale credentials. 

    Wednesday, September 6, 2017 9:00 PM
  • Hi David,

    I just tested it in our side with my colleague assistance which is in TFS team, we found out that vstest.console.exe from both vs2017 15.2 and VS2015 could run it with no problem, the error only happens on VS2017 15.3, so I think it's limitation of this latest update.

    So I suggest you submit this issue to VS develop team directly.

    Thanks for your understanding.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Thursday, September 7, 2017 8:41 AM
    • Marked as answer by Ironman1478 Thursday, September 7, 2017 5:45 PM
    Thursday, September 7, 2017 8:41 AM
  • Thank you very much for your help and quick turnaround.
    Thursday, September 7, 2017 5:45 PM
  • Has this bug been logged within MSDN? If so, what is the link to it?
    Wednesday, September 13, 2017 4:06 PM
  • We had some communications with the TFS team and we were told it has been fixed in 15.4.0. We haven't been able to adopt this new version due to build requirements.
    Sunday, October 22, 2017 1:56 AM