In hopes of being able to use NCrunch with xUnit v2 I downloaded NCrunch 1.11.0.10 today to try out the xUnit 2 support.
Two big problems:
1. I am unable to debug tests. Right-click debugging from the NCrunch Tests window appears to do nothing and right clicking on a code coverage line and choosing break into or debug also appears to do nothing.
2. While I do see the coverage X marker showing me which line fails, clicking on it does nothing and right clicking on it and choosing "show exception details" does nothing. If I look at the NCrunch Tests window I see the following code block and clicking on the link to source/line works correctly. I can only assume that this is a problem with NCrunch correctly interpreting xUnit output?
Code:
Xunit.Sdk.EqualException: Assert.Equal() Failure
Expected: 1
Actual: 2
at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in c:\TeamCity\buildAgent\work\74856245f07a90f0\src\xunit.assert\Asserts\EqualityAsserts.cs:line 35
at Xunit.Assert.Equal[T](T expected, T actual) in c:\TeamCity\buildAgent\work\74856245f07a90f0\src\xunit.assert\Asserts\EqualityAsserts.cs:line 19
at Test.ClassTests.test_method() in D:\Source\Test\Test\Class.cs:line 13
On the plus side, xUnit theories now show up, which is really what I have been waiting for in nCrunch/xUnit integration. Assuming the above two bugs are fixed (or workarounds provided) then I think I'll be very happy with nCrunch 1.11.
Here is the class I have been testing with for documentation of the above bugs:
Code:
public class ClassTests
{
[Fact]
public void test_method()
{
Assert.Equal(1, 1);
Assert.Equal(2, 2);
Assert.Equal(1, 2);
}
[Fact]
public void when_()
{
Assert.Equal(1, 1);
}
[Theory]
[InlineData(true)]
[InlineData(false)]
public void theory(Boolean value)
{
Assert.True(value);
}