-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: instrumentationRunnerForBundleId(instrumentationRunners, bundleId) looking for .test #832
Comments
+1 |
@yamiscott any temp solution..? I am blocked. @Team, Can we take as the priority? |
@neerajkumar-lad Only by post install patching or writing a fix. If you post install patch node_modules/detox/src/devices/android/ADB.js line 212, changing the regex from replacing '\.' with '\.' to: '\.test' with '', then it will strip the .test, thus finding the driver. |
@yamiscott This is the line i got in at 212, const runnerForBundleRegEx = new RegExp( I guess the problem is DetoxTest.java file is not starting instrumentation. What I did is, I have opened the android project in Android studio and ran DetoxTest.java and successfully executed, thus I got following line when I entered
After I ran The application launched and got pop up message app "my.project.debug isn't responding" with close the app and wait option. and finally, Execution stopped due to timeout Timeout - |
That's the line. The regex is wrong or there's something else at play that isn't obvious. Let's break it down into two bits, the bundle ID it's looking for and the regex from the instrumentation list. Sending in: So we want to search the instrumentation list to work out which to run. That brings us to the rest of that line: It should be stripping .test off the end, however it isn't. Here's what I think it should be: This will strip the .test off the end if there is one. Which will now match and as a result it will find the correct instrumentation instance. |
Hi Friends, Something interesting I found, I have setup detox android with sampleApp and I have run automation with two cases,
In case 1, two apk generate, debug and androidTest, and detox automation run fine. Case 2:
In case 2,
Interesting is I don't have to change APKPath.js file with default android apk name(app-debug.apk), update you once I changed the custome apk name(my.project.1.3.1-debug.apk) I think Detox use automation something like this,
As case 2, assembleAndroidTest build is not generated, so error throws Hope this will help people. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The issue has been closed for inactivity. |
Description
This appears to be an Android API <=25 issue
Where the problem appears to be: src/devices/android/ADB.js line 212
The above method is called with a bundle id ending in .test, there's a pointless regex statement that replaces '.' characters with '.' characters, I'm assuming this was mean to strip the .test from the end?
The instrumentation targets do not have '[yourbundle].test in them, just the regular bundle id.
eg:
instrumentation: com.app.your.test (target=com.app.your)
Meaning the regex will never match and you will get an error stating there is no instrumentation runner.
Steps to Reproduce
Follow the Android setup steps.
Detox build your android config
Detox run your android config
Detox, Node, Device, Xcode and macOS Versions
Device and verbose Detox logs
The text was updated successfully, but these errors were encountered: