Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:01:44+00:00 2026-06-11T06:01:44+00:00

Is there actually a good way to unit test MonoTouch projects using NUnit and

  • 0

Is there actually a good way to unit test MonoTouch projects using NUnit and the MonoDevelop test runner?

I know there is the official MonoTouch unit tests project type, but running tests within the simulator isn’t the way I want to go. For now I want to run tests with the MonoDevelop test runner, later everything should work with Jenkins (CI).

I know the limitations about UI specific code, so everything I want to test has nothing to do with MonoTouch itself, it’s all about business logic placed within separete projects.

By adding tests to MonoTouch Library type projects, I am getting System.IO.FileNotFoundException’s as described here: http://ben.phegan.name/index.php/2011/02/28/monotouch-and-unit-testing/

By using a separate NUnit test project, I can’t reference my system under test, because its project type is of type MonoTouch library project, which, of course, has an incompatible target framework (vMonoTouch).

So, there isn’t any real alternative to Touch.Unit, is it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:01:45+00:00Added an answer on June 11, 2026 at 6:01 am

    Is there actually a good way to unit test MonoTouch projects using NUnit

    Touch.Unit

    and the MonoDevelop test runner?

    Not really. MonoTouch projects depends on monotouch.dll which needs to execute under iOS (not OSX). So there’s a need for the runner to execute on the simulator or devices.

    Now there’s a few misconceptions in your question:

    later everything should work with Jenkins (CI).

    Touch.Unit is already used with continuous builds / integration servers (as long as they are running OSX) using both the iOS simulator and/or devices. Details are available here.

    I know the limitations about UI specific code,

    Touch.Unit is not about UI testing. In fact it’s pretty bad at UI testing (but that’s beside the point).

    Touch.Unit is a test runner that execute on iOS. That allows you to use MonoTouch / iOS API inside your own tests (it could be UIKit, but it could be StoreKit, GameKit, *Kit, any Foundation class… it’s a quite large world).

    So, there isn’t any real alternative to Touch.Unit, is it?

    Yes. If your business logic is well isolated and does not depend on monotouch.dll then you should be able to build it either as:

    • a non-MonoTouch project (different project, same sources), i.e. linked with the regular framework; or
    • link to the sources from within your unit test assembly (which links to the regular framework);

    That classic nunit test assembly would then be a regular framework project and will be able to run from the default NUnit runner or from within MonoDevelop unit test runner.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are ways, but is there actually a good way? At the
is there any good way to test a controller with rspec? Actually, I'm testing
I want to know if there is any good way of programmatically producing C#
If you are using Java or JavaScript, is there a good way to do
Is there a good way to detect when the ObjectContext changes are actually committed?
Is there any way I could run the following 'logical code' to actually work?
Is there a straight forward way to view the SQL command text actually executed
Is there a way to check weather a user actually clicked the like button
Is there a good way to do multiple substitutions for aliasing a command? For
Is there a good way to store a Python dictionary in the datastore? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.