I am trying to do End-to-End automation for an Unity IOS project. My aim is to automate the continuous integration process with attaching UIAutomation scripts as post build action. So from the time when a user do check his code in SVN and till we get test result of automation, everything will be automated. Jenkins is installed on my local apple machine and running on local host. Now I have automated build process through jenkins and at other end I have my shell script ready which will run C# scripts on build output. When I use my shell script as post build action then I get error in running instrument command(written inside shell script) but if I run this script manually through terminal then it works fine: FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL Please let me know how can I run these commands successful.Help!