Open noomorph opened 1 year ago
@noomorph Are you sure that this is the right approach? Technically, we don't support multiple apps yet, and all the more so - device.selectApp()
starts by terminating the currently selected one. I understand that this would not imply supporting multiple apps per se, but I'm a bit concerned that without hard-terminating all left-over apps in the beginning of each test (i.e. the alternative approach) there would in fact remain other numerous edge-cases that we don't know how to handle, besides the the session ID.
@d4vidi, well, it is part of a code that will be refactored heavily sooner or later. We could live with it as fine as without it.
What happened?
This report comes from the engine team at Wix. They have a very specific use case – they use explicit bundle IDs for installing, launching, terminating, and uninstalling apps like this:
This bug arose on the boundary of two adjacent test suites:
com.wix.app1
com.wix.app2
The previous suite did not terminate the app – and by the way, technically, you are not obliged to. The next suite launched another app with the same
-sessionId <UUID>
parameter as the previous launch.That created a situation when:
app1
was in the background, still connected to the Detox server insessionId=<UUID>
app2
tried to connect to it using the same ID.What was the expected behaviour?
The apps should have been using different
sessionId
s.Was it tested on latest Detox?
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.1.0 Node version: 14.x Test-runner (select one): jest
Detox logs
No response
Device logs
No response
More data, please!
No response