[NUnit v2.6.2]
[Bug Report Ref: D-1767]
After picking up an 1 year old legacy project, NCrunch fails to analyze 1 test project with error below:
NCrunch: This project was built on server '(local)'
NCrunch: The tests in this project were discovered on server '(local)'
An error occurred while analysing this project after it was built: System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.TestExecution.DiscoveredTestMember.GetDistributedCapabilities()
at nCrunch.TestExecution.DefaultDiscoveredTestFactory.(FrameworkTest , ComponentUniqueName )
at nCrunch.TestExecution.DefaultDiscoveredTestFactory.createTestsForFramework(Dictionary`2 discoveredTests, IEnumerable`1 tests, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.DefaultDiscoveredTestFactory.CreateDiscoveredTests(ReflectedAssembly assembly, IEnumerable`1 tests, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker)
I have isolated it to a generic fixture, and NCrunch fails analysis when I have this fixture in the project, and succeeds if I remove the generic arguments:
using NUnit.Framework;
[TestFixture(TypeArgs = new[] { typeof(string) })]
internal class SomeFixture<TOne>
{
[Test]
public void SomeTest()
{
}
}
Thanks.