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
6
votes
3 answers

Detox build fails on Android: Error while dexing

I can't get past detox build on a brand new Expokit project. The build fails on these tasks: > Transform full.jar (project :unimodules-core) with DexingTransform AGPBI: {"kind":"error","text":"Default interface methods are only supported starting…
clems36
  • 922
  • 1
  • 13
  • 26
6
votes
4 answers

Unable to open UIAutomatorviewer on Mac High Sierra

We have brand new MacBooks with High Sierra (10.13.6). Other system info: JAVA Version: java version "11.0.1" 2018-10-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) JAVA_HOME:…
user2451016
  • 1,857
  • 3
  • 20
  • 44
6
votes
5 answers

build failed: exit code 127

created my project with my app This is the project.json file. That I have created { "name": "detox", "version": "0.0.1", "private": true, "scripts": { "ios": "react-native run-ios", "start": "node…
fypnlp
  • 1,372
  • 4
  • 18
  • 41
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
  • 300
  • 4
  • 19
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
  • 373
  • 1
  • 4
  • 14
6
votes
2 answers

Jest tests broken after implementing detox

I'd like to be able to run my detox tests and my Jest unit tests separately. For example, run detox tests with detox build && detox test, and my Jest unit tests with npm test. After implementing detox (using mocha as the test runner), running npm…
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…
6
votes
3 answers

Detox issue: BUILD FAILED Ld build/Build/Products/Debug-iphonesimulator

I'm trying to use Wix/Detox to test my react-native app (the iOS version). I have successfully followed the instructions (up until "detox build") at https://github.com/wix/detox/blob/master/docs/Introduction.GettingStarted.md However, when running…
mhyousefi
  • 1,064
  • 2
  • 16
  • 30
5
votes
1 answer

Detox tests hang with pending items on dispatch queue

I am writing e2e tests on Detox to test a Firebase app in React Native. It looks like the call to firebase.auth().signInWithPhoneNumber(number) dispatches some items on the dispatch queue but these items don't ever seem to be dequeued and therefore…
dazzaondmic
  • 345
  • 4
  • 14
5
votes
0 answers

Detox - Test is stuck at device.launchApp in Android

I am trying to integrate with my existing Android application which has both Native and ReactNative components. I have followed the setup instructions in their README. The problem seems to be that when I run detox test -c android.emu.debug the app…
5
votes
2 answers

How to open an android app as default using deeplink in Detox testing

I am trying to open a particular page for my react native app using Detox. While passing the deeplink in the below methods, in Android it prompts to select either my app or Chrome. Is there a way to make my app as default for these links in Detox? I…
akash bisht
  • 126
  • 5
5
votes
0 answers

Error while opening a local notification using detox

I am trying to open a mock local notification using detox, but getting an error. My code: it('Notif', async () => { const localNotification = { trigger: { type: 'push', }, title: 'From push', body: 'Body', action: 'IDEAS', payload:…
5
votes
1 answer

Mocking API calls with Detox and Nock

I'm trying to mock API calls from Detox tests and nothing seems to be working. Nock in theory would do exactly what I want but there when I run my tests with nock debugging it isn't seeing any of the requests being made from my app. I'm using axios…
5
votes
1 answer

Entry name 'META-INF/MANIFEST.MF' collided

Description I keep getting the error below when running detox build -c android > Task :app:packageDebugAndroidTest FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:packageDebugAndroidTest'. > A…
alishaevn
  • 73
  • 7
5
votes
2 answers

Detox at least 75 percent of the view's area is displayed to the user

I tried to check with detox if the element is visible with android emulator. I scroll my page and see the element but when I check with detox if the element is visible I get this error: Test Failed: 'at least 75 percent of the view's area is…
Barak
  • 654
  • 13
  • 30
1 2
3
41 42