Detox: E2E Testing in React Native

High velocity native mobile development requires us to adopt continuous integration workflows, which means our reliance on manual QA has to drop significantly. Detox tests your mobile app while it’s running in a real device/simulator, interacting with it just like a real user.

Here’s a sample test for a login screen:

describe('Login flow', () => {
  it('should login successfully', async () => {
    await device.reloadReactNative();
    await expect(element('email'))).toBeVisible();
    await element('email')).typeText('');
    await element('password')).typeText('123456');
    await element(by.label('Login')).tap();
    await expect(element(by.label('Welcome'))).toBeVisible();
    await expect(element('email'))).toNotExist();

wix/detox (GitHub) →
Testing in React Native — Jest & Detox →

Puppeteer – Headless Chrome Node API

Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('');
  await page.screenshot({path: 'example.png'});


Puppeteer – Headless Chrome Node API →

An Overview of JavaScript Testing in 2017

This short guide is intended to catch you up with the most important reasoning, terms, tools, and approaches to JavaScript testing. It combines many great recently written articles about some aspects discussed here and adds a little more from our experience.

That first sentence is a lie though, nothing “short” about this grand overview ;). The overview covers Test Types (Unit Test, Integration Tests, Functional Tests) and Test Tools Types, only to end with a good list of Testing Tools to check out.

Next to the classic test tools such as Mocha, Jasmin, Jest, etc. some (to me) new ones, like wallaby, are also covered.

An Overview of JavaScript Testing in 2017 →

Jest – Painless JavaScript Testing


I’ve been hearing great things about Jest lately. It’s worth checking it out:

Jest is a JavaScript testing framework, used by Facebook to test all JavaScript code including React applications.

Install Jest using npm (along with some extra Babel presets if you’re writing ES2015 – Don’t forget to configure Babel using .babelrc to use the es2015 and react presets):

npm install --save-dev babel-jest babel-polyfill babel-preset-es2015 babel-preset-react jest

A simple – non-React – test is this (put it in a folder named __tests__):

describe('Addition', () => {
  it('knows that 2 and 2 make 4', () => {
    expect(2 + 2).toBe(4);

As read in the description, you can also use it to test React components with it.

Jest – Painless JavaScript Testing →
Egghead: Getting started with Jest (Video) →
How to Test React Components Using Jest →
Jest 14.0: React Tree Snapshot Testing →

EarlGrey – iOS UI Automation Test Framework

New native iOS UI automation test framework from Google:

With the EarlGrey framework, you have access to enhanced synchronization features […] which help ensure that the UI is in a steady state before actions are performed. This greatly increases test stability and makes tests highly repeatable.

EarlGrey works in conjunction with the XCTest framework and integrates with Xcode’s Test Navigator so you can run tests directly from Xcode or the command line (using xcodebuild).

EarlGrey →

Testing React Native Apps on Android and iOS


These apps are regular native Android and iOS apps, and basically any test automation frameworks works for them: Robotium, Appium, Calabash, uiautomator, Espresso, Jasmine, UI Automation, TestNG, Frank, KIF and many others! Therefore, you do have a great freedom of choice when you build your apps based on React Native framework.

Contains example scripts for most of the mentioned test suites.

Testing React Native Apps on Android and iOS →

FBSimulatorControl – A Mac OS X library for managing and manipulating iOS Simulators

Just launched by Facebook: FBSimulatorControl, A Mac OS X library for managing, booting and interacting with multiple iOS Simulators simultaneously.

FBSimulatorControl works by linking with the private DVTFoundation, CoreSimulator and DVTiPhoneSimulatorRemoteClient frameworks that are present inside the Xcode bundle. Doing this allows FBSimulatorControl to talk directly to the same APIs that Xcode and simctl do. This, combined with launching the Simulator binaries directly, means that multiple Simulators can be launched simultaneously.

The original use-case for FBSimulatorControl was to boot Simulators to run End-to-End tests with WebDriverAgent.

FBSimulatorControl →

Ionic View


Ionic View functions like your own mobile app portfolio. It allows you to easily view, share, and test the Ionic apps you are developing across devices – your own, a client’s, or the person in the cubicle next to you. Ionic View integrates with the Ionic command line to populate your app portfolio.

It’s as easy as running:

$ ionic upload

The Ionic View App is Alive! →
Ionic View (AppStore) →

Note: It’s stuff like this that make me fall even more in love with Ionic

PHPCI – Continuous Integration for PHP Projects


PHPCI is a free and open source continuous integration tool specifically designed for PHP. Built with simplicity in mind and featuring integrations with all of your favourite testing tools, we’ve created the very best platform for testing your PHP projects.

Looks interesting. Host it yourself, or make use of one of the hosted plans.

PHPCI – Continuous Integration for PHP Projects →