- Visual Studio For Mac Debug Nunit Tests
- Visual Studio For Mac Os X
- X Code
- Running Nunit In Visual Studio
Document your code
Every project on GitHub comes with a version-controlled wiki to give your documentation the high level of care it deserves. It’s easy to create well-maintained, Markdown or rich text documentation alongside your code.
The easiest way to get started is to install the NUnit Templates extension for Visual Studio.It will add project templates for the various Xamarin platforms. For more general information, see Testing Xamarin Projects using NUnit 3. Getting started. Using F5 in Visual Studio to debug unit tests Instead of executing NUnit runner and attaching to the process using Visual Studio, it's better to configure yout test project to start the NUnit test runner and debug your tests.
Sign up for free See pricing for teams and enterprisesThe easiest way to get started is to install the NUnit Templates extension for Visual Studio. It will add project templates for the various Xamarin platforms.
For more general information, see Testing Xamarin Projects using NUnit 3.
Getting started
In your solution;
- Add new test projects to your solution. These project types are included in the NUnit Templates Extension
- NUnit 3 Test Project (Android)
- NUnit 3 Test Project (iOS)
- NUnit 3 Test Project (Universal Windows)
- Write your unit tests in this project, in a portable project, or in a shared project, referencing the project with the tests.
- Build and run the tests on your device or emulator

If you tests are in a separate portable project, note that:
- You need to add that assembly to the
NUnit.Runner.Appin the startup code
- Your portable project must reference the same NUnit Framework version as your nunit.xamarin version, e.g. if using nunit.xamarin 3.01, reference nunit.framework 3.01.
Visual Studio For Mac Debug Nunit Tests

The startup code for each platform is as follows;
Visual Studio For Mac Os X
Android
MainActivity.cs
iOS
AppDelegate.cs

Windows 10 Universal
MainPage.xaml
MainPage.xaml.cs
X Code
App.xaml.cs
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0