Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Test status shows test running forever but no processing in the queue
areicher
#1 Posted : Thursday, September 21, 2017 11:36:48 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/13/2012(UTC)
Posts: 2
Location: United States of America

Thanks: 1 times
Hello,

I've been having a regular problem with running tests under NCrunch since adding some XUnit tests using the LightBDD library: Test indicators in test window and in VS status bar show that the tests are running (forever) but the processing queue is empty. It's intermittent in that sometimes it doesn't happen, but most of the time it does.

I have both MSpec (these are working) and XUnit tests with LightBdd (these are not). Other runners (Resharper, VS) aren't exhibiting any obvious problems.

I have also just submitted a bug report to provide additional info.

Thanks,
Aaron
areicher
#2 Posted : Wednesday, December 13, 2017 6:54:49 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/13/2012(UTC)
Posts: 2
Location: United States of America

Thanks: 1 times
Any suggestions here? Anything I can do to provide more information than the logging (which I submitted with my initial bug report)? I love NCrunch, and I am also very happy (otherwise) with my test framework setup. However, NCrunch is not providing me the feedback I need to determine whether this is a test setup problem, a bug in NCrunch, etc...
Remco
#3 Posted : Wednesday, December 13, 2017 9:44:23 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,974

Thanks: 664 times
Was thanked: 781 time(s) in 743 post(s)
Hi, sorry that your request slipped my net. I've taken a look at the bug report you submitted, and this appears to be a compatibility issue with LightBDD:

System.InvalidOperationException: FeatureCoordinator of LightBDD.XUnit2.Implementation.XUnit2FeatureCoordinator type is already installed
at LightBDD.Core.Execution.Coordination.FeatureCoordinator.Install(FeatureCoordinator coordinator)
at LightBDD.XUnit2.LightBddScopeAttribute.SetUp()
at LightBDD.XUnit2.Implementation.Customization.TestFrameworkExecutor.RunTestCases(IEnumerable`1 testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions)
at Xunit.Sdk.TestFrameworkExecutor`1.RunTests(IEnumerable`1 testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions)
at nCrunch.Module.XUnit2.Integration.XUnit2FrameworkRuntimeEnvironment.<>c__DisplayClass3_1.<RunTests>b__3()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackUnreliableActivity(String name, Action activity)
at nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackUnreliableActivity(String name, Action activity)
at nCrunch.Module.XUnit2.Integration.XUnit2FrameworkRuntimeEnvironment.<>c__DisplayClass3_0.<RunTests>b__1()
at nCrunch.TestExecution.TestExecutionMonitor.PerformMonitoredTestExecution(Action testExecutionAction)
at nCrunch.Module.XUnit2.Integration.XUnit2FrameworkRuntimeEnvironment.RunTests(TestTaskOutput output, TestExecutionMapSet testMapSet, TestExecutionParameters parameters, IIpcMessageProcessor ipcMessageProcessor)
at nCrunch.TestExecution.TestRunnerThread.()

It looks like LightBDD attempts to install itself into Xunit every time the tests are run, with no check for pre-installation. This is a big problem for a runner like NCrunch, where the test framework is often called to execute tests multiple times.

Because all of this is handled internally within LightBDD/Xunit, there is no way this problem can be fixed in NCrunch. I recommend raising it with the LightBDD devs.

To work around this, you can set your Test process memory limit to '1'. This will cause NCrunch to recycle the test process after every individual batch of tests, so that Xunit will only be told to run tests once per process instance. Note that doing this will cause serious loss in performance under NCrunch.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.025 seconds.