Detox
Detox copied to clipboard
(WIP) Facilitate testing React Native apps in debug mode on Android
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_PORTis defined, calldevice.reverseTcpPort(...) - otherwise, call
device.reverseTcpPort(8081)– that's the default port.
@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 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
})
Yes, that is true indeed! Didn't we agree upon that?
If so, would androidReversePorts make a better option?
@noomorph did you happen to do anything in regards?