Nathan
Nathan

Reputation: 7699

Running xunit.console.runner on OSX

Have xunit tests for a Portable Class Library (which is for a xamarin forms project). I run the xunit tests in visual studio and using the xunit.runner.console on windows, and they work.

I try the same under OSX and I get this:

mono xunit.runner.console.2.2.0/tools/xunit.console.exe bin/Debug/AppTests.dll -nunit reports/xunit_reports.xml
xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
System.IO.FileNotFoundException: Could not load file or assembly 'AppTests' or one of its dependencies

Now bin/DebugAppTests.dll exists.

Can I somehow find out which dependencies the runner cannot find? Or is there a different way to run the xunit tests on osx from the command line?

Upvotes: 6

Views: 764

Answers (1)

Novikov
Novikov

Reputation: 720

instead xunit runner use dotnet https://xunit.github.io/docs/getting-started/netcore/cmdline

dotnet test PATH_TO_TEST_PROJECT.csproj

I checked it with dotnet 2.1.301

Upvotes: 1

Related Questions