You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a support for running Android tests on Android emulator to properly test all code that runs when Envoy Mobile runs on real Android devices.
Some of the code that's executed when Envoy Mobile runs on Android is hidden behind a compiler flag check that looks as follow: #if defined(__ANDROID_API__). For example:
To properly test this code Envoy Mobile has to be build under android cc tool chain and the app (or test host) has to run on an emulator or a real device. As of now, there are no option to run tests like this in Envoy Mobile repo. Since testing of such code is impossible it's currently untested which leads to issues like #2432.
On the surface it seems that we could add support for running Android tests on emulator by using android_instrumentation_test macro that's documented in here. There is a GH issue bazelbuild/bazel#7069 which seems to suggest that this specific bazel macro does not currently work on macOS. That should not be a problem if we are OK with running these tests on Linux machine.
The text was updated successfully, but these errors were encountered:
We talked with @jpsim and Lyft client tooling folks to see what the next steps here could be. A few updates/notes from what we talked about and eventually decided on:
we decided not to go with android_instrumentation_test macro. It not working on mac os being one of the reasons.
we are planning to have a setup that's similar to our set up for running Envoy Mobile example apps. We will write custom scripts for compiling test files as part of a test example app that will be then run on an actual Android emulator. There are some concerns here related to state sharing between different tests (we would like tests to be isolated from each other) and the ability to use Android testing framework when our tests are compiled as part of a 'normal' Android app/target (and not a special testing one).
Add a support for running Android tests on Android emulator to properly test all code that runs when Envoy Mobile runs on real Android devices.
Some of the code that's executed when Envoy Mobile runs on Android is hidden behind a compiler flag check that looks as follow:
#if defined(__ANDROID_API__)
. For example:envoy-mobile/library/common/jni/android_jni_utility.cc
Line 19 in 4cf9236
To properly test this code Envoy Mobile has to be build under android cc tool chain and the app (or test host) has to run on an emulator or a real device. As of now, there are no option to run tests like this in Envoy Mobile repo. Since testing of such code is impossible it's currently untested which leads to issues like #2432.
On the surface it seems that we could add support for running Android tests on emulator by using
android_instrumentation_test
macro that's documented in here. There is a GH issue bazelbuild/bazel#7069 which seems to suggest that this specific bazel macro does not currently work on macOS. That should not be a problem if we are OK with running these tests on Linux machine.The text was updated successfully, but these errors were encountered: