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
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
2 answers

Mocking with RN Detox

I am following the detox mocking guide with typescript. The app always prints console.log of X.ts file instead of X.e2e.ts file. Dependency version. react-native: 0.61.5, detox: 16.4.0 Metro Configuration: "detox": { "test-runner": "jest", …
NAUSHAD
  • 174
  • 1
  • 15
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,233
  • 17
  • 37
5
votes
2 answers

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,848
  • 21
  • 35
5
votes
0 answers

detox react native: Support for es6 imports in test specs js files

In my test spec file, I am importing an es6 module using import statement. I am using jest test-runner and getting following error- Cannot find module warnOnce from react-native-implementation.js I edited ./e2e/config.json to add following…
Varun Kumar
  • 2,543
  • 1
  • 23
  • 22
5
votes
1 answer

Expo + Detox + CircleCI

For the last two days I’ve been looking for a good setup to use Expo + Detox + CircleCI so that the app can build during the CI process. Locally, I can get Expo + Detox to work by downloading Exponent.app and placing in bin and running expo start…
Alex Chin
  • 1,642
  • 15
  • 28
5
votes
2 answers

Cannot find module @jest/reporters when running 'detox test'

Having some trouble getting Detox setup in my React Native project. My project configuration is as follows: MacOS Version: 10.14.14 Xcode 10.2.1 Command Line Tools: Version 10.2.1 package.json: { "name": "AppName", "version": "0.1.0", …
5
votes
0 answers

How do I use ES6 imports in Detox tests with Yarn Workspaces?

I have already integrated Detox to my react native project (using yarn workspaces) and it works ok. But when I want to use import syntax the tests fail. This is the error: import { linkBarTest } from './helpers'; ^^^^^^ SyntaxError: Unexpected…
Andy Esp
  • 51
  • 2
5
votes
1 answer

Detox field CFBundleIdentifier not found inside Info.plist

Following Expo usage guide for detox and getting error below when running detox test. Using: "detox": "^10.0.10", "detox-expo-helpers": "^0.6.0", "expo-detox-hook": "^1.0.10" IPA made with : xcode v 9.4.1 expo v 31.0.6 Also tried IPAs built with…
Vgoose
  • 249
  • 1
  • 10
5
votes
1 answer

Couldn't find preset "module:react-native-dotenv"

I setup a test with Detox, but when I launch it with detox test, the test starts but I receive this error: Couldn't find preset "module:react-native-dotenv" relative to directory "/Users/iota/workspace/Project" In the scene file I am trying to test…
Mark
  • 1,069
  • 2
  • 21
  • 44
5
votes
5 answers

Mixing jest expect with detox expect

How to mix Jest expect with Detox expect? Here is what I try to do. It seem expect has overrided the jest expect. await mockServer.mockAnyResponse({ httpRequest: { method: 'POST', path: '/api/register', }, httpResponse: { …
invisal
  • 11,075
  • 4
  • 33
  • 54
5
votes
3 answers

Detox + android Compiling DetoxTest.java fails

I'm trying to run detox build -c android.emu.release but it fails when it tries to compile DetoxTest.java with the following errors ~/android/app/src/androidTest/java//DetoxTest.java:24: error: cannot find symbol public…
Henry
  • 351
  • 3
  • 12
5
votes
1 answer

Are Circleci macOS boxes too low spec to run Detox?

I have created an issue for this on the detox repo here. I have a React Native application which I test using Jest and Detox. Locally the Detox tests run with no problems (sanity checked on other dev machines too). However, they have never passed…
Liam Humphreys
  • 161
  • 1
  • 8
5
votes
2 answers

Detox Testing - How to disable detox info logging to stdout

I've read through the docs and cannot find a way to set the log level to something like "silent". I don't want to see all the detox log info. I just want to see the test output. The current log levels are: -l, --loglevel [value] …
Byron
  • 1,091
  • 11
  • 27
5
votes
1 answer

testing Picker with Detox in React Native

I just started using Detox to test my react native app and I'm having some trouble to test Pickers. I basically need to be able to choose a value from a Picker! But it seems impossible!! Here is my Picker:
otavio1992
  • 712
  • 2
  • 6
  • 18