Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Android tests on Linux #594

Closed
chrmod opened this issue Feb 28, 2018 · 5 comments
Closed

Running Android tests on Linux #594

chrmod opened this issue Feb 28, 2018 · 5 comments

Comments

@chrmod
Copy link

chrmod commented Feb 28, 2018

Description

Running Detox on Linux fails before emulator is able to start and install the app.

Steps to Reproduce

Try to start detox test for any of example projects on a Linux machine. We have problems doing that and have to update demo-react-native to do that #593

On MacOS the build and tests works correctly and all tests are green.

On Linux, same code base, start the emulator, and runs the tests, but tests start to fast and fail.
(When emulator finally finishes the initialization, the apk is not installed)

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 7.1.0
  • Node: 8.9.4
  • Device: Android Emulator 22/25/26 x86/arm
  • Linux: 4.13

Device and verbose Detox logs

node_modules/.bin/jest e2e --config=e2e/config.json --runInBand
 server listening on localhost:33293...
 onOpen [object Object]
 send: {"type":"login","params":{"sessionId":"f01bf5bd-4da5-61d2-39ff-27239855f5ef","r
ole":"tester"},"messageId":0}
 onMessage: {"type":"loginSuccess","params":{"sessionId":"f01bf5bd-4da5-61d2-39ff-2723
9855f5ef","role":"tester"},"messageId":0}
  rbx
 : /home/chrmod/Android/Sdk/tools/emulator -list-avds --verbose
 Nexus_5X_API_22
 Nexus_5X_API_24
 Nexus_5X_API_26
 Pixel_XL_API_26
 : stdout:
 -verbose -gpu host -no-audio @Nexus_5X_API_22
 : /home/chrmod/Android/Sdk/platform-tools/adb  devices
 List of devices attached
 emulator-5554  device
 : stdout:
 : stdout:
 FAIL  e2e/firstTest.spec.js
  Example
    ✕ should have urlbar (3ms)
  ● Example › should have urlbar
    response not received
      at setTimeout (../node_modules/telnet-client/lib/index.js:150:47)
      at Timeout.callback [as _onTimeout] (../node_modules/jsdom/lib/jsdom/browser/Win
dow.js:633:19)
@chrmod
Copy link
Author

chrmod commented Feb 28, 2018

PS. are you aware of any project tested of Detox running on Travis CI? I would assume that if it runs on Travis it will work on most Linux boxes.
I'm willing to help with updating example projects accordingly and Travis CI setup.

@rotemmiz
Copy link
Member

Does your CI support x86 emulators? Are you using x86 or ARM emulators ?
ARM emulators are terribly slow, and you might get this 3 minute timeout just because it takes it super long time to init the ARM emulator. Try a (much) higher timeout and see.

Re x86 emulators, Travis currently does not support that, this is the reason we don't run Android e2e in CI... We are working on creating a proprietary CI solution with nested virtualization support for our open source projects, just so we can run Android e2e tests.

@chrmod
Copy link
Author

chrmod commented Mar 14, 2018

@rotemmiz this report is about running on developer station not in CI. So yes, I've tested with x86 emulator and with ARM one. In both cases tests finish before emulator even fully load, the app in not even installed.

This issue is potentially related: #524 - though I was able to run tests on MacOS, only Linux is a problem.

PS. have tried running update demo-react-native project with same effect.

@stale
Copy link

stale bot commented May 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions.

@stale stale bot added the 🏚 stale label May 10, 2018
@stale
Copy link

stale bot commented May 17, 2018

The issue has been closed for inactivity.

@stale stale bot closed this as completed May 17, 2018
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants