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
어떤 도움을 크게 감상 할 수있다.