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

Notification

Icon
Error

Can NCrunch be configured to work with Concordion?
qujck
#1 Posted : Sunday, March 22, 2015 6:09:14 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/19/2014(UTC)
Posts: 17
Location: United Kingdom

Thanks: 9 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

I'm having a go with Concordion. The tests themselves are built on top of NUnit and can be configured to run with Visual Studio/TestDriven.NET/NUnit Test Adapter/ReSharper. I've followed the instructions for NUnit as outlined here and have installed TestDriven.NET. TestDriven.NET can run the tests but NCrunch reports the following

Quote:
An error occurred while analysing this project after it was built: System.NullReferenceException: Object reference not set to an instance of an object.
at NUnit.Core.NUnitFramework.IsAddinAvailable(String name)
at NUnit.Core.NUnitFramework.ApplyCommonAttributes(Attribute[] attributes, Test test)
at NUnit.Core.Builders.TestAssemblyBuilder.BuildTestAssembly(Assembly assembly, String assemblyName, IList fixtures, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at nCrunch.Module.NUnit.Integration.NUnitDynamicTestFinder.FindFrameworkTestsUsingRuntimeInvoke(TestPackage package, ILogger logger, List`1 tests, Factory testNameFactory)
at nCrunch.Module.NUnit.Integration.NUnitTestFramework.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, TestFrameworkDescription[] frameworks, ComponentUniqueName testComponentUniqueName)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks, ComponentUniqueName testComponentUniqueName)


Is there some trick I'm missing or some other way to get this to work with NCrunch?
Remco
#2 Posted : Sunday, March 22, 2015 9:50:56 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

NUnit addins aren't officially supported by NCrunch because the range of different test structures these addins can produce make it impossible to foresee how they will operate or how to handle them. NUnit v2 was not designed to be used as a service library by external runners such as NCrunch, and as such it doesn't provide a purpose-built runner API that can completely abstract all of this away. NCrunch also imposes a number of other constraints over the way in which tests are discovered and executed, making it impossible to know which addins will work and which ones won't.

Gert Jansen has a blog post describing how to use NCrunch with AutoFixture (an NUnit addin which does work under NCrunch). This may give you some useful tips on how to load the addin - https://gertjvr.wordpress.com/2013/10/02/howto-get-autofixture-nunit2-working-with-ncrunch/. I'm afraid that on this subject I can't be any more help than this - you're largely on your own here.


Cheers,

Remco
qujck
#3 Posted : Sunday, March 22, 2015 10:04:50 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/19/2014(UTC)
Posts: 17
Location: United Kingdom

Thanks: 9 times
Was thanked: 2 time(s) in 2 post(s)
Thanks for the reply - I found that link in the forums and worked through it and got past the problem of the error.

Package Manager Install

PM> Install-Package NUnit.Core -version 2.6.3

Add references to

nunit.core & nunit.core.interfaces

And define a class like this in the Concordian project

Code:

public class AddIn : Concordion.NUnit.Addin.ConcordionTestFixture
{
    public AddIn() : base(typeof(object))
    {
    }
}



This configuration stops the error but NCrunch does not run the Concordian tests (standard unit tests are still fine) and TestDriven.NET stops running the tests!
Remco
#4 Posted : Sunday, March 22, 2015 10:53:12 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
qujck;7097 wrote:
This configuration stops the error but NCrunch does not run the Concordian tests (standard unit tests are still fine) and TestDriven.NET stops running the tests!


Sorry, this was the unfortunate result that I was expecting.

Likely the only way to solve it would be to redesign NCrunch's NUnit adapter to do integration-by-proxy into Concordian. In some ways this could be considered a new test framework for NCrunch. You're welcome to request it as a feature if you like.
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.038 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download