iOS命令行执行instruments
来源:互联网 发布:淘宝信誉查询131458网 编辑:程序博客网 时间:2024/06/18 07:37
instruments -w {deviceId} -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate {appname} -e UIASCRIPT /Path/to/Script.js
-e UIARESULTSPATH '/Users/sohail/Developer/clients/acme/roadrunnerradar/ACMERoadRunnerRadarAutomationTests/TestResults/
实例:
instruments -w c6a91a858c33b5e00601d9aa5348302dbeadf8e5 -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate CreditProject -e UIASCRIPT /Users/joel/Downloads/Monkey2iOS.js
With every new version of Xcode the template path seems to be changed. One of the best ways find out the path of the template is instruments -s
command which would list out all the available templates.
for xcode >= 4.5
instruments -t/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/\AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \<full_path_to_application> -e UIASCRIPT <path_to_script.js> \-e UIARESULTSPATH <output_results_path>
for xcode >= 6.1
instruments -w <device ID> -t \/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/\AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate \<full_path_to_application> -e UIASCRIPT <path_to_script.js> \-e UIARESULTSPATH <output_results_path>
There a few important things to note though:
- the -w parameter is not required unless you want to run the scripts on your device. If you want to run your scripts on the simulator, simply omit this parameter from the command.
full_path_to_application is the path to your .app file that is created by your simulator. For me, the path was
/Users/fwasim/Library/Application Support/iPhone Simulator/5.0/Applications/AA6BA2E1-D505-4864-BECC-29ADEE28194D/name_of_application.app
this path might be different for anyone else depending on what iOS version are you running on your simulator. Also remember to put this path in double quotation marks.
The path_to_script.js should be the FULL PATH to where your automation script written in javascript is saved. Also remember to put this path in double quotation marks.
Lastly output results path is the path where you want to save the output results. Also remember to put this path in double quotation marks.
These were the points I had been missing on and thus was getting some of the errors mentioned above.
instruments -t mytemplate -a myapp.app
- iOS命令行执行instruments
- Xcode Instruments通过命令行执行UI自动测试的方法
- iOS instruments
- instruments命令行启动UIAutomation脚本
- iOS Automation之Instruments
- 【IOS】Instruments 使用教程
- IOS:Instruments 使用教程
- 【IOS】Instruments 使用教程 .
- 【IOS】Instruments 使用教程
- 【IOS】Instruments 使用教程
- ios Instruments 工具使用
- ios Instruments 内存泄露
- 【IOS】Instruments 使用教程
- Instruments的用法 ios
- ios Instruments 内存泄露
- IOS如何使用Instruments
- 【IOS】Instruments 使用教程
- ios Instruments 内存泄露
- HDU ACM 3572 Task Schedule 网络最大流->dinic算法
- 百度定位SDK5.x版本开发指南修正说明
- IKAnalyzer中文分词,计算句子相似度 - 两只蜗牛 - 关注生活,关注旅游 - 开源
- hdu5230 ZCC loves hacking
- Android的反编译与防止反编译
- iOS命令行执行instruments
- Mysql大小写敏感
- 【IOS】IOS开发问题解决方法索引(五)
- ubuntu_cscope
- 在Windows上使用Eclipse配置Hadoop MapReduce开发环境
- 奇葩的JS编码
- ios网络开发基础
- [转载] 陈皓——程序员技术练级攻略
- 保存当前选中的浏览模式 and 发送通知