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
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
2 answers

Error running tests with Detox in Expo React Native project

When I try to run my tests using detox in a React Native Expo project, I get the following error: detox[18834] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below: (id = -1000) isReady: {} That might be the…
Sabbir Ahmed
  • 1,468
  • 2
  • 16
  • 21
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…
4
votes
1 answer

Mocking node module in Detox test

Is it possible to mock a node_module using guide provided here: https://github.com/wix/Detox/blob/master/docs/Guide.Mocking.md I was able to mock a regular file, but is it also possible for node modules? If so, how would I do that?
milo
  • 427
  • 5
  • 14
4
votes
0 answers

Detox build with Expo - "Error: Could not find build script in detox.configurations["ios.sim"].build"

Goal: I would like to be able to run detox tests for an expo app with Travis. I created a bare-bones expo app that successfully runs a single detox test on my local machine. After pushing to git and running on Travis, all dependencies install…
Bryan Boyko
  • 191
  • 1
  • 9
4
votes
0 answers

expo-detox-hook is not installed in your osx Library (Expo + Detox + Travis)

ERROR Travis build fails with the following error expo-detox-hook is not installed in your osx Library. Run `npm install -g expo-detox-cli && expotox clean-framework-cache && expotox build-framework-cache` to fix this. Environment NOTE: This is…
Bryan Boyko
  • 191
  • 1
  • 9
4
votes
0 answers

How to import modules for use in detox

Describe the bug I'm struggling to import external packages to use with Detox test files. My specific use case is that a testID is linked to a unique key that I need to pull from a firebase database. I've looked through these threads documenting…
4
votes
1 answer

Pubnub preventing detox syncing

Need some help with Detox. I’ve got a similar issue to https://github.com/wix/detox/issues/272

 We have a Pubnub publish-subscribe SDK included in our app. So, when running a detox test, it will always time out, because it will wait for the…
mckenzit
  • 53
  • 1
  • 6
4
votes
4 answers

Could not find any matches for com.wix:detox:+

Trying to run detox on my android device and running into the following error: > Configure project :react-native-firebase react-native-firebase: using React Native prebuilt binary from…
4
votes
3 answers

Detox build successful but detox test fails

Following the setup provided by Detox on adding Android, the command below that builds detox works fine with no problems detox build -c android.emu.debug Now for the setup on the Package.json file, I'm sure the directories are being provided…
Zonily Jame
  • 5,053
  • 3
  • 30
  • 56
4
votes
0 answers

iOS simulator freezes (hangs) when running detox tests

We're having an issue when running our e2e test suite, particularly when running on CI (Bitrise). During the test suite, a few tests (different on each run) will error out with: ● Test suite failed to run Timeout - Async callback was not…
Magda
  • 153
  • 1
  • 12
4
votes
1 answer

Detox build error: More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

I’m trying to build Detox tests for ReactNative project for android and it’s throwing this error > Task :react-native pdf:transformNativeLibsWithMergeJniLibsForDebugAndroidTest FAILED FAILURE: Build failed with an exception. * What went…
4
votes
0 answers

Timeout of XXXms exceeded. For async tests and hooks, ensure "done()" is called

I do have a problem using detox, and I have absolutely no idea why. I know this kind of issue has been posted before but none of them really seem to answer my problem. I'll first explain it with details and then post some code &…
4
votes
0 answers

Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error

detox test -c android.emu.debug is throwing error as below as test cases are not running. Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the…
suresh
  • 1,977
  • 1
  • 8
  • 8
4
votes
1 answer

React Native Detox mocking files

Please can somebody tell me how the mock files for react native detox tests ? I following this article I am using react-native version 0.57.7 and detox 9.1.2 I created rn-cli.config.js in root directory const defaultSourceExts =…
Peter Zosiak
  • 321
  • 1
  • 10