What is recommended solution for running iOS tests in Simulator? How to run agent automatically?

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? :)

3 comments
Comment actions Permalink

Hi Wiktor,

It's strange that it worked and broke suddenly. Have you performed any changes? Which TeamCity version do you use?

0
Comment actions Permalink

Yeah, that is strange for me too. Since it is dev machine also there might be something else. Mac OS was updated to Yosemite, Xcode to 6.1.

Nevertheless running script on user login works. It's just info for others if they would be expecting this kind of behaviour.

0
Comment actions Permalink

Thank you for informing us. It looks like the problem appeared after updating to the new Mac OS version. We will check it and update our doc if needed.

0

Please sign in to leave a comment.