Skip to content
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

Facilitate testing React Native apps in debug mode on Android #3494

Closed
Tracked by #3348
noomorph opened this issue Jul 19, 2022 · 4 comments
Closed
Tracked by #3348

Facilitate testing React Native apps in debug mode on Android #3494

noomorph opened this issue Jul 19, 2022 · 4 comments

Comments

@noomorph
Copy link
Collaborator

noomorph commented Jul 19, 2022

Describe your idea

Currently, Detox does not reverse TCP port of Metro bundler, which is confusing.

We could do a better job for our AndroidDriver implementation upon launchApp:

  • if process.env.RCT_METRO_PORT is defined, call device.reverseTcpPort(...)
  • otherwise, call device.reverseTcpPort(8081) – that's the default port.

Definition Of Done

Rollout the config in Wix

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 7, 2022

@noomorph I'm largely against predisposing particular traits of usage by our users. This sounds more like a thing to introduce as an optional configuration; Preset in mind - might be a better idea if it comes out-of-the-box from that direction, rather than from Detox itself.

@d4vidi d4vidi changed the title Facilitate testing React Native apps in debug mode on Android (WIP) Facilitate testing React Native apps in debug mode on Android Aug 7, 2022
@noomorph
Copy link
Collaborator Author

noomorph commented Aug 8, 2022

@d4vidi you might remember that the alternative approach was to define in app configuration the list of ports to reverse:

({
  type: "android.apk",
  binaryPath: "...",
  reversePorts: ['tcp:8081'] // or [8081] or { 8081: 10000 } or { 'udp:1000': 'udp:2000' } or something like that
})

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 11, 2022

Yes, that is true indeed! Didn't we agree upon that?
If so, would androidReversePorts make a better option?

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 29, 2022

@noomorph did you happen to do anything in regards?

@noomorph noomorph changed the title (WIP) Facilitate testing React Native apps in debug mode on Android Facilitate testing React Native apps in debug mode on Android Sep 26, 2022
@d4vidi d4vidi assigned noomorph and d4vidi and unassigned jonathanmos Oct 3, 2022
@d4vidi d4vidi closed this as completed Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants