locked
Unit Tests - vstest.executionengine.x86 RRS feed

  • Question

  • Hello,

    I've recently created a unit test project in VS2012, when we debug the tests (without breakpoints) the tests run and pass. 

    If we then run the tests without debugging, the tests run and pass the first time.

    If I try to run the tests again, it seems to just hang.

    I've tried the same steps with a new unit test project, vstest.executionengine.x86 just never seems to close (when running and not debugging). This has caused a few problems when we're running integration tests with dependencies on things like sqllite databases. (Closing vstest.executionengine.x86 via Task Manager after the test seems to fix the problem, which is why I've posted it under this)

    My colleagues are also having this issue, has anyone else encountered this issue? Is there an easy fix (other than moving to NUnit or something similar)?

    Regards,

    James

    Wednesday, November 21, 2012 5:04 PM

Answers

  • Thanks very much for your reply's!

    I've done as Jesse suggested and posted a bug on connect.

    There does seem to be a thread waiting to finish, running tests through the command line or via Resharper's test runner solves the issue for now.

    We use SqlLite in some of our test projects but this issue happens even on a brand new unit test project/solution with no modifications to the UnitTest1.cs.

    Thanks again for all your help!

    James

    Thursday, November 22, 2012 10:11 PM

All replies

  • Does it hang when you run it from the commandline?

    Can you attach a debugger, break the hanging process to see what it's waiting for?


    My blog: blog.jessehouwing.nl

    Wednesday, November 21, 2012 9:54 PM
  • Hello James,

    Jesse’s suggestion is useful. You can try that and tell us the result.

    If we then run the tests without debugging, the tests run and pass the first time.

    If I try to run the tests again, it seems to just hang.

    You create a simple unit test and then run it in VS2012, will this issue occur?

    If yes, maybe there is anything wrong with your VS. You can try to repair/reinstall it.

    If this issue occurs only for this particular unit test project, I suggest that you can try this test project to another machine to check the result. Maybe the issue is related to your test project.

    In addition, you can try the following steps to see if they help:

    a) Try to run devenv /ResetSettings (in command prompt) to eliminate the related potential settings problem.

    b) Try disabling Add-ins (e.g. “Tools” | “Add-in Manager”) or run “devenv.exe /SafeMode”.This can eliminate the possibility that third party Add-ins or packages are causing problems.

    c) Try to reboot the operating system to safe mode. This can help to isolate whether any other applications are interfering with Visual Studio. Note that some features (like IIS) are not available under safe mode. Please check whether this can be applied or not.

    If they don’t help, try running "devenv /setup, devenv /resetskippkgs, devenv /resetuserdata" in command prompt.

    Best regards,


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

    Thursday, November 22, 2012 6:43 AM
    Moderator
  • 

    Hi Guys, 

    Thanks for your replies.

    Amanda: I tried all the steps you listed and nothing seemed to work. I've also tried the tests on the another developers machine and he had the same issue as I did. (New UnitTest Project)

    The exe doesn't hang from the command line as it doesn't seem to get executed, if it is, it's closing itself before I can see it.

    When I attach the debugger to it and break, It gives me the following output:

    Call stack with external code

    mscorlib.dll!System.Threading.WaitHandle.WaitAny(System.Threading.Waithandle[] waitHandles, int millisecondstimeout, bool exitContext)
    MicrosoftVisualStudio.TestPlatform.TestExecutor.Core.dll!Microsoft.VisualStudio.TestPlatform.TestExecutor.TestExecutorMain.Run(string[] args)
    vstest.executionengine.x86.exe!Microsoft.VisualStudio.TestPlatform.TestExecutor.ServiceMain.Main(string[] args)

    Thanks again for your time,

    James



    Thursday, November 22, 2012 3:27 PM
  • I suggest filing a bug on connect. When you have the debugger attached, save a dump file of the process and attach that to the bug. If possible share your solution or a solution that reproduces the problem. Here in the forums we can suggest quite a bit, but nothing beats the actual product team having a detailed look.

    A few more things to try:


    My blog: blog.jessehouwing.nl

    Thursday, November 22, 2012 9:08 PM
  • Thanks very much for your reply's!

    I've done as Jesse suggested and posted a bug on connect.

    There does seem to be a thread waiting to finish, running tests through the command line or via Resharper's test runner solves the issue for now.

    We use SqlLite in some of our test projects but this issue happens even on a brand new unit test project/solution with no modifications to the UnitTest1.cs.

    Thanks again for all your help!

    James

    Thursday, November 22, 2012 10:11 PM
  • Hello James,

    Glad to see this issue has been resolved now and thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions. I will mark your reply as answer.

    Best regards,


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

    Friday, November 23, 2012 2:47 AM
    Moderator