4

I'm trying to launch an iOS app tests through command line, from a Jenkins Job.

If I launch the command in my user's console, works ok, the command is:

xcodebuild test -scheme demoIC -destination 'platform=iOS Simulator,id=E6954360-11D9-49E0-9008-A8EE6BA1ACFC'

It's supposed Jenkins uses 'jenkins' user for launching jobs, so I have done:

su - jenkins

And the when I launch the same command, I got an error:

2015-02-16 18:21:41.215 xcodebuild[3952:1303]  iPhoneSimulator: Could not launch simulator: -10810
Cœur
  • 37,241
  • 25
  • 195
  • 267
rtrujillor
  • 1,162
  • 1
  • 12
  • 23
  • It seems to be that I cannot launch a process with GUI from jenkins when is installed as a Launch Daemon. How can I switch to a Agent Daemon if the agent is in the same machine? – rtrujillor Feb 17 '15 at 15:53
  • I faced with the same problem. Did you find a solution? – Pavel Osipov Apr 15 '15 at 14:02
  • Hi Pavel, one workaround is to install a Jenkins Agent in the same machine as the master, and configure the problematic job (the one who test the app) to be launched in the agent. I use JNLP as the execution method for the agent ,with this base root : /Users/Shared/Jenkins/MACOSAgent – rtrujillor Apr 16 '15 at 11:05
  • Thanks, @rtrujillor. I solved that problem starting Jenkins manually from iTerm via VNC after each system reboot (it doesn't happen often). – Pavel Osipov Apr 17 '15 at 09:20

1 Answers1

0

You can give a try to this, it worked for me:

xcrun xcodebuild -workspace $Project_Name.xcworkspace -scheme "$Build_Test_Scheme" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.2.2' -derivedDataPath './output' test
Igor Escodro
  • 1,307
  • 2
  • 16
  • 30
  • output here is the directory I put all my test reports. – Lateblumer88 Dec 09 '19 at 10:21
  • Welcome to Stack Overflow! Please read [what this site is about](https://stackoverflow.com/about) and "[How to answer](https://stackoverflow.com/questions/how-to-answer)" before asking a question. – tobsob Dec 09 '19 at 10:42