命令行运行 iOS UI Automation 测试及问题

命令行运行 iOS UI Automation 测试及问题

Running iOS instruments UI automation test cases via commandline and the issues

1. instruments 5.0.1 通过命令行运行 iOS UI automation 测试

instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/bankofchinashanghai/Library/Developer/Xcode/DerivedData/Swiftsync-fmhfzrmvbqjjuefqseeishayuuun/Build/Products/Debug-iphonesimulator/SwiftSync.app -e UIASCRIPT/Users/bankofchinashanghai/Documents/swiftsync_dev_ios/test.js -e UIARESULTSPATH /Users/bankofchinashanghai/Documents/swiftsync_dev_ios/testResult/

绿色: 测试模板的位置(可在终端通过命令:find /User -name " Automation.tracetemplate" 查找
黄色: 测试.app的位置(见下图)
命令行运行 iOS UI Automation 测试及问题_第1张图片
粉红: 测试脚本的位置
紫红: 测试结果的目录

2. 问题出现了
Xcode 6.1 带的 instruments 6.1 同样的方法,在终端 命令行运行测试, 不报错,也不执行测试,也没有错误日志
研究很久不知道啥问题,感觉很是坑爹。
instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/***/Library/Developer/Xcode/DerivedData/CloudStorage-gzxlltnatrjndxeblbcvingkoqli/Build/Products/Debug-iphonesimulator/Store\ \&\ Share.app -e UIASCRIPT “/Users/***/Documents/StoreShare_iOS_Test/debug1.js” -e UIARESULTSPATH “/Users/***/Documents/StoreShare_iOS_Test/testResults”

instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/***/Library/Developer/CoreSimulator/Devices/07F2CEAD-3639-4B25-BEDB-E25927D752FA/data/Containers/Bundle/Application/2A96B485-4A94-4681-9FE8-4A91368BECEF/Store\ \&\ Share.app -e UIASCRIPT /Users/***/Documents/StoreShare_iOS_Test/debug1.js -e UIARESULTSPATH /Users/***/Documents/StoreShare_iOS_Test/testResults

见图:




你可能感兴趣的:(ios,UI,命令行,automation,IOS测试,instruments,执行测试)