Can't start Xunit with Visual Studio 2013 Community

I'm trying to get XUnit to work with the Visual Studio 2013 community (version 12.0.31101.00 Update 4).

I have NUnit to work with, so I thought it would be easy to get XUnit to work.

Code

using Xunit;

namespace Xunit
{
    public class Class1
    {
        [Fact]
        public void myFirstTest()
        {
            Assert.False(true);
        }
    }
}

      

I used the NuGet Package Manager to install the following.

XUnit.net - version 1.9.2

XUnit.net: Runners - version 1.9.2

I've seen videos of people running XUnit with VS2012, but none since 2013.

Any ideas?

+3


source to share


3 answers


You need to install "xunit.runner.visualstudio" as a nuget package, currently in beta, so start the package manager console:

Install-Package xunit.runner.visualstudio -Pre

      



or find it in the GUI, but select "enable pre-check" as described in the new docs .

+3


source


OK - as of today, Jan 20, 2015, I've managed to get Xunit working with the VS2013 community with the stable 1.9.2 Xunit.net and the "Visual Studio Runner 2.0 RC1" preview release.

  • 1.9.2 Xunit visual studio runner, didn't take xunit tests in Test Explorer
  • Installing 2.0RC1 Xunit.net does not allow complaining about filename / path too long.


But the combination of 1.9.2 Xunit.net and 2.0RC1 Xunit Studio Runner works fine for me. I think tomorrow! or when they release the final version of Xunit, I can replace 1.9.2 of Xunit.net with the latest one.

+1


source


this can be an option in Test-> Test Settings-> Keep running engine engine running running. If you have both MSTEST and XUNIT it has a switch issue.

Also if resharper is installed you can uncheck the boxes with unit tests via options. although this appears to be mostly with resharper 8.1

It was also discovered that it was necessary to move xunits out of the test project and even then this would hit or miss.

keyword: executor: // xunit / VsTestRunner2

0


source







All Articles