This tutorial is part of Build Xamarin project with Xamarin post. It assumes all projects have been build including Unit test projects. Another assumption is the use of Mac OSX to run all commands.

Run Unit tests

Ensure the following command exists:


Run this script to look for you Unit tests binary and run the tests: (if you have a different name for your Unit test project just replace it on the command that searches for the binary)

TEST_BINARY=$(find . -name "UnitTests.dll" | grep bin)
/usr/local/bin/nunit-console $TEST_BINARY

You should see the following output:

This is quite a simple way to automate your unit tests with a simple script.

Another way to do this is to use Cake. In the next following weeks I’ll be covering in depth how to use Cake to build your projects, restore nuget packages, install Xamarin components and run unit tests