wix/Detox


Gray box end-to-end testing and automation framework for mobile apps

License: MIT

Language: JavaScript

Keywords: android, e2e-tests, ios, react-native, testing


Detox

Gray box end-to-end testing and automation library for mobile apps.

NPM Version NPM Downloads Build Status

What does a Detox test look like?

This is a test for a login screen, it runs on a device/simulator like an actual user:

describe('Login flow', () => {
    
  it('should login successfully', async () => {
    await device.reloadReactNative();
    await expect(element(by.id('email'))).toBeVisible();
      
    await element(by.id('email')).typeText('john@example.com');
    await element(by.id('password')).typeText('123456');
    await element(by.text('Login')).tap();
      
    await expect(element(by.text('Welcome'))).toBeVisible();
    await expect(element(by.id('email'))).toNotExist();
  });
  
});

About

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.

The most difficult part of automated testing on mobile is the tip of the testing pyramid - E2E. The core problem with E2E tests is flakiness - tests are usually not deterministic. We believe the only way to tackle flakiness head on is by moving from black box testing to gray box testing. That's where Detox comes into play.

  • Cross Platform: Write cross-platform tests in JavaScript. Currently supports iOS, Android is nearly complete. View the Android status page.
  • Runs on Devices (not yet supported on iOS): Gain confidence to ship by testing your app on a device/simulator just like a real user.
  • Automatically Synchronized: Stops flakiness at the core by monitoring asynchronous operations in your app.
  • Made For CI: Execute your E2E tests on CI platforms like Travis without grief.
  • Test Runner Independent: Use Mocha, AVA, or any other JavaScript test runner you like.
  • Debuggable: Modern async-await API allows breakpoints in asynchronous tests to work as expected.

Supported versions

Environment

  • OS: MacOS 10.13 (High Sierra) or higher.
  • Xcode: 10.1 or higher.

React Native

Detox is built from the ground up to support React Native projects as well as pure native ones.

The following React Native versions have been tested:

iOS Android
<=0.59 <=0.56 - Full support
>=0.57 <=0.59 - Visibility edge-case: see this RN issue*

Future versions are most likely supported, but have not been tested yet. Please open issues if you find specific issues with newer React Native versions.

(*) We are planning on introducing a better Matcher that would work around this issue. In the meantime, it doesn't seem to hold any projects back from upgrading - not that we know of, at least. Contributions would be more than welcomed.

Getting Started

Read the Getting Started Guide to get Detox running on your app in less than 10 minutes.

Documentation

Learn everything about using Detox from the documentation.

See it in Action

Open the React Native demo project and follow the instructions.

Not using React Native? we have a pure native demo project too.

Rethinking Core Principles

We believe that the only way to address the core difficulties with mobile end-to-end testing is by rethinking some of the principles of the entire approach. See what Detox does differently.

Contributing to Detox

Open source from the first commit. If you're interested in helping out with our roadmap, please see issues tagged marked with the  looking for contributors label. If you have encountered a bug or would like to suggest a new feature, please open an issue.

Dive into Detox core by reading the Detox Contribution Guide.

License

  • Detox by itself and all original source code in this repo is MIT
  • Detox relies on some important dependencies, their respective licenses are:

Project Statistics

Sourcerank 14
Repository Size 12.9 MB
Stars 5,375
Forks 945
Watchers 350
Open issues 74
Dependencies 107
Contributors 121
Tags 194
Created
Last updated
Last pushed

Top Contributors See all

Rotem Mizrachi-Meidan Leo Natan Tal Kol d4vidi Yaroslav Serhieiev Simon Racz Daniel Schmidt bogobogo Sergey Ilyevsky Daniel Zlotin wixmobile EtgarSH Shalom Yerushalmy Doron Pearl Dassi Rosen Vojtech Novak Martin Rädlinger Ofir Dagan Yedidya Kennard Damian Sznajder

Packages Referencing this Repo

detox
E2E tests and automation for mobile
Latest release 14.4.1 - Updated - 5.38K stars
parkandpedal-detox-cli
detox CLI tool wrapper
Latest release 10.0.7 - Published - 5.38K stars
@skyscanner/detox-cli
detox CLI tool wrapper
Latest release 9.0.8-skyscanner - Published - 5.38K stars
@rawqing/mdetox
E2E tests and automation for mobile
Latest release 12.4.2 - Published - 5.38K stars
@geekykaran/detox-cli
detox CLI tool wrapper
Latest release 9.0.6-skyscanner - Published - 5.38K stars
parkandpedal-detox
E2E tests and automation for mobile
Latest release 10.0.12 - Updated - 5.38K stars
@skyscanner/detox
E2E tests and automation for mobile
Latest release 9.0.8-skyscanner - Published - 5.38K stars
@feeld/detox-android
E2E tests and automation for mobile
Latest release 0.0.1 - Published - 5.38K stars
@geekykaran/detox
E2E tests and automation for mobile
Latest release 9.0.6-skyscanner - Published - 5.38K stars
detox-cli
detox CLI tool wrapper
Latest release 10.0.7 - Updated - 5.38K stars
detox-tools
Tools for E2E tests and automation for mobile
Latest release 1.0.0 - Published - 5.38K stars
detox-server
Websocket proxy server for detox
Latest release 7.0.0 - Updated - 5.38K stars

Recent Tags See all

14.4.1 October 07, 2019
14.4.0 October 03, 2019
14.3.4 September 24, 2019
14.3.3 September 22, 2019
14.3.2 September 15, 2019
14.3.1 September 15, 2019
14.3.0 September 12, 2019
14.2.0 September 07, 2019
14.1.0 September 04, 2019
14.0.3 August 25, 2019
14.0.2 August 12, 2019
14.0.1 August 08, 2019
14.0.0 August 05, 2019
13.3.3 August 04, 2019
13.3.2 July 31, 2019

Something wrong with this page? Make a suggestion

Last synced: 2019-06-30 15:02:22 UTC

Login to resync this repository