I can't seem to get NUnit tests to run on our Mac build agent using VSTS
Here are the build steps I am using in VSTS:
Note, Test assemblies is disabled because the Mac build agent does not have VSTest.exe. In the options menu, there is no way to completely remove the need for VSTest so I cannot use that step on the mac build agent.
Is there a way to run NUnit tests in the MSBuild step?
Things I have tried:
As a last resort, I can add a shell script to run nunit-console on the mac build agent, but I would prefer to avoid that. The reason the build agent needs mac os x is because we're building an iOS and Android app with Xamarin.
Screenshot of the references and NuGet packages in VS:
2
Build output:
Test assemblies are created, but I can't get them to run
The instruction for how to use MSBuild tasks for NUnit can be found here: NUnit3 or NUnit. You need to update your project file to import the tasks according to this: Get Started and then add the NUnit MSBuild tasks into your project file. And you can also add an Exec Task in your project file to call NUnit console to run the NUnit test.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With