Mobile Era: Send your app to rehab – Testing React Native apps with Detox

Fintechs: New titans vs. incumbents?
November 14, 2018
SpareBank 1 BV and Auka enter into strategic cooperation
November 23, 2018

On Friday 2nd November, Auka’s CTO Erlend Halvorsen and senior frontend developer, Alejandro Chacin Ortega attended Mobile Era in Oslo to talk about how we do test automation at Auka.

We know that getting started with end-to-end testing is easy. The difficult part is getting your tests to run consistently and in a timely manner. Many of us have at some point or another tried and failed at getting end-to-end testing to work. Usually, the tests end up flaky or take forever (in the literal sense) to finish. Detox is a cross-platform, framework agnostic test automation library for iOS and Android that tries to solve some of these problems, but is it the cure we’ve been waiting for?

Keep reading or watch the presentation here yourself. 

The yapstone

Opening with the history of the yapstone, Erlend explained how by the power of good storytelling, this otherwise meaningless rock became the dominant form of currency in the Micronesian island of Yap, centuries ago. He told an oral history anecdote about how apparently one of these, by then, precious stones once became lost. But everyone agreed that, despite its unknown whereabouts, it was still valid because people knew it had existed and therefore it was ok to still trade.

Testing, testing…

This, of course, relates closely to what we’re doing at Auka – “helping you move your stone money around – but hopefully a bit more efficiently”. Being a payments company, testing is central to what we do – we don’t lose people’s money.

The focus of this discussion was around the top of this pyramid shown above – automated end-to-end testing. Erlend and Alejandro wanted to emphasise that just because they’re doing end-to-end testing, it doesn’t mean that unit and integration testing should be neglected. Erlend cautioned that it was crucial to ensure your testing pyramid didn’t get turned upside down to become a testing “ice-cream cone” – where all you do is automated end-to-end testing and manual regression testing.

He then spoke about the benefits behind automated QA. Without going into this too much here (because you’ll be watching the video, right?) the results of this can mean that the scope of QA grows lineally. 

What is detox?

Enter the core topic of our discussion. Erlend explains why we use Detox. Further, why it’s a practice we have trialled at Auka to streamline our development process.

He also spoke about the anatomy of a Detox test, blackbox testing vs. greybox testing, and how Detox uses knowledge of your application’s internal state to make your test scripts run faster and more reliably.

Demo time!

Alejandro then stepped onto the stage to run through a demo (the source code is available here, if you’re interested in playing with this yourself), demonstrating how to write end-to-end tests with Detox, mocking components, how it works in practice and outcome examples.

Erlend then took over again to summarise how this process works in practice at Auka. He spoke about what steps we have gone through, what we’ve learned, the pros and cons of running tests against a real vs mocked environment. He then shared some thoughts on getting started.

In summary

For the summary of this presentation, watch here (and skip to 24:07 if you believe the above was informative enough!) 😉

The video finishes end of our main presentation and unfortunately doesn’t capture the really interesting audience questions, the main themes being: how can they use it if Erlend and Alejandro personally think it’s worth it to do this form of testing and how it fits into the rest of Auka’s QA process.

Want to work with Auka? We’re hiring! Check out our job listings here.

If you have any questions after watching, we’d love to chat more. Drop a comment below or get in touch.

Leave a Reply

Your email address will not be published. Required fields are marked *

GET STARTED