NUnit allows Advanced scenarios to dynamically generate tests which can be used to create Advanced tests scenarios.
NUnit has a class named TestSuite to which
Test objects can be added, and those
Test objects represent a unit test to be executed by the runner.
As of now, generating Test objects that way will result in a NullReferenceException when analyzing the Tests assembly (see stacktrace below)
I wanted to know if it was something easy to support, and if it wasn't maybe there was a way I could still make it work with NCrunch by adapting my own code to make NCrunch happier.
For a solution highlighting the described behavior, you can check out the following branch on github :
https://github.com/Testeroids/Testeroids/tree/Triangulation_Engine(Make sure you use the branch "Triangulation_Engine" ; commit hash 11d853acaaa02b1ebb6a4c6bb92726c5594166b9 is supposed to have 24 tests running, not 19. Those 24 tests can be seen with the following Visual Studio plug-in installed on VS2012 :
http://nunit.org/index.p...TestAdapter&r=2.6.2)I hope you can point me in the right direction.
Also : If you have a look at the source code, you will find that similar scenario could be achieved using the [Values] syntax, but I would like to avoid it, since it is not very AAA friendly.
Cheers,
Fabio
Stacktrace :
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.Frameworks.NUnit.NUnitDynamicTestFinder.#=qWR61I54cNOVvLQI7JDhFxQcH2EIQU9rfyhToZcuCtxM=(Test #=q2R6Zs$CiQArRCCDLznzr6Q==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.#=qwWUh6CGWn6kcFpwVm5aDVn42a6EuSt_ERp5PNlHFZMlNWX9xRb9a$RCkbr6e0kQJ(Test #=qGmoPXL9_9hc3MZSTb$mhqA==, ILogger #=qTaxlovabbSH6KPJOjpeRvQ==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.#=q8hV7vbHQxWaTniMICT$JZ1Sq76VBngiVPYT7HNOVGsk=(Test #=q9yCTao4mLnZVC15SDtxnww==, ILogger #=q_sRU9hW1KX5Rvgj_rmfRTQ==, List`1 #=qdKV1uIbovZtZXPzwaaY95Q==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.#=q8hV7vbHQxWaTniMICT$JZ1Sq76VBngiVPYT7HNOVGsk=(Test #=q9yCTao4mLnZVC15SDtxnww==, ILogger #=q_sRU9hW1KX5Rvgj_rmfRTQ==, List`1 #=qdKV1uIbovZtZXPzwaaY95Q==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.#=q8hV7vbHQxWaTniMICT$JZ1Sq76VBngiVPYT7HNOVGsk=(Test #=q9yCTao4mLnZVC15SDtxnww==, ILogger #=q_sRU9hW1KX5Rvgj_rmfRTQ==, List`1 #=qdKV1uIbovZtZXPzwaaY95Q==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.#=q8hV7vbHQxWaTniMICT$JZ1Sq76VBngiVPYT7HNOVGsk=(Test #=q9yCTao4mLnZVC15SDtxnww==, ILogger #=q_sRU9hW1KX5Rvgj_rmfRTQ==, List`1 #=qdKV1uIbovZtZXPzwaaY95Q==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.#=q8hV7vbHQxWaTniMICT$JZ1Sq76VBngiVPYT7HNOVGsk=(Test #=q9yCTao4mLnZVC15SDtxnww==, ILogger #=q_sRU9hW1KX5Rvgj_rmfRTQ==, List`1 #=qdKV1uIbovZtZXPzwaaY95Q==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitDynamicTestFinder.FindFrameworkTestsUsingRuntimeInvoke(TestPackage package, ILogger logger, List`1 tests)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, String assemblyFilePath, String[] referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks)