Search code examples
build-processmstestxunit

TFS 2013 build with xUnit and MsTest both


Does TFS 2013 using (tfvcTemplate.12.xaml) support multiple test runners? We have two unit test projects in our solution (MsTests and XUnit). I would like the build to run xUnit tests as well as MsTests.

Projects:

  • MySolution.UnitTests (mstests)
  • MySolution.UnitTests.xUnit (xunit tests)

I have VS2013 installed on the build server.

Looks like MsTests are run fine, but not xUnit. The results show only MsTests and no xUnit tests. enter image description here

How would I specify xUnit to be also executed?

enter image description here


Solution

  • You just need to add the xUnit runner Nuget package to your xUnit project. I think this is the right package:

    https://www.nuget.org/packages/xunit.runner.visualstudio/2.1.0