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
7
votes
1 answer

Animated Button block the Detox

This is what I meant about the animating button. I let it have an ID, but it can't be located by the Detox somehow. Detox eliminates flakiness by automatically synchronizing your tests with the app. A test cannot continue to the next line if the…
Hien Tran
  • 151
  • 11
6
votes
0 answers

Detox - App stuck in launch screen on iOS

my detox setup is working well for android but I have problems with iOS. The problem is that the app is stuck on the launch/splash screen after loading the bundle from the metro bundler. Detox is not logging much: App has not responded to the…
seveHo
  • 61
  • 1
6
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,073
  • 4
  • 28
  • 59
6
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
  • 2,564
  • 1
  • 14
  • 39
6
votes
1 answer

Detox :: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout

I am trying to setup Detox for ios simulator on. Detox able to start app and I can see onboarding screen. However, Detox do not click on an element and throw an error as "Timeout - Async callback was not invoked within the 120000ms timeout…
Neerajkumar
  • 242
  • 2
  • 15
6
votes
1 answer

Detox attempts to run Android test when none is specified

After following the basic instructions for setting up Detox for my simple example project, and running a successful detox build, detox test produces the output below, even though the the only test configuration I have in my package.json is for…
orome
  • 35,904
  • 38
  • 156
  • 345
6
votes
3 answers

detox tests not recognising View even after adding id

Apologies in advance if this has been asked before. I came across the detox e2e framework for react native apps, and I thought of giving it a try. I am trying to automate this demo mobile application given here - link Since the tests in detox uses…
demouser123
  • 3,128
  • 6
  • 41
  • 67
6
votes
2 answers

How to open a Keyboard on focus on text input?

In iOS simulator I can toggle software keyboard (⌘K) manually under Hardware main menu, and then tests pass. And I have to do it after Hardware Restart each time. But how can we make detox always open soft keyboard when an input field receives…
mjakic
  • 275
  • 2
  • 11
6
votes
0 answers

TextInput label/id not getting picked up in detox

I am just setting up Detox and user error is possible... that being said, I think I'm doing this right. I have a TextInput element with both accessibilityLabel and testID set to email. However, detox cannot find UI element with by.id or by.label.…
Steph
  • 352
  • 5
  • 19
6
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
  • 1,806
  • 11
  • 20
6
votes
0 answers

How to mock Facebook login using react-native Detox?

A common issue on the Detox repo is how to login to Facebook in tests (https://github.com/wix/detox/issues/287). Answer: “mock the FB API to return a valid session without the actual login process.” Sure! Sounds like a great idea, but… how? Can…
5
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
  • 30,720
  • 20
  • 100
  • 179
5
votes
1 answer

Detox: App has not responded to the network requests below

Running detox 17.4.3 with Jest-Circus as the test runner I am running into the following error using an iOS simulator. detox[18766] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below: (id = -1000) isReady:…
5
votes
1 answer

Integrate Detox with Fastlane

I did set up some e2e tests with detox for my react-native app. I'm running those tests manually with the detox test command, but I cannot find (neither in the detox's issues, nor in Fastlane's documentation) a way to integrate these tests directly…
Guillaume Munsch
  • 1,007
  • 14
  • 30
5
votes
1 answer

Detox: detect that element was displayed

We have a toast component in our app that is adding considerable flakiness to our tests. The toast component displays an animated View for 4s and then disappears. In a lot of tests I need to check what the message content is in order to continue…
Daniel Dimitrov
  • 1,412
  • 16
  • 30
1
2
3
35 36