E2Eテストではdetox、継続的インテグレーションではBitriseを設定しました。デトックステストが終了していません
非常に簡単な初期テストスイートをセットアップしましたが、何らかの理由でテストが完了した後にが完了しません。
init.js
require('babel-polyfill');
const detox = require('detox');
const config = require('../package.json').detox;
before(async() => {
await detox.init(config);
});
after(async() => {
await detox.cleanup();
});
firstTest.spec.js
describe('Example',() => {
beforeEach(async() => {
await device.reloadReactNative();
});
it('should have welcome screen', async() => {
await expect(element(by.id('UniqueID'))).toBeVisible();
});
})
ワークフローセグメント:
(これは単なる スクリプトステップです)(これは後で.ymlファイルに移植されます)
package.json - 省略すべての不要なもので。
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/AlarmApp.app",
"build": "xcodebuild -project ios/AlarmApp.xcodeproj -scheme AlarmApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 8"
},
"ios.sim.release": {
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/AlarmApp.app",
"build": "xcodebuild -project ios/AlarmApp.xcodeproj -scheme AlarmApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 8"
}
}
}
Bitriseはテストを正常に実行し、私のローカルマシンで実行することができます。そのため問題はDetoxにあります。
テストは合格しますが、ハングするだけです。私は、ログファイルにそれを見ることができていますよう
detox.cleanup()
関数が呼び出されます:
2017-11-07 16:23:02.802 AlarmApp[15771:1271275] Crash handler setup started.
2017-11-07 16:23:02.805 AlarmApp[15771:1271275] Crash handler setup completed.
2017-11-07 16:23:02.805 AlarmApp[15771:1271275] Enabling accessibility for automation on Simulator.
2017-11-07 16:23:04.427 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: login
2017-11-07 16:23:04.714 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-11-07 16:23:04.795 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-11-07 16:23:04.821 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue>
2017-11-07 16:23:05.276 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: ready
2017-11-07 16:23:05.287 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: reactNativeReload
2017-11-07 16:23:05.293 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-11-07 16:23:05.293 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue>
2017-11-07 16:23:05.402 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: ready
2017-11-07 16:23:05.409 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: invoke
2017-11-07 16:23:05.836 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: invokeResult
2017-11-07 16:23:05.844 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: cleanup
2017-11-07 16:23:05.845 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: cleanupDone
任意の助けが大きくいただければ幸いです。