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.

619 questions
21
votes
1 answer

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
  • 290
  • 3
  • 26
20
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,535
  • 24
  • 37
18
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…
16
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
  • 181
  • 1
  • 7
15
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
  • 179
  • 1
  • 1
  • 9
14
votes
2 answers

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
  • 211
  • 3
  • 12
14
votes
4 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
  • 229
  • 2
  • 8
13
votes
4 answers

Struggling to get Android build working due to minSdkVersion

I think I must be missing something here, as far as I'm aware I've tried these approaches after reading a number of articles and I can't seem to get things working. I'm triggering these builds manually at the moment, using the command that detox…
Ian
  • 33,605
  • 26
  • 118
  • 198
13
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
  • 404
  • 6
  • 18
13
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
  • 21,186
  • 3
  • 25
  • 20
11
votes
1 answer

What is the gradlew task assembleAndroidTest and what are the Test applications in Android?

I've been coding in React-Native for a while and when I need to I write some native Android code as well. However, I had not seen this gradle task until I started using a library which used this particular gradle task. That library is an end-to-end…
evianpring
  • 3,316
  • 1
  • 25
  • 54
11
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,712
  • 3
  • 34
  • 56
10
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,366
  • 11
  • 23
9
votes
1 answer

Getting app binary not found error detox test

Getting error running detox test Below is my Package.json { "name": "TDD", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest tests/**/*.spec.js" }, …
JiteshW
  • 2,195
  • 4
  • 32
  • 61
9
votes
2 answers

E2E: Select an image from a UIImagePickerController with Wix Detox

Description I need to write an e2e test that in some point it has to select an image in UIImagePickerController, I tried to use element(by.type('UIImagePickerController')). tapAtPoint() with no use. I need a way to select an image. I have found a…
Tareq El-Masri
  • 2,413
  • 15
  • 23
1
2 3
41 42