I've set up detox on my 2014 mac mini, which is also running jenkins to serve as my CI.
I've been getting inconsistent test results from isNil or isVisible matcher, slow simulator boot up, and tests will always fail when running in headless mode.
I've had to set up jest timeouts as well as await timeouts on the tests to factor the slowness of my mac mini booting up a simulator.
When I run detox on my local 2018 macbook pro, I see no issues and the tests pass fine without so much delay.
Are there hardware limitations that I should be aware about or is there anyway to speed up my mac mini so it doesn't take so long to boot a device?
Is become quite a hassle the detox test is becoming more painful
Related
I am mainly facing an issue with running detox tests on android real device. The main problem I face is that await device.launchApp() just doesn't launch the app. After adding some log traces I see that android instrumentation command is the one that is not actually starting the app. Detox internally calls the command /Users/<uname>/Library/Android/sdk/platform-tools/adb -s 39bc3158 shell am instrument -w -r -e detoxServer ws://localhost:51414 -e detoxSessionId 5c04ed58-aa77-64bb-aa2b-3a008f21ac2b -e debug false com.realapp.app.test/androidx.test.runner.AndroidJUnitRunner. This command hangs and Process Times out after sometime and doesn't launch the app.
If I create an instrumentation test from android studio also I am seeing the same issue and this problem only occurs on a real device and not on a simulator. Simulator works absolutely fine and the test cases run smooth.
I have looked into different issues, used 4.1.2 android studio, Invalidated cached and restarted upgraded to latest beta android studio and nothing seems to help.
Also the instrumentation tests run fine on the real device if i open the app manually after starting the tests. The tests are just not launching the app automatically.
When the react-native is running, debug js remotely can be turned on and run normally. However, when the debug js remotely is not turned on, the program will run incorrectly. Why
Remote JS debugging makes the phone reliant to the browser Javascript engine that may be different in some cases (for me the problem came using new Date().
When the remote JS debugging runs on device it uses the device JavascriptCore provided by the react-native application.
I'm not aware about other occasions where this may occur.
Is it possible to see simulator while running test cases on bitrise . I am running detox test cases using bitrise as CI. I am not sure how it works therefore I am not at any idea of initiating the simulator on cloud and visible to user.
App platform : React Native
OS : iOS
Testing Framework : Detox / wix
CI Tool : bitrise
Remote access is now built into bitrise.io directly, no need to add any step: https://devcenter.bitrise.io/builds/remote-access/
It supports both SSH and VNC connection for Mac VMs (VNC is the protocol used by the macOS built in "Screen Sharing" app but of course you can find clients on other operating systems) so you can screen share into the macOS build VM (for Linux build VMs only SSH is supported at the moment).
I'll leave the original answer here as that still works:
There's a semi-official, ngrok based solution, using the https://github.com/bitrise-steplib/steps-remote-access-macos-ngrok bitrise step. You can find a setup & usage guide at: https://gist.github.com/viktorbenei/c6d4fe1e68de739dbb5f4f15de76b9db
A built in solution is also planned, in the meantime using ngrok (which this unofficial step uses) or a similar tool can provide a solution.
In Eclipse, I want to test some java microedition network code -- javax.microedition.io.HttpConnection -- to see if the network connection is successful and get some cookie values. But running this code using a JRE on my development machine doesn't execute the method, unless I launch and test using a simulator.
Can I run BlackBerry code using a desktop JRE or will I always have to test using a simulator?
I've never heard of a way of running BB code without running the simulator. You can set a program to automatically start the simulator and "click" some buttons so you can run tests automatically, but I don't think this is what you're looking for...
How does the speed of a program when run in the simulator compare to a real iPhone or Ipod touch? Is it faster or slower?
iPhone simulator is simulator. It doesn't emulate real hardware, just mimics its behavior. In fact, apps compiled for simulator are just x86 binaries executed on Mac OS X machine directly. So it fully utilizes all processing power and network bandwidth of the development machine.
You can assume you're running regular Mac OS X app. In fact, it is. This is the answer for why we can't run iOS app in iOS simulator. You need compiled binary for x86. However, with this approach, you can't get exactly same behavior with real device.
Basic UIKit graphics are very fast because it's simulated on top of OS X's Quartz which is hardware accelerated, but the OpenGL ES context is an exception. It's really slow. Even it's a simulator, the simulator emulates OpenGL ES with software renderer to display correct result. It doesn't use hardware accelerations.
Android emulator is an emulator. It's essentially a VM emulates all of target machine behaviors, so it is far more slower than iPhone simulator. But it can behave exactly same with real device. You can even run Android app from Android market on Android emulator directly.
However there is some gotchas. There're so many Android hardware, but emulator only emulates a part of them. Google's implementation. If your device have its own special module, of course, it cannot be emulated. It's possible using some kind of emulator plugin from each hardware vendors, but as I know, almost no vendor offers it.
So, iPhone simulator is always a lot faster than real device. And Android emulator never been faster than real device even it had become a lot faster than initial release.
iPhone simulator (fully?) utilizes computer resources so it runs faster than real device.
That may mean that you need to always make application tests on real device to get adequate picture of application performance.