Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wix/detox
Gray box end-to-end testing and automation framework for mobile apps
https://github.com/wix/detox
android automation e2e-tests ios javascript react-native test-automation testing testing-tools
Last synced: 3 days ago
JSON representation
Gray box end-to-end testing and automation framework for mobile apps
- Host: GitHub
- URL: https://github.com/wix/detox
- Owner: wix
- License: mit
- Created: 2016-06-15T11:58:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T09:00:03.000Z (8 months ago)
- Last Synced: 2024-04-14T10:07:41.057Z (8 months ago)
- Topics: android, automation, e2e-tests, ios, javascript, react-native, test-automation, testing, testing-tools
- Language: JavaScript
- Homepage: https://wix.github.io/Detox/
- Size: 110 MB
- Stars: 10,930
- Watchers: 378
- Forks: 1,902
- Open Issues: 258
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-react-native - detox ★3566 - Graybox End-to-End (functional) Tests and Automation Library for Mobile with first class support for React Native (Components / Utils & Infra)
- awesome-react-native - Detox - E2E tool
- Awesome-React-Native-Education - Graybox E2E tests and automation library for mobile
- awesome-react-native - detox ★3566 - Graybox End-to-End (functional) Tests and Automation Library for Mobile with first class support for React Native (Components / Utils & Infra)
- awesome-react-native - detox ★3566 - Graybox End-to-End (functional) Tests and Automation Library for Mobile with first class support for React Native (Components / Utils & Infra)
- awesome-react-native - detox ★3566 - Graybox End-to-End (functional) Tests and Automation Library for Mobile with first class support for React Native (Components / Utils & Infra)
README
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://stand-with-ukraine.pp.ua)
Detox
Gray box end-to-end testing and automation framework for mobile apps.
[![NPM Version](https://img.shields.io/npm/v/detox.svg?style=flat)](https://www.npmjs.com/package/detox) [![NPM Downloads](https://img.shields.io/npm/dm/detox.svg?style=flat)](https://www.npmjs.com/package/detox) [![Build status](https://badge.buildkite.com/39afde30a964a6763de9753762bc80264ba141e1c1f41fc878.svg)](https://buildkite.com/wix-mobile-oss/detox) [![Coverage Status](https://coveralls.io/repos/github/wix/Detox/badge.svg?branch=master)](https://coveralls.io/github/wix/Detox?branch=master) [![Detox is released under the MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![PR's welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://wix.github.io/Detox/docs/contributing) [![Discord](https://img.shields.io/discord/957617863550697482?color=%235865F2\&label=discord)](https://discord.gg/CkD5QKheF5) [![Twitter Follow](https://img.shields.io/twitter/follow/detoxe2e?label=Follow\&style=social)](https://twitter.com/detoxe2e)
## 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:
```js
describe('Login flow', () => {
beforeEach(async () => {
await device.reloadReactNative();
});it('should login successfully', async () => {
await element(by.id('email')).typeText('[email protected]');
await element(by.id('password')).typeText('123456');const loginButton = element(by.text('Login'));
await loginButton.tap();await expect(loginButton).not.toExist();
await expect(element(by.label('Welcome'))).toBeVisible();
});
});
```[Get started with Detox now!](https://wix.github.io/Detox/docs/introduction/getting-started)
## 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 end-to-end tests in JavaScript for React Native apps (Android & iOS).
- **Debuggable:** Modern async-await API allows breakpoints in asynchronous tests to work as expected.
- **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 CI, Circle CI or Jenkins without grief.
- **Runs on Devices:** Gain confidence to ship by testing your app on a device/simulator just like a real user (not yet supported on iOS).
- **Test Runner Agnostic:** Detox provides a set of APIs to use with any test runner without it. It comes with [Jest](https://jestjs.io) integration out of the box.## Supported React Native Versions
Detox was built from the ground up to support React Native projects.
While Detox should work out of the box with almost any React Native version of the latest minor releases, official support is provided for React Native versions `0.72.x`, `0.73.x`, `0.74.x`, `0.75.x` with or without React Native's ["New Architecture"](https://reactnative.dev/docs/the-new-architecture/landing-page).
Newer versions, as well as React Native's "New Architecture", may work with Detox, but have not been tested out yet by the Detox team.
Although we do not officially support older React Native versions, we do our best to keep Detox compatible with them.
Also, in case of a problem with an unsupported version of React Native, please [submit an issue](https://github.com/wix/Detox/issues/new/choose) or write us in our [Discord server](https://discord.gg/CkD5QKheF5) and we will do our best to help out.
### Known Issues with React Native
- Visibility edge-case on Android: see this [RN issue](https://github.com/facebook/react-native/issues/23870).
## Get Started with Detox
Read the [Getting Started Guide](https://wix.github.io/Detox/docs/introduction/getting-started) to get Detox running on your app in less than 10 minutes.
## Documents Site
Explore further about using Detox from our new **[website](https://wix.github.io/Detox/)**.
## 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](https://wix.github.io/Detox/docs/articles/design-principles).
## Contributing to Detox
Detox has been open-source from the first commit. If you’re interested in helping out with our roadmap, please see issues tagged with the [](https://github.com/wix/Detox/labels/user%3A%20looking%20for%20contributors) 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](https://wix.github.io/Detox/docs/contributing).
## License
- Detox is licensed under the [MIT License](LICENSE)
## Non-English Resources (Community)
- [Getting Started (Brazilian Portuguese)](https://medium.com/quia-digital/iniciando-com-detox-framework-1-4-ce31ad7ae812)