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

Notification

Icon
Error

NCrunch and xUnit Theory Display
Micah71381
#1 Posted : Wednesday, September 10, 2014 5:06:08 PM(UTC)
Rank: Member

Groups: Registered
Joined: 10/18/2013(UTC)
Posts: 27
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
I have an xUnit 1.9.2.1705 PropertyData Theory that contains a dozen or so test cases. NCrunch is able to run the theory and all of the tests, but they all show up as a single test in NCrunch, rather than a dozen or so separate tests. When I click on the test in the NCrunch Tests window, I see all of the tests show up in the output panel of the form:

Code:
Xunit.Sdk.TrueException: Assert.True() Failure
   at MyNamespace.Tests.MyClassTests.when(TestCase testCase) in C:\Users\Micah\Source\MyNamespace.MyClass\MyNamespace.MyClass.Tests\MyClassTests.cs:line 396

when(testCase: everything enabled, no include/exclude):

*** Failures ***

Exception
Xunit.Sdk.TrueException: Assert.True() Failure
   at MyNamespace.Tests.MyClassTests.when(TestCase testCase) in C:\Users\Micah\Source\MyNamespace.MyClass\MyNamespace.MyClass.Tests\MyClassTests.cs:line 396
Xunit.Sdk.TrueException: Assert.True() Failure
   at MyNamespace.Tests.MyClassTests.when(TestCase testCase) in C:\Users\Micah\Source\MyNamespace.MyClass\MyNamespace.MyClass.Tests\MyClassTests.cs:line 400

when(testCase: browser monitoring attributes disabled by default):

*** Failures ***

Exception
Xunit.Sdk.TrueException: Assert.True() Failure
   at MyNamespace.Tests.MyClassTests.when(TestCase testCase) in C:\Users\Micah\Source\MyNamespace.MyClass\MyNamespace.MyClass.Tests\MyClassTests.cs:line 400


when(testCase: attributes globally disabled):



when(testCase: all categories disabled):



when(testCase: global exclude):



when(testCase: exclude in each category):

Xunit.Sdk.TrueException: Assert.True() Failure
   at MyNamespace.Tests.MyClassTests.when(TestCase testCase) in C:\Users\Micah\Source\MyNamespace.MyClass\MyNamespace.MyClass.Tests\MyClassTests.cs:line 396


I would much prefer the tests named "when(testCase: all categories disabled)" etc. show up in the test list, and also count toward the failure counter.
Remco
#2 Posted : Wednesday, September 10, 2014 11:03:05 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.

NCrunch is reliant on Gallio for discovering and executing Xunit 1.x tests. Unfortunately, due to the design of its Xunit adapter, Gallio's reporting does not provide this level of granularity when working with theories. This means that NCrunch isn't able to differentiate between the test cases and will group them together.

From Xunit V2, NCrunch is directly integrated and does support this feature. Xunit V2 is currently in a beta state.
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.022 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download