wix/Detox

Controlling Detox Relaunch behaviours in between running tests

harsh25jai opened this issue · 2 comments

Description

I am facing issues in controlling detox behaviour in between running test cases.

For Ex:-

I have role-based login implemented, to test these from single test case file (login.test.jsx) I want to relaunch detox when jumping from 1 test case to another but I don't want this for all the test cases present in the file so can't use beforeEach.

I am currently using device.launchApp() after finishing the required test.

Next Issue is I want my next file (dashboard.test.jsx) should have contained the app state and does not require login again, but after finishing each test case file, detox autmatically reinstalls the app and does not allow to maintain app state.
I have already done a lot of research on this to implement test case using --reuse, device.reloadReactNative, etc...

If possible please create simpler indi-direct methods to controll detox behaviours in more dynamic way.

Thanks

Your environment

Detox version: v20.25.6
React Native version: v0.70.3
Node version: v20.17.0
Device model: Pixel 5
OS: Android 14
Test-runner (select one): jest

Also if possible please run react-native bundler by default when running detox test's in debug as its required and close as soon as test's are finished.