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 tests hang and reloads app several times before running tests, how to debug?

I am trying to debug an issue where my app takes around 20 seconds to run a single test. The timeline looks like: Run detox test List item App launches ...5 seconds later, app refreshes ...5 seconds later, app refreshes ...5 seconds later, Tests…
Alex Fox
  • 1,175
  • 2
  • 15
  • 27
0
votes
1 answer

Possible for Detox framework to take a photo on simulator/emulator?

I haven't found any documentation from Detox or general conversation about this while researching, so I fear this might not be possible. Has anyone been able to take a photo with the camera app using the Detox testing framework? This would be while…
chell
  • 117
  • 8
0
votes
1 answer

Is there any pre-defined flag from detox that I can know App is running on detox?

I'm looking for some pre-defined flag (macro) so I can skip a specific code in my App when I run detox. if (__RUNNING_ON_DETOX__) { return; // skip this function } As a workaround, I'm using react-native-config and put ENVFILE on detox build. But…
Bright Lee
  • 2,306
  • 2
  • 27
  • 55
0
votes
1 answer

Error: Can't find a simulator to match with "iPhone 6s"

Detox was working fine as expected a couple of weeks ago - i've not updated anything to my knowledge and now I keep getting the following error when trying to test (it builds fine): Error: Can't find a simulator to match with "iPhone 6s", run 'xcrun…
smj2393
  • 1,929
  • 1
  • 23
  • 50
0
votes
1 answer

How to test facebook login using react-native detox

How can I test if the login with facebook is working with detox e2e test? I don't need to pass the full login process (should be greate but we can use mocking for that) but I only want to test if a tap on the login with facebook button will open the…
FredPonch
  • 460
  • 4
  • 16
0
votes
1 answer

error while running `detox build -c android.emu.debug` Task :app:compileDebugJavaWithJavac FAILED in react native

While following the Detox [installation tutorial for android][1], I had the following error running the detox build -c android.emu.debug ❯ detox build -c android.emu.debug detox[23052] INFO: [build.js] cd android && ./gradlew assembleDebug…
0
votes
1 answer

App login screen is from salesforce and I cant click on any element

I testing an app that has salesforce had the login page (iframe with salesforce login page) When trying to interact with the login page, I cant get to any element Inspector element shows ״android.webkit.WebView״ and I cant inspect on ant of the…
0
votes
0 answers

How to click on "Add" when adding a ticket to apple wallet?

Using detox 13.3.1 I am working on writing an acceptance test for this feature in a react-native app. The feature includes adding a ticket to the wallet in which detox test cannot tap on anything once the wallet screen comes up. I tried by.text…
0
votes
1 answer

Is there any way to test occurrence of splash screen in react native using detox?

Actually I am planning to use a package named react-native-splash-screen for implementing a splash screen on my app. I am quite confused regarding implementation of test for occurrence of splash screen. Or, should I not be worried about writing test…
Prakash Bokati
  • 191
  • 1
  • 11
0
votes
1 answer

When Build Directory will be generated under e2e

Can someone explain when the build directory will be generated under the e2e directory in detox. I have done setup, but due to some problem again i am doing it from scratch but got a question when this directory gets created.
Karthik Rao
  • 179
  • 1
  • 1
  • 9
0
votes
1 answer

Detox tests on iPad without the simulator

I have a react native app & a couple of detox test cases for it. I am trying to run these detox tests on iPad without the simulator. Wanted to know if it is possible, if yes then which version of detox supports this. Otherwise is there any other way…
Supraja
  • 11
0
votes
1 answer

Detox: Conditional test case writing

I am new to write test cases using detox for React Native app. I already wrote few test cases and working as expected. Is it possible to add condition in test case like using if-else.
Sujit
  • 610
  • 7
  • 26
0
votes
1 answer

iOS tests fails in Release but works in Debug

I just did a small set of tests for my react-native app and they work well when testing in iOS - Debug mode. But when I try to run it in iOS - Release it just fails, saying can't find the components. I know more information is needed but I have no…
SidFerreira
  • 551
  • 3
  • 20
0
votes
0 answers

How to test an exit app scenario using detox

This questions was already raised before, but left without answer in the issue. What is recommended way to test the current scenario, when on a click of the button there is a BackHandler.exitApp() event? I tried to test like this: await…
sdvig
  • 123
  • 1
  • 6
0
votes
1 answer

Do you know the breaking changes from detox@12 to detox@13?

Migration guide is currently stuck to 12.7.0 whereas the last release is 13.2.0 and (following semver) introduces breaking changes. For my own, I updated to the 13.1 (and before, to 12.11 too) and I got timeout (with xxx is not defined after init)…
VincentCATILLON
  • 136
  • 1
  • 4