Daily Usage Issues

NCrunch Tests window fails to update its icons

Started by Kaerwek on 13,093 views

Hi,

Tests run, pass or fail, and nothing left in Processing Queue, yet Ncrunch Test window fails to update with correct Symbol. All points to that NCrunch is finished with it's work, but I still see the darned Timer symbol:

External image

Ncrunch version 3.12.0.15

Edited

And this happens irrespective how I run tests. Both when NCrunch runs because of impacted tests, and both when I right click that test group and Run Tests.
This is probably an internal exception. Would you be able to submit a bug report after you see this? The log file may yield some useful information.
Thanks for sending through the bug report. Was NCrunch enabled when you sent this? The log file was blank, which suggests the engine was either completely crashed out or otherwise disabled.

Edited

Huh?!

NCrunch is sure enabled. I can do all the normal stuff I do without any issue.
Alternatively, can you check your Processing Queue for failed tasks? If a task has blown up, there should be an exception trace available there.
If you're receiving OutOfMemoryExceptions in the NCrunch engine process itself, then this would likely be because of one of the following:
1. NCrunch is set to run using an x86 process host and the resource demands by the engine have exceeded the 32-bit memory limit.
2. NCrunch is set to run its engine inside the IDE and the IDE is overloaded (happens easily under VS2017 with other packages installed).
3. Your machine is out of physical memory and swap space.

I recommend making sure you have NCrunch set to run in an x64 process host.

Edited

I restarted Visual Studio, and put the "Use CPU Architecture" from "Autodectect" to "x64".

It seems that on Restart of Visual Studio, the icon issue disappeared. I think it's related to the habit of mine to let the machine just idle on lock at all times.

I'll keep an eye out for that for now.
Oh and I keep having the Processing Queue window open. Most often it's empty, i.e. once it's done, I never see any outright failing lines there.
I'm not sure if the most recent bug report with this issue was yours, but in the likely event that it is, it contained a useful stack trace:

System.Exception: Unknown DataRow parameter type: System.RuntimeType
at nCrunch.Module.MSTest.Integration.MSTestResolvedTest.convertStringToType(String stringValue, String typeName, Type parameterType)
at nCrunch.Module.MSTest.Integration.MSTestResolvedTest.DecodeAndResolve(ReflectedAssembly assemblyContainingTest, String encodedTest)
at nCrunch.Module.MSTest.Integration.MSTestTest..ctor(MSTestNames names, ReflectedAssembly assembly, ReflectedType fixtureType, PendingTest pendingTest, MSTestInterceptingContext testContext, Boolean considerInconclusiveTestsAsPassing)
at nCrunch.Module.MSTest.Integration.MSTestFixture.<>c__DisplayClass2_0.<.ctor>b__0(PendingTest t)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at nCrunch.Module.MSTest.Integration.MSTestFixture..ctor(MSTestNames names, ReflectedAssembly assembly, TestName fixtureTest, IList`1 tests, MSTestInterceptingContext testContext, Boolean considerInconclusiveTestsAsPassing)
at nCrunch.Module.MSTest.Integration.MSTestRunner.runTestsWithinAssembly(IList`1 testsToRun, TestTaskOutput testOutput)
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackUnreliableActivity(String name, Action activity)
at nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackUnreliableActivity(String name, Action activity)
at nCrunch.Module.MSTest.Integration.MSTestRunner.RunTests(IList`1 testsToRun, TestTaskOutput testOutput)
at nCrunch.TestExecution.TestExecutionMonitor.PerformMonitoredTestExecution(Action testExecutionAction)
at nCrunch.TestExecution.TestRunnerThread.()


This is a hole in NCrunch's MSTest DataRow support. Somewhere in your test project you're making use of a DataRow with an unusual parameter type that NCrunch can't seem to handle. If you can get me the signature for the test that's causing it (unfortunately the log doesn't tell me which one), I should be able to investigate further.
[DataTestMethod]
[DataRow(typeof(bool), typeof(ICheckboxPropertyViewModel))]
[DataRow(typeof(Color), typeof(IColorPropertyViewModel))]
[DataRow(typeof(float), typeof(IStepperPropertyViewModel))]
[DataRow(typeof(int), typeof(IStepperPropertyViewModel))]
[DataRow(typeof(string), typeof(IInputFieldPropertyViewModel))]
public void Given_VariableOfType_When_CreateProperties_Then_ResultingPropertyViewModelIsOfGivenType(Type variableType, Type propertyViewModelType)
So... Color is System.Windows.Media.Color.

The rest of the interfaces are our own.
Yes, Color would definitely do this.

Does this work for you outside of NCrunch?

I'm not sure if it's possible to get this kind of thing working under NCrunch, since it would involve the test's meta structure consisting of a user type (a bad thing when it comes to test uniqueness/identification). But the error can certainly be improved.
Yes, the tests pass fine in the CI builds.
I submitted another bug report. One of those cases where I write multiple tests after each other, and at some point NCrunch just fails to properly update the status of some of the tests.

The test clearly passes, at least in Debug mode, but it has Dark green breadcrumb, Green timer symbol, and state 'Running (Passed last run)'
Would you be interested in trying the build below? I've attempted to implement a fix for this problem. Note that you'll also need to set your 'Framework Utilisation type for MSTest' setting to 'DynamicAnalysis'.

http://downloads.ncrunch.net/NCrunch_Console_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_Console_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.13.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.13.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.13.0.1.zip
The [DataRow(typeof(Color)] case works now! Thanks.

Did you do you attempt to do something about that other issue?

I'll keep an eye out for if the symbols not updating issue starts appearing again.
Kaerwek wrote:
Did you do you attempt to do something about that other issue?


From what I could establish in the reports you submitted, these looked to be tied to the same thing (exceptions thrown during test discovery/execution). Are you seeing any problems with the new build?
It sure seems much more stable now. It seems to refresh the statuses correctly, haven't checked it very deeply, but earlier every now and then it seemed to report things wrong.
Kaerwek wrote:It sure seems much more stable now. It seems to refresh the statuses correctly, haven't checked it very deeply, but earlier every now and then it seemed to report things wrong.


Please do let me know if you manage to pin down any problems. As far as I know, all results reporting in this build should be stable now for your use case.

Post a reply

Log in to reply.