Questions tagged [detox]

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

From GitHub page:

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 and Android.

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.

See the GitHub page for more information.

533 questions
19
votes
4 answers

Detox: iOS Simulator how to confirm alert message

I am using Alert from react-native. How do I get detox to press the "Log out" button on the alert message? I tried using await element(by.text('Log out')).tap(); But I get "Multiple elements were matched" error. Presumably it finds 3 elements with…
Antoni4
  • 2,115
  • 20
  • 34
14
votes
2 answers

React Native Detox: Can't accept location permission from system alert pop up

Launch app from command line using detox test --configuration ios.sim.debug Launch app in code via await device.launchApp({ permissions: { location: 'always', notifications: 'YES' } }) Go through login flow until app asks for location via…
14
votes
2 answers

Load redux store initial state in Detox Testing

Problem We have a quite complex application and we don't want in each test case to go through the whole process to get to specific screen to test it, alternatively we just want to jump to specific one with some state stored in redux store. What…
AFGhazy
  • 151
  • 7
12
votes
0 answers

Setting up Detox with Expo on Android

I'm trying to set up Detox with Expo on Android emulator (Genymotion) but I have an error that I can't go through.... I've installed the necessary packages : Detox detox-expo-helpers expo-detox-hook Downloaded the Exponent.apk on the official…
Toto NaBendo
  • 317
  • 1
  • 19
12
votes
3 answers

How to tell Detox is running tests?

I'm using Detox to run end to end tests in my React Native project. I'm also using pretender.js to mock my API requests and I'm struggling to find a way to know if the app is currently in "testing" mode. I was passing an env variable down (and…
robdel12
  • 194
  • 1
  • 8
11
votes
3 answers

How to tap on Allow button on permission pop up

I am trying to click on the Allow button using Detox. I have tried the following: Detox: iOS Simulator how to confirm alert message I have also tried targeting the "Allow" button by element(by.label('Allow')).tap() and also by.text I do not want to…
RonE
  • 306
  • 2
  • 14
10
votes
1 answer

Detox + Jest - App has not responded to the network requests below

I am currently setting up Detox for an existing project and running into snags. I am using Detox + Jest and am receiving an error [Client.js/PENDING_REQUESTS] App has not responded to the network requests below: (id = 1) invoke:…
Blink Rankin
  • 151
  • 1
  • 9
10
votes
4 answers

Run individual Detox test

Running detox test runs all tests in the suite. Is there a way to run a subset of the tests? A single test file, or a single test case. I've configured Detox to use Mocha as the test runner, as per the docs. I know that Mocha has a -g option to…
Josh Justice
  • 20,212
  • 3
  • 24
  • 18
10
votes
3 answers

How to get the text from a matched view using Detox?

I want to test a view that has a list and filtering functionality: I want to check the text of the first row and save it Filter using that text Check again that the same element is rendered Thing is, when I match and element using…
Ferran Negre
  • 3,453
  • 3
  • 32
  • 55
9
votes
5 answers

Detox build is failing by throwing YogaKit.modulemap' fatal error not found

Detox build is failing by throwing YogaKit.modulemap' fatal error not found Xcode Version:- 11.3 "react": "16.11.0", "react-native": "0.62.2" "detox": "13.3.0", tried latest 16 version as well But build got succeeded with the below…
Karthik Rao
  • 119
  • 1
  • 1
  • 7
9
votes
1 answer

Detox, multiple elements were matched for button in transition

I am using detox e2e for creating test cases for my react-native application. Long story short, I have a button inside of my component's render function and that button transitions from left to right. I have given a unique test id to that button.…
Meeran Tariq
  • 1,131
  • 7
  • 21
8
votes
1 answer

Is it actually possible to make Detox/Jest tests pass with a React Native app running with Expo?

I'm attempting to create an automated UI test suite for my React Native app with Expo. I have looked everywhere for good tutorials but when I get to the actual test writing portion, my tests never even run because of environment issues such as…
Chase Small
  • 181
  • 2
  • 11
7
votes
0 answers

detox test failed in ios - Aborted detox.init() execution

Trying to run a basic detox e2e for a sample react native application. I'm following this blog. But the step detox test, doesn't run the tests. It just hangs in the simulator (in detox init phase), and failed due to timeout. Does anyone have any…
TicTacV
  • 71
  • 2
7
votes
1 answer

Detox: Waiting for network requests to finish timeout

I'm trying to set up detox to run e2e tests on my app (react native + expokit). As i had mentioned in https://github.com/wix/Detox/issues/1627, my test keeps timing out with Waiting for network requests to finish.: ( …
clems36
  • 742
  • 1
  • 9
  • 26
7
votes
6 answers

How goBack screen in test with detox

I make automatization react native test with detox, It has the next screen sequence A -> B -> C and i wish to go back to the screen B <- C. Is there a solution for this?
1
2 3
35 36