Remco;8051 wrote:Sorry - I need to bombard you with a few questions here to fully understand what's happening:
Not a problem, that's why I'm here. I'd like to get to the bottom of this strange behavior and get to a point where I trust NCrunch just works.
Remco;8051 wrote:- Do the test results themselves (not the coverage) in the Tests Window seem correct? i.e. do the passing tests pass, failing tests fail, etc
Yes.
Remco;8051 wrote:- Does this seem to be specific to one solution, or to all solutions?
So far just this solution. Not to make things more complicated and I don't know how it would be related but this code previously existed in another (much larger) solution and that solution never experienced these problems. I only have about 3 NCrunch projects thus far and this is the only one behaving poorly.
Remco;8051 wrote:- Which test framework are you using, and which version?
xUnit v2.1.0
Remco;8051 wrote:- Is NCrunch able to debug any of the tests showing random coverage?
Interesting. No, it cannot. In the bad state, the lines with white markers show no tests covering the lines (even though there is at least one). When I find a green marker and try to "Break into first covering test at this line." the debugger starts up and exits quickly, no breakpoint hit.
Remco;8051 wrote:- When the problem appears, do you notice any failures inside the Processing Queue Window?
No failures in the Processing Queue. However, looking closely, it shows that there is a "Run 1 Test" from the single test xUnit based test project, then it builds the 3 assemblies (.csproj code being tested, .csproj not being tested that is in the .sln, and the .csproj that is the test project) then the queue has "Run 50 Tests".
Also interesting is that the first "Run 1 Test" says the test itself took .0002 seconds but the whole Run took 2.109 seconds. That lines up with what I see. NCrunch starts up, build+run, shows green, then build+run again and shows green again.
Actually, on subsequent tries, I see the time all spread around. This may be nothing.
No errors here.
Remco;8051 wrote:- Are you using any code that is run at the start of every test run? (i.e. NUnit SetUpFixture)
I do have a static constructor on the base class for all the tests. It adds some classes to Trace messaging (for error reporting). I commented that code out but was able to reproduce the error.
Remco;8051 wrote:- Try deleting the _NCrunch_Solution_v2 directory with the engine shut down. Does this resolve the problem?
I "shut down" the engine by Disabling NCrunch. There is a different way you want me to stop it, let me know. Deleting the folder does resolve the issue. I hope I won't have to do that all the time...
What else can I provide to help?