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

How to end-to-end testing a react native app?

I have a react NATIVE app I would like to test in a end-to-end way. First, do you know if Cypress can do it ? I'm really not sure of it but in doubt I ask anyway. Second, I've seen Detox can do it but I have a Windows environment and it seems Detox…
Alex
  • 61
  • 1
  • 2
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
2 answers

How do I get Detox to tap on nested text elements that have an onPress?

I seem to be having some issues with detox detecting nested elements. I've created an inline link and need to click on it to have my tests progress. Sample Code: This is the outer text {}} testID="clickable" …
Zidail
  • 539
  • 3
  • 11
5
votes
1 answer

No instrumentation runner found on device emulator-5556 for package my.project.android.debug

I am trying to run Detox test on the emulator. When I run "detox test --configuration android.emu.debug -l verbose" it throwing error message as "No instrumentation runner found on device emulator-5556 for package my.project.android.debug at…
Neerajkumar
  • 242
  • 2
  • 15
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…
5
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…
5
votes
1 answer

"ReferenceError: device is not defined" when using detox+Jest in React Native for android

App is working fine both in Android and iOS simulators. I am trying to setup Detox with Jest for end to end testing my react-native app. In simulator I can see some movement but app is not launched and I get following errors(apart from "device not…
Anupam
  • 7,730
  • 3
  • 39
  • 60
5
votes
1 answer

run react-native detox e2e tests on real devices

Is there a way to run detox e2e tests on real devices within a CI pipeline? My goal is to run the tests on AWS device farm or something similar. I read that it is possible to run the e2e tests on bitrise ci, but I guess they will be executed in the…
appsthatmatter
  • 6,201
  • 3
  • 32
  • 39
5
votes
4 answers

Detox _ Failed to type string because keyboard was not shown on screen

I'm trying to test my react-native app using detox, waiting for a text input to be visible and typing text in it. My spec JS file looks like this: describe('FiestTest', () => { beforeEach(async () => { await device.reloadReactNative() }) …
mhyousefi
  • 726
  • 1
  • 10
  • 25
5
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
  • 726
  • 1
  • 10
  • 25
4
votes
2 answers

Detox Substring Match Using by.text

I'm trying to select an element by text, but the actual text changes because it has the current time stamp in it. Is there is way to select it without doing a substring search on getAttributes()? I can't use getAttributes because we will also be…
Satbir Kira
  • 664
  • 5
  • 19
4
votes
2 answers

Testing timeout-related tests, such as Popups/Tooltips etc with Detox

I've beed using detox for a while, but after upgrade to 17.5.+ I have started facing an issue with Popups testing. I haven't find useful info on a stack overflow and on detox issues. Problem here is the following: I have a test to check if correct…
4
votes
1 answer

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
  • 334
  • 4
  • 19
4
votes
0 answers

Detox tests hangs when using React-Navigation

I am using react-navigation for navigation in my RN app. The issue is when I run detox, the tests just hang but if I remove the navigation and just render a React component then the tests run fine. Here are the logs(when using react-navigation)…
Shubhnik Singh
  • 1,280
  • 10
  • 12
4
votes
1 answer

How are you guys testing complex react native applications?

I am the only one that feels that creating usefull tests for complex react native applications is actually impossible? How are you guys testing apps that have a lot of native dependencies? If i try to use jest with enzyme or react native testing…
1 2
3
35 36