I am currently using Instruments via a bash script to initiate the command-line interface to start up runs of the Automation plug-in.
With 4.2, this worked well en
The user your script runs as has to be authorized to use the developer tools. You can do this two ways:
Add the user to the _developer group:
sudo dscl . append /Groups/_developer GroupMembership scriptusername
Use the DevToolsSecurity command line tool
Keep in mind that for the UIAutomation instruments to work properly, the user you are invoking Instruments from will also need to be a user that can start a window server (i.e. run the UI) - and will have to be logged in to a window server when UIAutomation runs.
These two things are two of the four or five secrets to using UIAutomation with Jenkins.