Build/Test Issues

ERROR (Analysis):...NullReferenceException

Started by GreenMoose on 1,690 views

[NCrunch Console Tool v4.3.0.13]


I am getting below errors on a old project I am trying to run in a TeamCity agent (docker container). Was the below error due to some bug related generic fixtures or is this a new one? I do not see this when running NCrunch in vstudio.

[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] ERROR (Analysis): A failure occurred while analysing the assembly [SnapshotComponent:Proj.Web.NonHttpIntegrationTests.NUnitTests, 32, 62753728]: System.NullReferenceException: Object reference not set to an instance of an object.
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.DiscoveredTestMember.GetDistributedCapabilities()
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.DefaultDiscoveredTestFactory. (FrameworkTest , ComponentUniqueName )
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.DefaultDiscoveredTestFactory.createTestsForFramework(Dictionary`2 discoveredTests, IEnumerable`1 tests, ComponentUniqueName testComponentUniqueName)
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.DefaultDiscoveredTestFactory.CreateDiscoveredTests(ReflectedAssembly assembly, IEnumerable`1 tests, ComponentUniqueName testComponentUniqueName)
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.TestFinder. . ()
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.TestFinder. . ()
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
[16:52:38] : [Step 16/23] [LocalAnalysisTask-100] at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker)


Thanks.

Edited

I think this issue is being caused by a problem with identifying the test fixture during discovery. I expect this issue is probably tied to the structure of your test suite. Do you think you may have any chance of figuring out how to reproduce it?
Just realized this is same as https://forum.ncrunch.net/yaf_postsm14542_Analysis-failure-for-generic-fixture.aspx , but since fix for that version is not publicly available (and our license expired 20th of Feb) I will just change the 9 involved fixtures to not be generic.
p.s. I am switching employment next month, going into the Java business instead of C#, so unfortunately I will no longer be using NCrunch except for spare time programming :( d.s.
GreenMoose wrote:
p.s. I am switching employment next month, going into the Java business instead of C#, so unfortunately I will no longer be using NCrunch except for spare time programming :( d.s.


I'm sorry to hear that. We'll miss you!

Post a reply

Log in to reply.