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

Running Detox - what are the perquisites from the CI framework?

I have a React-Native app. I want to run Detox tests when a PR is being created. I need the CI Framework to be able to run IOS Simulator and Android Emulator. Currently using BitBucket but Im asking in general - What I should verify in my CI…
chenop
  • 4,743
  • 4
  • 41
  • 65
0
votes
1 answer

java.lang.NoSuchMethodError: No virtual method retryOnConnectionFailure Error when running Detox Tests with Proguard enabled in React Native 0.66

When running Detox tests in our Android mobile solution we are getting the following error. This started to happen when we were upgrading from RN 0.64.2 to 0.66.2. We are running Detox 19.3.1. 12-20 18:29:18.653 10124 10240 E AndroidRuntime: FATAL…
0
votes
2 answers

How to use RCT_METRO_PORT correctly to change metro bundle port?

I would like to run tests on two different builds of iOS, therefore I need the metro bundler to run on two different ports. But it's about the same repo, so I can't change all the occurrences of 8081. Also, I can't change manually the port using…
arnaudambro
  • 2,403
  • 3
  • 25
  • 51
0
votes
1 answer

Detox android test references incorrect Android SDK path. "There was no "aapt" executable file in directory"

I have a React Native app up and running, and have Detox installed and working for iOS, but having issues running the test for Android. When I run the test, I get the following error: There was no "aapt" executable file in directory:…
Attila
  • 1,097
  • 2
  • 19
  • 45
0
votes
1 answer

React Native Detox - Local and CI have different outcomes

I am having strange issue with React Native Detox testing when being ran on local and CI environments. Following is the piece of code being ran on both of the environments: import { E2E_IDS } from './constants'; import { executeBeforeEachTest, …
Taimoor Khan
  • 183
  • 1
  • 3
  • 17
0
votes
1 answer

React Native End to End Tests with Detox: Getting height, width, and other properties of matched elements

As the title states, I would like to programmatically retrieve properties of matched elements in Detox. I know Detox sees them, because as we all infamously know when a toBeVisible expectation fails by the 75% view rule (a built in Detox opinion for…
fullStackChris
  • 1,300
  • 1
  • 12
  • 24
0
votes
1 answer

Getting error "detox_1.web is not a function"

I'm getting an error trying to use web(). I'm on Detox 18.22.1 and am importing it into my TS test script like this: import {by, device, element, expect, waitFor, web} from 'detox'; In my class, I declare a var for the web view and assign it in…
0
votes
1 answer

Adb shell command to disable keyboard suggestions on android

So I am trying to disable keyboard suggestions and contact suggestions programmatically on an aosp api 29 emulator (for e2e screenshot test purposes) which I belive should start like adb shell settings put ... but I cannot seem to find a command to…
0
votes
1 answer

DetoxRuntimeError: NSInvalidArgumentException +[UIWindowScene _keyWindowScene]: unrecognized selector sent to class 0x12dd58db0

I have installed -g detox-cli, and detox --save-dev (inside the project root) and I can build the app, but when I try to run it, I am always getting this error. I checked the execution and the element with the text is being displayed, but none of…
0
votes
2 answers

Detox not taking passed in environment variables

I am setting up testing environments on a react native app. Recently, my build commands have stopped including the environment variables that I pass into them. EMAIL=testemail@test.com PASSWORD=testpassword xcodebuild.... When the app runs,…
ismaupin
  • 27
  • 5
0
votes
1 answer

How to match element by ancestor index in react-native detox

I'm trying to follow a personal pattern for react-native detox, which consist of something like this: export const noteCardDescriptor = (baseID: string) => (index: number) => { return { get element() { return…
Gabriel Rohden
  • 1,307
  • 9
  • 19
0
votes
1 answer

Error with wix/Detox on run detox build -c android

I have this configurations to running Detox: app/build.gradle app/build.gradle tag dependences build.gradle build.gradle repositories and the command fail, returned this:
0
votes
1 answer

Detox cannot find adb if run via GithubActions

I got an error during the attempt to run android tests on mac OS machine via github actions DetoxRuntimeError: Detox instance has not been initialized HINT: There was an error on attempt to call detox.init() Error: There was no "adb"…
0
votes
2 answers

iOS React Native app fails to install with Xcode 12 build tools when installed via Detox

I'm trying to run detox tests, on Android they run correctly. When using Xcode 11 build tools, the app installs correctly and all tests run. When using Xcode 12 the app fails to install. The app attempts to be installed 3 times, and eventually the…
Elliot Rodriguez
  • 608
  • 6
  • 25
0
votes
1 answer

Detox testing + React Native + PouchDB app: our login test keep failing with timeout because of some PouchDB syncing?

tldr It seems that initializing an instance of the PouchDB client (calling new PouchDB(...)) causes some queue worker or background process to spawn that periodically sends a network request to its CouchDB server and in doing so prevents our Detox…
Andrew
  • 56
  • 6