21

Has anyone written (or know about) a .net unit-test runner, preference to NUnit, that runs on iOS ? or do I have to roll my own ?

My goal is to execute the unit tests on the simulator or devices. So far I've seen quite a few posts / blogs on mocking monotouch.dll (but running the tests on a PC) and one answer stating the lack of such tool.

Community
  • 1
  • 1
poupou
  • 43,413
  • 6
  • 77
  • 174

2 Answers2

24

As promised here's my own solution for my problem :-) I hope it can help other people too!

EDIT

Sounds like you'd have to write a MonoDevelop add-in that serves up an API for remote NUnit runners to send data to. Not really a trivial task.

The original Touch.Unit was updated to include support for network logging (albeit not inside MonoDevelop).

EDIT #2 : A similar runner now exists for Mono for Android.

FINAL EDIT: Touch.Unit is now an integreal part of MonoTouch releases (starting with version 5.2) and does not have to be downloaded seperately.

Community
  • 1
  • 1
poupou
  • 43,413
  • 6
  • 77
  • 174
2

I've wanted the same thing myself for quite some time. I think building one is the only option...

Can't imagine porting this GUI to iOS:

I think the only reasonable solution might be to show a simple UITableView on the device/simulator with test name and red/green checkmarks, and post the full NUnit results via http to server software somewhere.

Sounds like you'd have to write a MonoDevelop add-in that serves up an API for remote NUnit runners to send data to. Not really a trivial task.

sehe
  • 374,641
  • 47
  • 450
  • 633
jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182
  • That's pretty much what I had in mind (new runner + network reporting). I started looking at NUnitLite and got some MonoTouch.Dialog code for the UI over the weekend but then it hits me I could be duplicating someone else work (while saving me a lot of time). I still hoping... but will continue coding ;-) – poupou Aug 15 '11 at 20:11
  • I think the key feature would integrating into MonoDevelop including project template, etc. Are you planning on starting an open source project for it? iNUnit would be a good ludicrous name to use... maybe iUnit... – jonathanpeppers Aug 15 '11 at 20:16
  • I'm an optimist so I'm still hoping to find an existing solution ;-) but if do anything (a bit) useful then it will be released as open source. OTOH it's a bit early to find names or plan MonoDevelop integration :-) – poupou Aug 15 '11 at 20:29