Build/Test Issues

Simple test with test marked with black dots

Started by kcroke on 5,703 views

The NCrunch tests say they are running. The Queue says the tests are Complete (but the individual test is still running".

Also, the coverage and the tests have black dots.

Please see screen shot here:

[img=http://i.imgur.com/9CxDY.png]Screen Shot[/img]

This is the first time loading NCrunch to this solution.
Hi, thanks for posting. The screenshots here are very helpful.

With the corner indicator showing nothing is happening, and assuming that the test itself is stuck with this running status, this can only be caused by an error of some kind happening within the NCrunch engine. Most likely there is something to do with the way this test operates that is causing NCrunch to bug out. Would you be able to submit a bug report once the engine is in this state? I'd really like to look at the log file to find out why the engine is failing.

As a general bit of advice - be weary of writing tests that kick off untracked threads asynchronously. Looking at your code, I'm not 100% sure if you are doing this, though the life of a test itself is determined by the length of its execution on the main test thread. If you kick off a thread during the test and the thread is still running after the test has finished execution, you can experience issues where there is test code running outside the scope of the test ... the results can be unusual cross-test behaviour and background crashes. As a general rule, it's best to try and abstract the actual launching of the thread so that the test is entirely single-threaded .. or if this isn't possible, you can try tracking the threads created during the test and making sure you wait for them to terminate before the main thread of your test finishes execution.


Cheers,

Remco

Edited

As you can see in the test, JobManager.RunJobIfTime() is the function that executes the thread. It is not being covered in any of the tests in this example, so I don't think my threading is the problem.

Here is the bug report:
(- BROKEN LINK -)

I tried to upload the report, but it says "Check your internet connection and try again."

If you see this message, my internet connection is working.
Thanks for providing the bug report. Looking through this, it seems that something is going very wrong where NCrunch is attempting to get a list of all the types in one of your test assemblies.

Unfortunately the error is quite non-specific, so I'm wondering if you might be able to tell me a bit more about the projects you're using for testing.

Are you making use of any kind of CLR security features, native integration, custom build steps, assembly manipulation tools (i.e. IL merge, profilers, etc), or any kind of 3rd party tools or frameworks that may have an impact on the code built from your projects?

Post a reply

Log in to reply.