TeamCity is being set up on Mac Mini. It's booted when system boots up (via LaunchDaemons). All fine here. The problem is agent on the same machine.
If you want to perform iOS tests in the Simulator you need to have ability to run GUI apps (tests does not run from ssh for example). For that reason agent cannot be run from LaunchDaemons.
1) I started using /Library/LaunchAgents/ to start an agent automatically when certain users logins. Mac is configured to auto login this user. That worked well for some time and kaboom out of the blue. Compliation is fine on agent but tests are not executed and just stuck. Looks like simulator cannot be run.
2) I switched to other solution how to start agent. I setup machine to auto login certain user on boot. After login script ./bin/agent.sh run is being run (as decribed here: http://stackoverflow.com/questions/26788718/unable-to-run-app-in-simulator-from-teamcity-build-agent/26788810#26788810). The script is being wrapped in application using Automator and run on login (as described here: http://stackoverflow.com/questions/6442364/running-script-upon-login-mac/6445525#6445525). This works well.
What is preferred solution to start agent to perform iOS tests in Simulator? What do you use at JetBrains? :)