Testing Your React Native App With Expo & Appium

Colin Wren
The Startup
Published in
6 min readAug 14, 2020

--

An example of Appium driving the Android Emulator to run an automated drag and drop test within the Storybook React Native framework

At the start of July I decided to bite the bullet and take a run at building my own app, JiffyCV. I had built a number of React Native apps for others but this was going to be all mine and so far it’s been an incredibly rewarding experience.

I started the project by doing some user research and then used that to build a series of mockups in Figma to carry out usability testing on the solution I felt delivered the most value to the user.

After I was happy that the app was usable and valuable I started turning those designs into React components using Storybook and Expo. This allowed me to quickly turn around the components, but there was one aspect missing.

I wanted to be able to test the components on multiple levels during development. Unit tests can only do so much and can’t tell you if everything works on different devices, so I started looking at UI automation.

I initially started looking at Detox as it allows you to get closer to the React Native runtime and this means you can check more of the inner workings of the app as opposed to a fully black-box solution.

Unfortunately Detox does not play well with Expo and even when I built a brand new React Native app from scratch I could never really get it to work so I retired that idea relatively quickly.

--

--

Colin Wren
The Startup

Currently building reciprocal.dev. Interested in building shared understanding, Automated Testing, Dev practises, Metal, Chiptune. All views my own.