2017-11-07 9 views
0

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 

任意の助けが大きくいただければ幸いです。

答えて

1

Viktor from Bitrise。

デトックスを使用したかどうかはわかりませんが、確かに同じ「テストが終了しましたが、プロセスは存在しません」という問題については私たちのユーザーの一人が同じ問題を報告しました。

我々は一時的な仮想マシンに彼らとデバッグをしたとして、私は、このことについてできるだけ多くの情報を取得しようとしました:

おかげで、私は問題を発見したと思います!私たちの古いテストのいくつかは、新しいテストのような酵素の代わりに反応ネイティブテストレンダラーを使用していました。彼らは、ハングを引き起こしていたループアニメーションでコンポーネントをレンダリングしていました。シャローレンダリングに切り替えると、問題は解決されました。ご協力いただきありがとうございます!問題は、彼らが彼らのプロジェクトに

を反応させるのネイティブバージョンをアップグレードしたときに私が反応ネイティブの以前のバージョンでは、レンダラは、すべてのコードを実行されていなかったことを想像起こり始めたことを言及する価値も

子コンポーネントでは何かが変更され、現在は変更されています。問題のコードは無期限にループするため、ハングを引き起こしていたことは驚くことではありません。私はそれがちょうど私が知っているか、私たちのサポートをpingできないだろうならば、これは、@Danの支援を期待

;)

関連する問題