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

How to close iOS 14 DatePicker in Detox

This must be super-simple, but I spent a bunch of time already trying to do it with no success. After calling setDatePickerDate(), UIDatePicker is not closed and trying to calling to tap() on it throws an error saying it's not visible(why?).
0
votes
2 answers

detox init -r jest is throwing error on Linux ubuntu. Any alternative commands for it

detox init -r jest above command is throwing error on my local project. init: No such file or directory jest: No such file or directory I have checked in my package.json, jest is configured. my system environment: Linux Ubuntu 18.4 Kindly…
0
votes
0 answers

How to use Android date picked using detox?

I am trying to test react-native-modal-datetime-picker and select a date for android, (later I will need for IOS). I am unable tho to pick a date currently. I found a solution for Appium using espresso(See this), But this solution uses…
iradkot
  • 151
  • 1
  • 5
0
votes
1 answer

Struggling to build with Detox

I am looking to setup automated end to end UI testing for React Native App and its my first time doing it using detox. I followed exact steps as mentioned in this…
pbassi
  • 11
  • 1
0
votes
1 answer

Detox v18 upgrade - App has not responded to the network requests below: (id = -1000) isReady: {}

I am running Detox with Expo. Prior to upgrading to v18 of detox, I used to get the following error: detox[7528] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below: (id = -1000) isReady: {} That might be the…
0
votes
1 answer

Detox build command fails in Github jobs

Running build test for ios release locally is working fine, however it fails on Github actions enter image description here
0
votes
0 answers

Android detox debug build port 8081 in use

When I build android debug release the app points to the metro bundled on port 8081. I have to run out metro bundles on port 8087 due to antivirus software occupying port 8081. How do o build android debug with the app pointing to port 8087 for the…
0
votes
1 answer

command not found: detox

I am trying to add detox e2e test to my project. I go through it's documentation, however, I can not install it on my machine. This is my devDependencies: "devDependencies": { "@babel/core": "^7.4.5", …
Amir Shabani
  • 690
  • 2
  • 14
  • 36
0
votes
1 answer

How to configure Detox lifecycle hooks in the latest version?

I run detox in version 17.13.2 with jest-circus as the test runner. My main problem is the app is not reset either after or before I run the tests which leads to an inconsistent state of the app. My test file: import { by, device, element, expect,…
Chrisissorry
  • 1,434
  • 2
  • 22
  • 43
0
votes
1 answer

Find element by ID testing with detox - React Native

I am trying to test that an specific ID has certain attributes but I haven’t succeeded finding it. Instead, it finds many others id with the same attributes which tells me that its not stopping in the ID I am leading the test to stop. Also, I…
0
votes
0 answers

React Native Detox Android button click unexpected behavior

Working on writing a login detox test for react-native. Basic test and looks like this: await element(by.id('email')).typeText('email\n'); await element(by.id('password')).typeText('password\n'); await element(by.id('login_btn')).tap(); This works…
Newoda
  • 71
  • 8
0
votes
1 answer

DetoxRuntimeError: Detox instance has not been initialized

After updating to react-native 0.63.3 and xcode 12.0.1 the tests are not working anymore. First had some issues building detox but that was solved. Now this error is there and I cannot go further: DetoxRuntimeError: Detox instance has not been…
0
votes
1 answer

Run Detox tests on ios physical device?

I am currently working on a react native project using Detox for e2e tests. I can run tests on my android device changing detox configuration "android-device": { binaryPath: "android/app/build/outputs/apk/release/app-release.apk", build:…
Fazli Zekiqi
  • 531
  • 2
  • 7
  • 14
0
votes
1 answer

Is using testID Good or bad practice for automating Mobile Application?

I am automating React Native Application and to reduce flakiness of the UI test I am using testID. In the Detox automation, it is showing to use testID:…
Saif Siddiqui
  • 856
  • 1
  • 13
  • 33
0
votes
2 answers

Detox get length of element

Hi i'm using detox and i would like to know how can I get the number of matches to one element(length). For example "card" match three times, how can I get the three. const z = await…
Barak
  • 654
  • 13
  • 30