I am running Visual Studio on Mac (Preview 5, latest) and I am trying to get unit testing with Xunit working.
I created a new project for .NET Core -> Tests which creates the following sample code
using System;
using Xunit;
namespace SMASHDOCsTests
{
public class UnitTest1
{
[Fact]
public void testFoo()
{
return;
}
}
}
I am able to compile the code properly however I can not execute the tests.
It always complains with "Internal error: unable to run tests, test discovery failed".
How can I track this error down or resolve it?
My current version of Visual Studio for Mac is (v7.0.1.24) -- this is how I resolved the issue with the internal warnings:
Update the package nugget (located in fileTree sidebar)
Follow the instructions on this page and install the extension. Note the exception for mac:
This let's me run my tests and gives me feedback in the UI: