locked
vstest.console.exe fails to start tests RRS feed

  • Question

  • I've been trying to use the new 'vstest.console.exe' that comes with VS2010 (in my case I'm using the version that comes with the Visual Studio 2012 test agent software).

    However, when I specify to launch tests, like this:

    vstest.console.exe "MyTest.orderedtest"

    I get the message returned "Starting test execution, please wait", then the task finishes - but my UI tests don't start. And I don't know if there are any results saved anywhere, if there even are any.

    Wednesday, August 29, 2012 1:34 PM

Answers

  • Hello Xbox360ciaran,

    Thank you for posting in the MSDN forum.

    In addition, do you mean that you use VSTest.Console.exe with Visual Studio 2010 command line?

    I think that you can only use VSTest.Console.exe with Visual Studio 2012 command line.

    The article about VSTest.Console.exe command-Line options may help you:

    http://msdn.microsoft.com/en-us/library/jj155796.aspx

    In addition, Vstest.console.exe doesn’t create the TRX file by default. Results would be sent only to console. If TRX is needed, user has to enable it explicitly by specifying /logger:trx

    You also can use the MSTest.exe to run your ordered test to check if its tests have been executed.

    You can use the following command to run a ordered test:
    MSTest /TestContainer:OrderedTest1.orderedtest

    Using MSTest.exe, you can save and view the automated test results from your test runs from the command line to your Team Foundation Server.

    I hope this will be helpful to you.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 30, 2012 3:43 AM
    Moderator

All replies

  • I think this may have been caused by my solution still referencing version 10 DLL's of the Coded UI tests (even though it shouldn't). 

    But vs.test.console.exe gives no indication of whether the tests have started or whether they are running or whether they have stopped, nor gives any indication if any result files were saved off anywhere. 

    Seems a bit crap. 
    Wednesday, August 29, 2012 2:02 PM
  • Hello Xbox360ciaran,

    Thank you for posting in the MSDN forum.

    In addition, do you mean that you use VSTest.Console.exe with Visual Studio 2010 command line?

    I think that you can only use VSTest.Console.exe with Visual Studio 2012 command line.

    The article about VSTest.Console.exe command-Line options may help you:

    http://msdn.microsoft.com/en-us/library/jj155796.aspx

    In addition, Vstest.console.exe doesn’t create the TRX file by default. Results would be sent only to console. If TRX is needed, user has to enable it explicitly by specifying /logger:trx

    You also can use the MSTest.exe to run your ordered test to check if its tests have been executed.

    You can use the following command to run a ordered test:
    MSTest /TestContainer:OrderedTest1.orderedtest

    Using MSTest.exe, you can save and view the automated test results from your test runs from the command line to your Team Foundation Server.

    I hope this will be helpful to you.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 30, 2012 3:43 AM
    Moderator
  • Sorry, I meant to say VS2012. 

    So, when I enable the TRX file in vstest.console.exe, where does it save to? 
    Thursday, August 30, 2012 9:09 AM
  • Hello Xbox360ciaran,

    According to the link about VSTest.Console.exe Command-Line Options: http://msdn.microsoft.com/en-us/library/jj155796.aspx, you will see /Logger:[uri/friendlyname].

    As my personal point of view, the logger file’s path should be specified yourself. You can try to specify a trx file and run test with vstest.console.exe to check if the test results will store in it.

    Also you can write loggers for command line test runner vstest.console.exe, please see the following article:

    http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/26/writing-loggers-for-command-line-test-runner-vstest-console-exe.aspx

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 30, 2012 10:10 AM
    Moderator
  • Hello Xbox360ciaran,

    Any update? Could you get useful information from our reply?

    Would you mind letting us know the result of the suggestion?

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 3, 2012 1:28 AM
    Moderator
  • Yes, that was useful. I will give it a try tomorrow to see if it works and will report back here if it works as expected. 

    Thanks a lot for the help. 
    Monday, September 3, 2012 3:51 PM