Im writing automated tests for iOS using UIAutomation. In my setup code (javascript) I use the performTaskWithPathArgumentsTimeout method to call the "curl" command to hit a URL.

target.host().performTaskWithPathArgumentsTimeout("usr/bin/curl", ["http://TEST123/iPhoneTestSupport/Data/RemoveAllData"], 30);

This works fine in the tests when I run the tests manually through the Instruments UI, however this doesn't work when I run the tests through the Instruments command line. The error I get is "launch path not accessible". The user running through the command line as the same one as through the UI.

Any help would be appreciated. Thanks

有帮助吗?

解决方案

I was missing the starting forward slash from the path. This was causing the error. I changed it to the code below and this resolved the issue.

target.host().performTaskWithPathArgumentsTimeout("/usr/bin/curl", ["http://TEST123/iPhoneTestSupport/Data/RemoveAllData"], 30);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top