3

I recently run into problems when running all my unit tests at once.

I can debug them and run my tests seperate without problems, but when running them all together, the test-run keeps hanging half way through.

This happens:

  1. "Run all tests in Solution"
  2. The first tests parses without problem (slower then usual though)
  3. At some point it gets stuck. Nothing fails, no exceptions, VS just stops running the pending tests.
  4. When stopping the test-run it gets stuck again, and I need to restart VS to abort the test-run.

Normally I would expect a bug in my code, but I haven't made any changes to the code beeing testet since last succesful test-run. The only thing I did was run Performance Wizard - Cuncurrency profiling.

It always stops the same place, when removing some tests from the run it stops a new place (still without actually entering any leftover tests).

I have no clue what is causing this. But seems like I'm having problem with a VS setting rather then a code Error.

Any suggestions? Do Performance Wizard change any settings that might have influenced the way test should be run?

System details: Windows 7 Ultimate 64-bit, Visual Studio 10 Premium

2 Answers 2

1

This sounds like a concurrency issue. It seems that one test changes the testenvironment in such a way that another test runs into a deadlock. When you remove some tests, the test run order is changed and some other tests get stuck.

So I would look for a concurrency issue regarding your test environment/externall dependencies.

Sign up to request clarification or add additional context in comments.

1 Comment

this appears to me to be a bug/concurrency issue within devenv.exe (there is no process isolation afaict) - the main thread hangs waiting for a lock (related to drawing the test results window i suspect) and the ide dies.
1

I can't really explain why this works, but it solved the problem!

I reversed the '.csproj' file to an earlier version, in one of the projects that had been in 'contact' with the Performance Wizard, and now my tests works.

ALSO Be aware of that Performance Wizard can change the solution configurations from 'DEBUG' to 'RELEASE' mode in some cases. This was not the case for me, but have been a pain for some of my colleagues.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.