【发布时间】:2021-11-26 23:50:29
【问题描述】:
成功构建,但我怀疑 .detoxrc 中的 binaryPath 有问题?
- 反应原生:0.64.1
- 排毒:18.22.1
.detoxrc.json
{
"testRunner": "jest",
"runnerConfig": "e2e/config.json",
"skipLegacyWorkersInjection": true,
"apps": {
"ios": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/myappname.app",
"build": "xcodebuild -workspace ios/myappname.xcworkspace -configuration Release -scheme myappname id=ED0F3373-A57D-481B-86DA-D87007C00F85 -sdk iphonesimulator"
}
},
"devices": {
"simulator": {
"type": "ios.simulator",
"device": {
"type": "iPhone 12"
}
}
},
"configurations": {
"ios": {
"device": "simulator",
"app": "ios"
}
}
}
config.json
{
"maxWorkers": 1,
"testEnvironment": "./environment",
"testRunner": "jest-circus/runner",
"testTimeout": 5000,
"testNamePattern": "**.spec.js",
"reporters": ["detox/runners/jest/streamlineReporter"],
"verbose": true
}
在 iOS 模拟器中运行的 react-native 应用程序。 detox test -c ios 导致:
detox[72935] 错误:[APP_UNREACHABLE] Detox 似乎无法连接到测试应用程序! 暗示: 测试应用程序可能过早崩溃,或者在设置连接时遇到了问题。 请参阅我们的故障排除指南,了解详细信息:> https://github.com/wix/Detox/blob/master/docs/Troubleshooting.RunningTests.md#tests-execution-hangs
【问题讨论】:
标签: react-native detox