2017-11-07 12 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(); 
    }); 
}) 

워크 플로우 세그먼트 :

(이것은 단지 스크립트 단계입니다) 생략 불필요한 물건으로 -

package.json (이것은 나중에 .yml 파일에 포팅 될 것입니다).

"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

빅토르 (Bitrise).

사용자 중 한 명이 동일한 문제를보고했습니다.하지만 해독제를 사용했는지는 확실하지 않지만 확실하고 동일한 "테스트가 완료되었지만 프로세스가 존재하지 않습니다"라는 문제는 확실합니다. 우리가 임시 가상 머신에서 그들과 함께 디버그처럼

나는 이것에 대해 가능한 한 많은 정보를 얻을려고 :

덕분에, 내가 문제를 발견 한 것 같아요! 우리의 오래된 몇 가지 테스트는 새로운 테스트와 같은 효소 대신 반응 네이티브 테스트 렌더러를 사용했습니다. 그들은 반복 애니메이션을 사용하여 구성 요소를 렌더링하는 중이었습니다. 얕은 렌더링으로 전환하면 문제가 해결되었습니다. 당신의 도움을 주셔서 감사합니다! 또한

가치

이 문제는 그들이 내가 기본 반응의 이전 버전에서, 렌더러가 모든 코드를 실행하지 않는 것을 상상

자신의 프로젝트에 기본 버전의 반응 업그레이드 할 때 발생하기 시작했다고 언급 자식 구성 요소에서,하지만 뭔가가 변경되었습니다 지금은 않습니다. 문제의 코드는 무기한으로 반복되므로 정지가 발생하는 것은 놀라운 일이 아닙니다.나는 그냥 알려이나 우리의 지원을 핑 (ping)하게하지 않는다면이, @Dan 도움이되기를 바랍니다

)