Reputation: 33
I'm trying to combine Instruments UIAutomation with the CI by Jenkins.
In the Jenkins project's configurations I defined a call a script:
sh buildAndTest.sh
That all it does is to call the uitest
#!/bin/sh
make uitest
uitest is defined inside Makefile, and it makes the call to Instruments:
/usr/bin/instruments -t pathToTemplate/MyTemplate.tracetemplate pathToSimulator/Library/Application\ Support/iPhone\ Simulator/5.1/Applications/a_very_long_name/Main.app
This code works in the terminal and when I call "make uitest". It doesn't work when Jenkins executes the script, and the console outputs:
Instruments Usage Error : (null) make: * [uitest] Error 254 Build step 'Execute shell' marked build as failure Finished: FAILURE
Any ideas how to integrate these two?
Upvotes: 1
Views: 2579
Reputation: 5588
I just made it and it was a bit painfull.
instruments -t ~/Desktop/test1.tracetemplate __YOUR_BUILD_PATH__/_YOUR_APP_.app
Works for me. Tell me if you have any trouble
Upvotes: 1
Reputation: 1484
Another reson could be you are giveing respective paths. Replace it with full qulified paths if any.
Upvotes: 0
Reputation: 6501
Ensure that the Jenkins slave agent is running as a user of the system AND that the system is logged into the desktop. If the desktop isn't visible, UI automation will fail.
Upvotes: 0