`
huangqinqin
  • 浏览: 357992 次
  • 性别: Icon_minigender_2
  • 来自: 福州
社区版块
存档分类
最新评论

Mac系统下eclipse不能正常执行ios测试用例

    博客分类:
  • Ios
 
阅读更多

 问题:使用InstrumentDriver框架做ios自动化测试时,eclipse不能正常执行ios测试用例,每次执行printElementTree时都会超时,如下图所示:



 

分析:eclipse找不到设备。测试项目中athrun.properties文件中的isRunSimulator的值为true(实际上应该为false),导致InstrumentDriver框架中的runTests.sh文件最终执行的命令是:

instruments  -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D instrumentsDriver /Users/qinhuang/Library/Developer/Xcode/DerivedData/TaoTest-crxfytdmxwvbavfwuazuwlgpjuxi/Build/Products/Debug-iphoneos/TaoTest.app -e UIASCRIPT /Users/qinhuang/InstrumentDriver/CSRunner.js -e UIARESULTSPATH /Users/qinhuang/InstrumentDriver/log/ -v

 

而实际上应该为:

instruments -w udid           -t  /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D instrumentsDriver /Users/qinhuang/Library/Developer/Xcode/DerivedData/TaoTest-crxfytdmxwvbavfwuazuwlgpjuxi/Build/Products/Debug-iphoneos/TaoTest.app -e UIASCRIPT /Users/qinhuang/InstrumentDriver/CSRunner.js -e UIARESULTSPATH /Users/qinhuang/InstrumentDriver/log/ -v

 

 

解决方法:将测试项目中athrun.properties文件中的isRunSimulator的值改为false

  • 大小: 205.3 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics