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 can I clear redux state after finishing test

I just tried Detox for e2e testing UI Automation. This library is really good. I just want to ask if there is any way for me to clear redux state after finishing a test suite. In my case, I want to clear my shopping cart Here's my code: import…
Kevin Dave
  • 387
  • 2
  • 5
  • 19
0
votes
1 answer

Cannot find module 'detox/runners/jest/adapter' from 'init.js' - Detox

I am trying to run Detox test and found this error "Cannot find module 'detox/runners/jest/adapter' from 'init.js'" node_modules/.bin/jest e2e --config=e2e/config.json --maxWorkers=1 --testNamePattern='^((?!:ios:).)*$' FAIL …
Neerajkumar
  • 300
  • 4
  • 19
0
votes
1 answer

Detox: Using multiple element matchers results in error

I am using Detox for E2E testing on a React Native app using the following specs: React Native 0.55.4 Node 9.2.0 Detox 7.3.7 When I am on a page within my app I can scroll using the scrollView with the Matcher element(by.id('scrollView')) and I can…
0
votes
1 answer

How can I access detox element matchers in custom helpers?

I am looking to access the element and by variables which are globally available in my test, but when I try to call them from a helper module required/imported by the test I get an undefined error. How can I import these variables directly?
Jason Waldrip
  • 5,038
  • 8
  • 36
  • 59
0
votes
1 answer

How run detox-server on a specific port

I specified the configuration according to the documentation https://github.com/wix/detox/blob/master/docs/APIRef.Configuration.md. "detox": { "configurations": { "ios.sim.debug": { "binaryPath": ".....", "build": ".....", "type":…
0
votes
1 answer

platform-based branching in detox tests

I have a test suite written in Detox and I am adding android support. In my tests some button which I don't have control over have different names between iOS and Android. How can I have my test do a: await element(by.text('OK')).tap(); on iOS…
fnCzar
  • 3,153
  • 4
  • 26
  • 28
0
votes
2 answers

How to add an id to a native ios screen

I'm using detox on a hybrid app. I'd like to use by.id in native code Currently I'm logging in like this: try { // 'Email address' is the input's placeholder text await waitFor(element(by.text('Email address')).atIndex(0)) .toBeVisible() …
Tai
  • 490
  • 4
  • 18
0
votes
1 answer

running multiple test cases independently in a single test suite with out app relaunch

How can I run multiple test cases in a single test suite independent of the other without relaunching the application. I am currently using only single it() function. it('', async function(){ ...menutestcase, ..homescreenTestcase,…
abdul
  • 340
  • 6
  • 18
0
votes
2 answers

AWS Device farming services issue for react-native app testing. Need to test the app on multiple android and IOS devices.

Is there any service which supports device farming to test the test suite on different devices. I am facing this problem as AWS (Amazon web services) does not support device forming for react-native apps. Need help! Please inform or suggest if some…
abdul
  • 340
  • 6
  • 18
0
votes
1 answer

Got the error while running detox/wix test case android.util.AndroidException: INSTRUMENTATION_FAILED:

Getting the error every time I run the detox/wix test case on android emulator. > android.util.AndroidException: INSTRUMENTATION_FAILED: com.mobile.sampleApp.debug.test/android.support.test.runner.AndroidJUnitRunner nstrumentation stdout: …
abdul
  • 340
  • 6
  • 18
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
  • 1,091
  • 11
  • 27
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,514
  • 4
  • 27
  • 48
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
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
  • 2,639
  • 6
  • 30
  • 59
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
  • 202
  • 4
  • 17