Detox 5.10.0 挂在 Jest runner 上
Detox 5.10.0 hanging with Jest runner
排毒新手,试图理解为什么 package.json 的一个命令有效而另一个无效。
ReactNative 项目
排毒@5.10.0
一种排毒配置:
"jest": {
"preset": "react-native",
"setupTestFrameworkScriptFile": "./e2e/init.js"
},
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/todoApp.app",
"build": "xcodebuild -project ios/todoApp.xcodeproj -scheme todoApp -configuration Debug -sdk iphonesimulator",
"type": "ios.simulator",
"name": "iPhone X"
}
}
}
案例 1. 测试工作。
"scripts": {
"test:e2e:ios": "jest e2e"
}
案例 2. 测试不工作。
"scripts": {
"test:e2e:ios": "detox test -r jest -c ios.sim.debug"
}
测试刚挂。
案例 2 的日志尾部:
rbx
Timed: animateWithDuration:delay:options:animations:completion:
Dispatch Queue: com.apple.main-thread
send: {"type":"currentStatus","params":{},"messageId":27}
role=tester action=currentStatus (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
role=testee action=currentStatusResult (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
onMessage: {"type":"currentStatusResult","messageId":27,"params":{"state":"busy","resources":[{"name":"Timed","info":{"endTrackingDate":"Friday, January 2, 1970 at 6:12:58 PM Moscow Standard Time","object":"<NSObject: 0x604000205e80>","name":"animateWithDuration:delay:options:animations:completion:","prettyPrint":"animateWithDuration:delay:options:animations:completion:","duration":0.7256049871444702}},{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x109c7cdc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x109c7e300], width = 0x1, state = 0x001ffe9e00000300, dirty, max qos 6, in-flight = 0, thread = 0x303 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":27}}
rbx
Timed: animateWithDuration:delay:options:animations:completion:
Dispatch Queue: com.apple.main-thread
send: {"type":"currentStatus","params":{},"messageId":28}
role=tester action=currentStatus (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
role=testee disconnect (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
问题
问题是,我不能将第一种情况用于多个配置(例如 android,例如)
我做错了吗?可以请你看一下吗?
正如@Rotemmiz 所说,这是排毒 5.X 版本中的一个持续问题,应该在 6.X 版本中解决。
排毒新手,试图理解为什么 package.json 的一个命令有效而另一个无效。
ReactNative 项目
排毒@5.10.0
一种排毒配置:
"jest": {
"preset": "react-native",
"setupTestFrameworkScriptFile": "./e2e/init.js"
},
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/todoApp.app",
"build": "xcodebuild -project ios/todoApp.xcodeproj -scheme todoApp -configuration Debug -sdk iphonesimulator",
"type": "ios.simulator",
"name": "iPhone X"
}
}
}
案例 1. 测试工作。
"scripts": {
"test:e2e:ios": "jest e2e"
}
案例 2. 测试不工作。
"scripts": {
"test:e2e:ios": "detox test -r jest -c ios.sim.debug"
}
测试刚挂。
案例 2 的日志尾部:
rbx
Timed: animateWithDuration:delay:options:animations:completion:
Dispatch Queue: com.apple.main-thread
send: {"type":"currentStatus","params":{},"messageId":27}
role=tester action=currentStatus (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
role=testee action=currentStatusResult (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
onMessage: {"type":"currentStatusResult","messageId":27,"params":{"state":"busy","resources":[{"name":"Timed","info":{"endTrackingDate":"Friday, January 2, 1970 at 6:12:58 PM Moscow Standard Time","object":"<NSObject: 0x604000205e80>","name":"animateWithDuration:delay:options:animations:completion:","prettyPrint":"animateWithDuration:delay:options:animations:completion:","duration":0.7256049871444702}},{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x109c7cdc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x109c7e300], width = 0x1, state = 0x001ffe9e00000300, dirty, max qos 6, in-flight = 0, thread = 0x303 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":27}}
rbx
Timed: animateWithDuration:delay:options:animations:completion:
Dispatch Queue: com.apple.main-thread
send: {"type":"currentStatus","params":{},"messageId":28}
role=tester action=currentStatus (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
role=testee disconnect (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e)
问题 问题是,我不能将第一种情况用于多个配置(例如 android,例如)
我做错了吗?可以请你看一下吗?
正如@Rotemmiz 所说,这是排毒 5.X 版本中的一个持续问题,应该在 6.X 版本中解决。