我使用了本网站的模板:http://blog.manbolo.com/2012/04/08/ios-automated-tests-with-uiautomation,并创建了自己的命令行来运行终端上的自动化测试。无法运行iOS UI自动化命令行
这里有一些关于我的脚本的一些有用信息:
我使用的Xcode 6.4。
我在Xcode仪器中运行了这个自动化脚本,它工作正常。
这里是我的命令行:
instruments -w 927b666816e2d4377b208a872b42a1d3xxxxxxxx -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate ConsumeriOS -e UIASCRIPT/Users/wendywang/Documents/TIO/ConsumeriOS/ConsumeriOS/ConsumeriOSTests/automationScript/LogIn.js
但我收到此错误:
2015-10-05 14:16:34.122 instruments[23330:551118] WebKit Threading Violation - initial use of WebKit from a secondary thread. Instruments Usage Error : Failed to resolve target for Instrument 'Automation' instruments, version 6.4 (57082) usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] tio-spare:~ wendywang$ ConsumeriOS -e UIASCRIPT /Users/wendywang/Documents/xxx/ConsumeriOS/ConsumeriOS/ConsumeriOSTests/automationScript/LogIn.js -bash: ConsumeriOS: command not found
我仔细检查了该
- 的UDID是正确的
- 自动化跟踪模板是在正确的道路
- 的LogIn.js文件是正确的路径
有一件事我不知道:
的ConsumeriOS是代码的名称。但是在代码中,它实际上可以生成一些应用程序。我正在测试名为Consumer的应用程序。所以我不确定是否应该将ConsumeriOS作为应用程序的名称或消费者来编写。
有谁知道它为什么会产生这个错误?谢谢!
谢谢!我掌握了它:) – munmunbb