首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >等待模拟器启动120秒时超时

等待模拟器启动120秒时超时
EN

Stack Overflow用户
提问于 2014-11-20 17:10:58
回答 3查看 5K关注 0票数 11

看起来Teamcity代理(TC版本是9.0EAP)无法通过测试外壳脚本运行iOS Simulator

我使用的是Build Step: Command Line,它运行Custom Script并将参数传递给它。Teamcity代理通过使用外壳脚本../bin/mac.launchd.sh在Mac Yosemite10.10上启动。

生成日志中的错误:

代码语言:javascript
复制
[12:33:24][Step 2/2] 2014-11-20 11:33:25.421 xcodebuild[28083:289783]  iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
[12:33:24][Step 2/2] 
[12:33:24][Step 2/2] Testing failed:
[12:33:24][Step 2/2] Test target app-tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1. If you believe this error represents a bug, please attach the log file at /var/folders/sz/1lfcb1354xggcnd04_9j5kc40000gp/T/com.apple.dt.XCTest-status/Session-2014-11-20_11:31:25-P1Pjwd.log)
[12:33:24][Step 2/2] ** TEST FAILED **

我的用于测试的shell脚本:

代码语言:javascript
复制
xcodebuild \
    -sdk iphonesimulator8.1 \
    -destination "name=iPad Air,OS=8.1" \
    -configuration Debug \
    -project "$PROJECTPATH" \
    -scheme app-tests \
    CONFIGURATION_BUILD_DIR="$BUILDPATH" \
    clean test \
    | xcpretty -tc -r junit --output "$BUILDPATH/junit.xml"

我也尝试了这个question的解决方案,但它对我没有帮助。

EN

回答 3

Stack Overflow用户

发布于 2015-03-26 04:43:25

这个问题已经在评论中得到了回答,这里还有一个苹果论坛的链接来讨论它,AFAIK,它仍然是这样的情况,除非苹果改变它

https://devforums.apple.com/message/1040016#1040016

票数 0
EN

Stack Overflow用户

发布于 2021-12-01 15:51:46

如果有人仍然面临此错误,您可以使用simulatorStartupTimeout在功能中设置所需的超时。

在java中:

代码语言:javascript
复制
DesiredCapabilities caps = new DesiredCapabilities();
...
caps.setCapability("simulatorStartupTimeout", 5 * 60 * 1000); // 5mn
...

请参阅https://github.com/appium/appium-xcuitest-driver#simulator

票数 0
EN

Stack Overflow用户

发布于 2016-01-06 03:54:16

您的自定义脚本可能会花费太长时间才能完成。我在构建阶段添加了一个自定义脚本,让它休眠5000秒,从而复制了这个问题。

票数 -2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27035637

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档