Build/Test Issues

Execution issues

Started by Rimokatolik on 6,030 views

I got NCrunch building projects fine. Now, even though vstest can run all tests fine inside VS (Test window), more then half of them fail when run by ncrunch with message:

NCrunch was unable to retrieve a meaningful result from this test due to an unexpected error - was the execution process terminated?

What to look for? How does ncrunch run tests?

Thank you
Hi, thanks for posting.

This is a generic error that NCrunch will give you in a situation where it tries to execute a test, but the runner refuses to execute it. This can happen if a test within the run does something that causes the test runner process to terminate. It can also happen as a result of internal/integration problems in NCrunch around its utilisation of the test framework.

Which test framework are you using? Are you able to identify any specific tests that seem to cause this problem?
We are using mstest and I am trying this on VS2015. Many tests are failing, currently out of 267 tests 175 are reported as failing in ncrunch, though some will pass when I choose Run selected test in new task runner process.
I think it's likely that there is a specific test causing this problem. I suggest selectively running the tests in groups until you can work out which test (or tests) are doing this. MSTest supported under NCrunch is emulated rather than integrated, so this won't be an integration problem - it's likely to be something inside the test/production code that is tearing down the process, perhaps as the result of a stack overflow, out of memory exception, Process.Exit, unmanaged issue, etc. If you can identify which test is causing the problem, it may be possible to debug into it and isolate the issue.

Another option could be to run all the tests in NCrunch with a debugger attached, then see if the debugger catches any unusual events.

Post a reply

Log in to reply.