locked
VS2013 does not run all tests RRS feed

  • Question

  • Using [TestCategory("Group"), TestMethod] we have established a group of 1935 unit tests. We select this group in the Test Editor, right click Run Selected Tests, and when it gets all done the results says

    Last Test Run Passed (Total Run Time 0:05:03)
    1545 Tests Run

    Also tried selecting all of the tests with shift-Click but got the same result.

    "Total Run Time 0:05:03" looks suspicious - not using testsettings file and cannot find any place to specify

    Why is VS2013 not running all of the tests?

    Wednesday, May 7, 2014 8:18 PM

All replies

  • Hi,

    You said that you selected this group in Test Editor, did you work with VS2010 solution in VS2013?

    If yes, Test List Editor (.vsmdi) could be opened in Visual Studio 2012, but this feature has been deprecated and we cannot run tests from this editor. Please see: Defining Test Categories to Group Your Tests

    If your tests are in VS2013 test projects, and run tests from Test Explorer, after you run tests, whether there is ‘Not Run tests’ field in Test Explorer? You can check it.

    In order to check whether the issue is on your VS, please run those tests with mstest.exe based on this article:

    How to: Group and Run Automated Tests Using Test Categories

    In VS2013, in order to group tests, you can select one or more tests and add test methods to a Playlist and run expected tests based on playlists. For more information, please see ‘create customer playlists’ section in this article: Running Unit Tests with Test Explorer

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 8, 2014 10:13 AM
  • > did you work with VS2010 solution in VS2013?

    Sorry, Test Explorer. All the different names are confusing.

    >after you run tests, whether there is ‘Not Run tests’ field in Test Explorer?

    All of the tests not run are at the bottom of the list with a blue exclamation icon. There is no indication WHY these tests were not run. This exact problem occurs on another computer but not on a third.

    > How to: Group and Run Automated Tests Using Test Categories

    Yes, tests are grouped by category

    >In VS2013, in order to group tests, you can select one or more tests
    >and add test methods to a Playlist and run expected tests based on playlists

    Running tests in Categories or Playlists is all the same. Added all of the tests in the category to a playlist.  Run playlist.

    Is there any way to log or debug WHY a test is not run?

    Thursday, May 8, 2014 1:33 PM
  • Hi,

    I assume that you mean you planned to run 1935 tests which are in the same test category, but not all tests run, test result shows 1545 tests run moreover the total run time is 5 mins, right?

    If yes, please click one test in Not Run tests list to check whether some information will appear in Test Explorer.

    If no information, please run each test which did not run under the Not Run Tests list, whether the tests will run well?

    You said that the issue occurred on another machine but those tests run fine on the third machine, the issue is on your VS or tests. Please repair your VS. If no help, whether your tests are specfical? Please clarify it.

    In order to collect more information, please run devenv.exe /log in Run prompt to open VS and then run VS to test.  the log file is:

    %APPDATA%\Microsoft\VisualStudio\Version\ActivityLog.xml

    Please see: /Log and http://blogs.msdn.com/b/saraford/archive/2008/11/27/did-you-know-there-s-a-way-to-have-visual-studio-log-its-activity-for-troubleshooting-366.aspx

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 9, 2014 3:22 AM
  • 1) No information is displayed in Test Explorer when highlighting one of the tests not run. 

    2) Highlighted all tests not run, right-click, Run Selected Tests, all run and pass

    3) The third machine was inadvertently running the tests in x86 process.  When changed to run in x64, TEST | Test Settings | Default Processor Architecture | X64, then 1545 tests run same as other two machines.

    4) How do I attach the log?

    5) I have a deadline.  Is there some way to work on this more than once a day? 


    • Edited by megabitee Friday, May 9, 2014 1:24 PM
    Friday, May 9, 2014 1:12 PM
  • Hi,

    As I understand, you got this issue only when you run all tests as a 64-bit process, right?

    If yes, please make sure that you compiled all your test projects as Any CPU. Please see:

    How to: Run a Unit Test as a 64-bit Process

    If three machines got this issue when you runs as 64-bit process on them, then I doubt that the issue may be in your tests or VS. Please delete the .suo file in the solution directory and recompile projects as 64-bit process then run tests. If no help, please repair your VS.

    Except the Visual Studio log, please collect Test Explorer log through setting VS_UTE_Diagnostics environment variable to any value, such as 1 and restarting Visual Studio. You can set environment variables using Control Panel\System and Security\System -> Advanced System Settings -> Environment Variables. In the Environment Variables dialog, click New, enter VS_UTE_Diagnostics as variable name and 1 as variable value. Click OK to close all modal dialogs.

     Also please collect vstest.executionengine logs. Here is how to collect them: http://blogs.msdn.com/b/aseemb/archive/2012/03/02/how-to-enable-ute-logs.aspx

    For more information, please see Microsoft’s reply in this connect:

    https://connect.microsoft.com/VisualStudio/feedback/details/785030/unittestisolationexception-when-debugging-tests-using-fakes

    We can run automated tests using test categories with MSTest.exe. Please see: How to: Group and Run Automated Tests Using Test Categories

    Please try to run those tests with MSTest.exe to check whether you will get correct results.

    Best regards,  


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Amanda Zhu Tuesday, May 13, 2014 1:26 AM edit
    Monday, May 12, 2014 2:08 AM
  • >If yes, please make sure that you compiled all your test projects as Any CPU.
    That is what we did to get this problem

    > Also please collect vstest.executionengine logs
    Tried editing vstest.executionengine.clr20.exe.config, vstest.executionengine.exe.config, vstest.executionengine.x86.clr20.exe.config, and vstest.executionengine.x86.exe.config but all return "Access is denied". There is no process locking these files.  Maybe a service?

    >For more information, please see Microsoft’s reply in this connect
    I don't see anything similar to my problem.  What am I supposed to learn from this?

    Set VS_UTE_Diagnostics then reran the tests.  But cannot find any log file.  Where is the log?

    Monday, May 12, 2014 1:38 PM
  • This is taking too long. I can no longer work on this problem.  Will call tech support when time allows.
    • Proposed as answer by Amanda Zhu Thursday, May 15, 2014 9:25 AM
    • Marked as answer by Amanda Zhu Friday, May 23, 2014 5:15 AM
    • Unmarked as answer by Amanda Zhu Monday, May 26, 2014 1:42 AM
    Monday, May 12, 2014 3:04 PM
  • Hi,

    Sorry for not resolving this issue for you. Please login your machine with administrator role and then configure vstest.executionengine.exe.config. The logs will get generated in %Temp% folder with log file names of the format <ProcessName>.TpTrace like vstest.executionengine.TpTrace.log

    For Test Explorer log, it will be in the Tests pane of the Output window. To collect Test Explorer log in Visual Studio, open the Output window (View -> Output) and select Tests in its drop-down list.

    If you still can’t get any useful log information and plan to call tech support, could you post the answer here once you get one from tech support? I will close this thread temporarily.

    Thank you for your understanding. 

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.





    • Edited by Amanda Zhu Friday, May 23, 2014 5:15 AM edit
    Tuesday, May 13, 2014 1:45 AM