First you can set (e.g. inside AppDelegate.cs) the test runner
AutoStart property to
true to ensure the unit tests execution will start their execution once the application is loaded.
runner.AutoStart = true;
You can also use the runner
TerminateAfterExecution property to end the application once all tests have been executed. Note that this is kind of bad (using a private API) – i.e. don’t do this in your own applications because Apple won’t accept such behavior in it’s AppStore.
runner.TerminateAfterExecution = true;
Finally you can also override the default Console.out (or optional network) logger by providing your own TextWriter to be used.
runner.Writer = new TcpTextWriter ("hostname", 16384);
What do you gain from the above ?
You can automate the build and deployment of several applications. E.g. several runner with different tests or several runners with the same tests but different configurations – like LLVM or SGEN builds.
Once deployed to the device you can quickly run every test runner app by clicking on each of them (since you’ll get back to springboard once execution is over) while every log is being sent to (and kept in) your main computer.
That’s not a fully automated setup, the building/deploying bits needs more love, but that as much as Touch.Unit can do by itself. Feel welcome to share tips on how you can automate the rest of the process 🙂
There’s really not much more I want to add to Touch.Unit (TODO is pretty empty, few FIXME), I think it will serve it’s purpose well. OTOH I’m thinking of one more blog post and/or screencast to show how it can be used (wrt other tools, not itself).