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

Detox Testing: Tracking down Javascript timers causing test framework to wait forever

The Detox test framework, according to the documentation TroubleShooting Synchronization mentions that the test framework will wait and only perform your next test statement when the app is "Idle". The problem I have right now is that my app never…
Byron
  • 974
  • 8
  • 22
0
votes
1 answer

Detox - Testing visibility of modal in react native

We are using detox to write E2E testing of a react native app where we have a case which needs to test if a modal appears after a button tap. But detox was not able to identify modal with the given testID thought the modal opens as expected. Is…
arjun
  • 3,171
  • 2
  • 23
  • 44
0
votes
1 answer

React Native: press tab with Detox

I'm writing automation test with Detox for my react native app. Main screen of my app has a TabNavigator component. How can I reach some specific tab in Detox test? Can I set testID for tabs in TabNavigator? Any help will be highly appreciated
0
votes
0 answers

Detox test stalls when moving between text inputs iPad

I have followed the instructions at https://github.com/wix/detox, created a few simple tests and run them successfully on an iPhone sim. However, when using an iPad (ios 11.2) it stalls after entering text in the first of two text inputs (for a…
0
votes
2 answers

Detox - How to get a previous spec to run before a new spec runs to avoid duplicate test steps?

So I've wrote a test that logs in a user: describe('Login', () => { beforeEach(async () => { await device.reloadReactNative() }) it('Should grant access to a user with valid credentials', async () => { test code }) }) And now I'm…
0
votes
1 answer

Detox Error: Timeout of 120000ms exceeded. For async tests and hooks

I'm trying to run some e2e tests in my react-native up I'm using Detox but I keep getting the following error 1) "before all" hook: Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a…
Almog Koren
  • 1,884
  • 4
  • 24
  • 50
0
votes
1 answer

Adjust element properties so that it matches the failed constraint(s)

Using detox for tests for react-native for ios I have a link onLinkPress(url)} testID={'someId'}> asd but can't click it with element(by.id('someId')).tap() error Error: Error:…
beornborn
  • 204
  • 4
  • 17
0
votes
1 answer

Detox/Appium tap, multiTap, and longPress not working on element

Using detox with a React Native project. Here is the component:
liminal18
  • 543
  • 5
  • 18
0
votes
1 answer

How to exec action typeText() with React Native TextInput outside screen (position: absolute, right: -99)

I have TextInput outside screen with style {position: 'absolute', right: -99}, When i call action typeText(), i receive this error "Error: Error: Cannot perform action due to constraint(s) failure. Exception with Action: { "Action Name" : "Tap", …
0
votes
1 answer

Permission on Android Detox

As the title said it all. I have been finding the way to enable permission like 'Drawing over other apps' for Android using Detox. I think the behaviour would be similar with Permission in iOS but I can't seem to find out any document.
Hien Tran
  • 151
  • 11
0
votes
1 answer

Could not resolve project :detox

I just started implement Detox for android for my project. However, I ran into the issue with Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :detox'. I am not sure what did I do wrong when…
Hien Tran
  • 151
  • 11
0
votes
1 answer

Detox doesn't start iOS simulator on Circle CI

When running detox UI tests on Circle CI, it gets stuck on starting up the simulator. If I don't prestart simulator at all, tests get stuck on detox info 5: Booting device DDB155A3... If I try to prestart simulator with xcrun instruments -w "iPad…
trubi
  • 245
  • 2
  • 11
0
votes
0 answers

Expect element to not exist timeout when the element doesn't exist

I'm trying to verify that an element doesn't exist. But when I do: await waitFor(element(by.label('Erro'))).toNotExist().withTimeout(800); await expect(element(by.label('Erro'))).toNotExist(); I'm getting " Error: Timeout of 240000ms exceeded. For…
0
votes
0 answers

Detox - Can't locate the element on the screen

I tried to resolve the issue of Detox - Enter on Numpad and thus leading to this issue. According to the screen, I have an input field with number. So there is no enter key or typeText '\n' to enter it. So I think of the solution to tap on the…
Hien Tran
  • 151
  • 11
0
votes
1 answer

Detox 5.10.0 hanging with Jest runner

Still new to detox, trying to understand why one command at package.json work and another not. ReactNative project detox@5.10.0 one detox configuration: "jest": { "preset": "react-native", "setupTestFrameworkScriptFile":…
Dmitry Birin
  • 986
  • 6
  • 7
1 2 3
35
36