Container

This a hybrid app (native iOS, native Android, react native & flutter) to demo

  1. Possibility of mixed use of these mobile development technologies
  2. Integrated UI test via Detox or Appium

Conclusions

Hybriding these techs into a single app is possible.

Integrated UI tests

Detox declares to support either react native or pure native apps, but not hybird ones.

If we use native view as the first rendering view instead of react native, detox will end up in a loop waiting for react native to be loaded, which would not occur until the react native view is rendered in the app. This results in a timeout failure. The related code can be found at the entrypoint of detox starting, in which there is a function waiting for react native loading.

The demo code on detox is found in the master branch.

Appium

We followed the Getting started doc of Appium to set it up and it works nicely for hybird apps, since it takes the black-box testing strategy.

  1. We used the WebDriverIO as an client to talk to the Appium server, which can be replaced with any other REST client with better efficiency or interface, e.g. Postmant Newman

  2. To unify element finding and selecting operation, an accessibility id attribute can be supplied. Details to be found via this post.

The demo code on Appium is found in the appium branch.