Reputation: 113
I'm trying to run a UI Automation script from jenkins :
instruments -w 'iPhone 6 (8.1 Simulator)' \
-t '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate' \
'myAppName' \
-e UIASCRIPT 'some_path' \
-e UIARESULTSPATH 'some_other_path'
But I'm getting an error and the simulator won't start
Waiting for device to boot...
2015-03-18 10:29:04.064 instruments[13082:64124] [MT] iPhoneSimulator: Could not launch simulator: -10810
I does work when running from the command line under the jenkins user.
Any Help would be much appreciated, thanks.
Upvotes: 7
Views: 2134
Reputation: 104
It's probably related to the fact, that you're not running your Jenkins master or Jenkins slave in a desktop session, meaning that it does not have access to your GUI (e.g. it can't launch anything that pops-up a window or a dialog).
So you either need to start the Jenkins master manually or allow it to access the GUI if it's run as a service (not sure how to do this on Mac OS). Another way would be to run a Jenkins slave on the same machine, started via JNLP.
The following Stackoverflow issues deal with the same error message/code and suggest similar solutions:
Upvotes: 1