We’ve been playing around with the new MonoTouch NUnit test project, which is quite nice.
Several of these tests we already run on Windows in CI software, and we print alot of stuff on the console to see what went wrong during the tests.
If we build and run these tests for MonoTouch, and view the console in XCode’s organizer they look pretty ugly:
Feb 20 10:34:57 unknown UIKitApplication:com.ourcompany.ourapp[0xab78][8329] <Notice>: [Our usually pretty rainbows and unicorn console output here]
Is there a way to cleanup this output in iOS? It would be nice to at least replace “unknown” with something more meaningful, or remove it and UIKitApplication altogether.
Also, we don’t mind to somehow call NSLog instead of Console.WriteLine if it will fix this.
I think the easiest way, that would not require changes to your existing tests, is to:
Use the optional network logger. That will send every test results to a socket server, separating them from other logs coming from iOS devices; and
Call
Console.SetOutwithTouchRunner.Writeras a parameter (in AppDelegate.cs). This should (untested right now 😉 log every existing write you have to the console into the network logger.