Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running xunit.console.runner on OSX

Tags:

macos

xunit

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?

like image 942
Nathan Avatar asked Nov 09 '22 01:11

Nathan


1 Answers

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

like image 149
Novikov Avatar answered Nov 28 '22 13:11

Novikov