I've been searching a lot about running unit tests via cli in macos and i find a path to achieve this but i cant't run them all.
I'm using Unity3D engine to create the solution and csproj and i need to find a way to run the tests via console. So what i did?
Running in macos i have installed mono, msbuild and nunit-console and create a simple unity project just doing some basic assert
[Test]
public void Should_Pass()
{
Assert.IsTrue(true);
}
So i build the solution using
msbuild path/to_mysolution.sln
Everything is fine by now. Then i run the tests with nunit-console pointing to the .dll
nunit-console path/to_mydll.dll
And this works!
The problem seems to be when i'm using some unity functionality i received
System.MissingMethodException : Attempted to access a missing method
My objective is running the tests without opening Unity.
I've been trying to build and tests with dotnet but cannot figure why i having these error
/usr/local/share/dotnet/sdk/2.1.4/Microsoft.Common.CurrentVersion.targets(1124,5): error MSB3644:
The reference assemblies for framework ".NETFramework,Version=v4.5" were not found.