How to run UIAutomation on simulator using Xcode bots - strange behaviour

820 Views Asked by At

I would like to run UIAutomation tests on simulator using Xcode bots. I add this command to past-actions script launched after ARCHIVE phase in xcode:

instruments  -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" /Users/ktos/appliation.app -l 10000 -v

Xcode bots log followinng error:

instruments[6702:507] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7fc053b3a310 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
Instruments Trace Error : Failed to start trace.

When I use exactly the same command in my terminal, on the same computer the instruments runs simulator without any problems. Do you have any idea what could be wrong ?

1

There are 1 best solutions below

0
On

It may also be possible that Instruments is running in the background. Do a $ps -A and check and kill it.