Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio 2010 Test Runner run XUnit?

Is it possible to use the integrated Visual Studio 2010 test runner to run other frameworks (Xunit, NUnit etc.) besides MSTest?

Does anyone know?

like image 444
Thomas Avatar asked Apr 19 '10 07:04

Thomas


People also ask

What test runners can be used to test xUnit net tests?

If you have Visual Studio Community (or a paid-for version of Visual Studio), you can run your xUnit.net tests within Visual Studio's built-in test runner (named Test Explorer).

Is xUnit compatible with .NET framework?

It's an open source unit testing tool for . Net framework that's compatible with ReSharper, CodeRush, TestDriven.Net, and Xamarin. You can take advantage of xUnit.Net to assert an exception type easily.


1 Answers

No but you can add an external tool. Go to Tools | External Tools... and click Add

Title: xUnit Test

Command: xunit.console.exe (set to full path to console test runner)

Arguments: $(BinDir)$(TargetName)$(TargetExt)

Initial directory: $(BinDir)

Click Use Output Window

Click OK. This adds the xUnit Test command to the Tools menu.

You can then create a shortcut key to making running the external tool easier. eg: Ctrl +T

like image 195
MW_dev Avatar answered Sep 29 '22 03:09

MW_dev