I'm trying to get XUnit to work with Visual Studio 2013 Community (Version 12.0.31101.00 Update 4).
I've got NUnit to work so I thought it would be simple to get XUnit to work.
The code is
using Xunit;
namespace Xunit
{
public class Class1
{
[Fact]
public void myFirstTest()
{
Assert.False(true);
}
}
}
I've used the NuGet Package manager to install the following.
XUnit.net is version 1.9.2
XUnit.net: Runners is version 1.9.2
I've seen videos of people running XUnit with VS2012 but no one with 2013.
Any ideas?
You need to install the "xunit.runner.visualstudio" as a nuget package, currently in beta, so run in package manager console:
or look for it in the GUI, but do select "include prerelease" as explained in the new docs.
OK - as of today, 20 Jan 2015, I have managed to get Xunit working on VS2013 Community with the stable 1.9.2 Xunit.net and the pre-release "Visual Studio Runner 2.0 RC1".
But the combination of 1.9.2 Xunit.net & 2.0RC1 Xunit Studio Runner works well for me. I guess tomorrow! or whenever they release the final version of Xunit, I can replace 1.9.2 Xunit.net with the latest.
it may be the option under Test->Test Settings-> Keep test execution engine running. If you have both MSTEST and XUNIT, it has a problem switching.
Also if resharper is installed you can Uncheck enable unit tests through the options. though this seems to be mostly with resharper 8.1
Also found had to move xunits out of Test project and even then this is hit or miss.
keyword: executor://xunit/VsTestRunner2