简体   繁体   English

如何使用命令行运行xcode UI自动化测试

[英]How to run xcode UI Automation tests using command line

I am trying to integrate UI Automation scripts with Jenkins . 我正在尝试将UI自动化脚本与Jenkins集成。 Can you please tell, how to run UI Automation Scripts using command line on specific devices. 您能否告诉我们如何在特定设备上使用命令行运行UI自动化脚本。 I am using XCode 8 . 我正在使用XCode 8

Huhu, 忽忽,

the UI Automation isn't longer support in Xcode 8. See this post: https://forums.developer.apple.com/thread/48936 在Xcode 8中不再支持UI Automation。请参阅以下文章: https//forums.developer.apple.com/thread/48936

You have to update to XCode-ui-testing. 您必须更新到XCode-ui-testing。

if you work with Xcode 7, try this: 如果你使用Xcode 7,试试这个:

  • give the complete path to the app with the .app extension, 使用.app扩展名给出应用程序的完整路径,
  • Put the DeviceID and the script into "", 将DeviceID和脚本放入“”,
  • try it with the device name, if it doesn't work. 如果它不起作用,请尝试使用设备名称。

Here a sample that works for me. 这是一个适合我的样本。

instruments -w "DeviceID" -t PATHTOTEMPLATE/Automation.tracetemplate PATHTOAPP/ConsumeriOS.app -e UIASCRIPT "PATHTOSCRIPT/UITest.js"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM