How to run ios simulator for ui Automation test on jenkins
Asked Answered
D

1

7

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.

Diva answered 18/3, 2015 at 10:41 Comment(0)
R
1

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:

Riband answered 22/4, 2015 at 0:49 Comment(1)
You can use github.com/stisti/jenkins-app to run jenkins from Desktop sessionFlight

© 2022 - 2024 — McMap. All rights reserved.