Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running xUnit on Visual Studio for Mac

I am currently evaluating Visual Studio for Mac. And I ran into a little problem. It won't detect any of my xUnit unit tests. On the Windows version of VS, the tests are automatically picked up when I click on "Run all Tests". But with this version, it's not. Are there any instructions on how to setup xUnit to work inside Visual Studio for Mac?

Thanks for the help! ;0)

like image 462
Zorthgo Avatar asked Nov 30 '16 05:11

Zorthgo


People also ask

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.


2 Answers

[Update: 2018-04-11]

Visual Studio for Mac now has built-in support for xUnit.

[Original Post]

Ok, so for anyone searching for this. Basically Visual Studio for Mac is not currently compatible with xUnit. I spoke to the xUnit core team, and they have no plans on supporting Visual studio for Mac. You can follow the conversation HERE. I also spoke to the xamarinstudio.xunit plugin team. And they said that they are planning on supporting it if VS for Mac doesn't out of the box. But that we will have to wait a little bit to see what the requirements are. You can follow the conversation HERE

like image 198
Zorthgo Avatar answered Sep 18 '22 07:09

Zorthgo


Visual Studio for Mac now has a built in support for xUnit (Just create a new project in your solution, and under the .NET Core project type you'll see a Tests project that you can add and write tests with)

Let me know if this worked out for you

like image 42
Jonathan Perry Avatar answered Sep 18 '22 07:09

Jonathan Perry