instruments -t "<Automation.tracetemplate的路径>" "<模拟器中应用的路径>" -e UIASCRIPT <js脚本的路径> -e UIARESULTSPATH <结果文件的路径> -v
例:
instruments -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" "/Users/dongyu/Library/Application Support/iPhone Simulator/7.1/Applications/7F72C095-9285-4640-88CF-78A9C08F180F/PetDemo2.app" -e UIASCRIPT /Users/dongyu/Documents/iOS/PetDemo2/uiauto/scripts/uitest.js -e UIARESULTSPATH ~/Desktop -v