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

Detox pointing to wrong sdk/emulator location

Basically all is configured ok, detox build is successful. When i try to run detox, somehow [exec.js/EXEC_CMD, #0] "/usr/local/bin/emulator" is pointing to a wrong location of emulator. In bash_profile all is set ok (echo, other commands are…
maiky
  • 16
  • 3
0
votes
1 answer

How to use e2e or unit testing with nativescript-vue?

How to use e2e or unit testing with nativescript-vue? Would you please describe a Getting Started kind of guide? Is there any tested testing method with nativescript 7 ? Does appium or detox really work? Is it possible to update ui-tested-nsvue-app…
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55
0
votes
1 answer

reloadReactNative() is acting different from ios to android

I have two tests: describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); }); it('should have welcome screen', async () => { await Login.setUsername(username); await Login.setPassword(password); await…
maiky
  • 16
  • 3
0
votes
0 answers

Detox matchers work locally but fail on Circle CI

Description As I'm working on a React Native Typescript project, I'm having trouble implementing e2e testing on my CI. I am running Detox locally on a Mac with Catalina 10.15.6. The tests pass consistently (after I fixed flakiness noted here). When…
0
votes
2 answers

React Native: How to navigate from one screen to another in Detox tests

I am trying to write tests for my application using Detox. but while navigating screen from Login screen my tests get failed due to matcher not found. I have added testID properly in render function still getting an error. here is my tests…
user2586519
  • 250
  • 1
  • 6
  • 18
0
votes
0 answers

Replacement to toBeVisible() in Jest

I installed detox for E2E testing with react-native, and i saw that after init command there is a firstTest.e2e.js file, now when i changed the file to be .ts i get: Property 'toBeVisible' does not exist on type 'JestMatchersShape
Barak
  • 654
  • 13
  • 30
0
votes
1 answer

Detox: Do you need to call device.reloadReactNative before each test?

It's unclear to me if it is necessary / best practice to call device.reloadReactNative() before a test runs in Detox. The examples make it seem like it is best practice but it's unclear to me. For example calling it in the beforeAll, is this…
Adrian Carolli
  • 695
  • 6
  • 21
0
votes
1 answer

Detox with @react-native-community/async-storage issue?

I am trying to set up my project to run detox e2e tests that were generated by someone else. I am getting an issue that Async-Storage is null. The project runs properly if I am just doing run-android or run-ios, but when I try to run the detox…
shawleigh17
  • 1,147
  • 4
  • 22
  • 42
0
votes
1 answer

How to goBack when using detox and IOS?

According to the detox docs: https://github.com/wix/Detox/blob/master/docs/APIRef.DeviceObjectAPI.md going back is Android only. What would be the recommended way of going back with IOS?
Joshua Augustinus
  • 1,468
  • 3
  • 15
  • 28
0
votes
1 answer

Detox successfully builds but does not install app on Android emulator

I'm getting a successful detox build, and the emulator starts up, but the app is just never installed. react-native run-android (without Detox) works fine. The only error I'm seeing (including in verbose mode) is: "No instrumentation runner found",…
Freewalker
  • 6,329
  • 4
  • 51
  • 70
0
votes
1 answer

Cannot build android with app:assembleAndroidTest - More than one file was found with OS independent path 'targetInvocationEspresso.json'

I've follow and setup exact like this guide for Android: https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md this is my detox configuration in package.json : "detox": { "configurations": { "android": { …
0
votes
1 answer

Detox test not opening app, error: `role=testee not connected, cannot fw action`

I've added detox to our project and configured it following the documentation. I have set permission for clearText as documented in…
0
votes
0 answers

How do I find the source of Android/Gradle "out of memory" errors?

I'm trying to get a React Native app to build, using Detox for e2e testing, and am getting java.lang.OutOfMemoryError (no error message). The app builds fine if Detox is out of the equation. I'm on a macbook pro w/ 16GB RAM. multiDex is…
mchandleraz
  • 361
  • 5
  • 15
0
votes
1 answer

How to check if a particular element is selected or disabled in React Native using Detox?

Theres an accessibilityState prop in React Native, I was wondering if there is any way to validate that in detox? or is there any other approach for validating element states?
Paduado
  • 1,281
  • 12
  • 5
0
votes
2 answers

Detox Handling Push Notifications

I am curently trying to implement a test for push notifications but I am facing some troubles with the handling system. My e2e test looks like this: ``` it('Init from push notification', async () => { await device.launchApp({newInstance: true,…
Prutii35
  • 41
  • 1
  • 4