I have not been able to successfully integrate Detox with Expo on either SDK37 or 38. When launching the Detox process with iOS, Expo is reinstalled onto the sim, but the app does not launch – so the tests timeout on the Expo landing pad.
Has anyone had success running Detox on newer Expo versions? Failing that – is there any other way to perform E2E UI testing on Expo right now? Thanks.
Detox should work but you can’t use the standard Expo Client. You’ll have to build a simulator build for iOS via expo bi -t simulator and an apk for android via expo ba -t apk. We don’t currently have this documented anywhere but we plan on adding a section to help users who want to use Detox.
Thanks both of you for throwing me a bone! My team doesn’t quite have time to wait for the expo to write a guide so we would be greatly appreciate if either of you could briefly summarize the steps we’d need to take to set up detox with expo. Hell, if we figure it out we could write the guide ourselves. I’ve personally tried a few of approaches and regardless of which approach i choose it ultimately leads me into a rabbit hole of trying to debug/understand big codebases that I’m unfamiliar with.
EDIT: Just determined the issue is actually some sort of synchronization issue with our app. I had incorrectly assumed that expo was not playing well with detox. Rather, detox is waiting on some action in our app to finish indefinitely. Would still be happy to write the expo + detox guide to save others from this headache. @adamjnav please let me know if this is something that the team has already started internally and if not I’ll submit a pr.
I got Detox working with iOS, but for Android I get this error: detox[38852] ERROR: Error: '/Users/myuser/androidTest/app/app-androidTest.apk' could not be found, did you run './gradlew assembleAndroidTest'?
I have the same issue with Android. Did you ever figure this out?
UPDATE: I set testBinaryPath to the same value I had for binaryPath. That got rid of that error, but now I’m getting the error Error: Failed to parse APK file: /data/local/tmp/detox/Application.apk