Assigned
Status Update
Comments
cc...@google.com <cc...@google.com>
be...@google.com <be...@google.com>
ma...@google.com <ma...@google.com> #2
When I run Macrobenchmark via the `connectedCheck` target with info logs on, I can see the arg being set:
```
INFO: Configuring Android Instrumentation driver: android_instrumentation_runtime {
instrumentation_info {
...
args_map {
key: "androidx.benchmark.suppressErrors"
value: "DEBUGGABLE"
}
}
}
```
Attempted to pass the flag via the `-e` option to the `instrument` command of ADB, but no change to error output:
```
$ adb shell am instrument -w com.ring.benchmark/androidx.test.runner.AndroidJUnitRunner -e androidx.benchmark.suppressErrors DEBUGGABLE
...
ERROR: Benchmark Target is Debuggable
```
```
INFO: Configuring Android Instrumentation driver: android_instrumentation_runtime {
instrumentation_info {
...
args_map {
key: "androidx.benchmark.suppressErrors"
value: "DEBUGGABLE"
}
}
}
```
Attempted to pass the flag via the `-e` option to the `instrument` command of ADB, but no change to error output:
```
$ adb shell am instrument -w com.ring.benchmark/androidx.test.runner.AndroidJUnitRunner -e androidx.benchmark.suppressErrors DEBUGGABLE
...
ERROR: Benchmark Target is Debuggable
```
be...@google.com <be...@google.com> #3
Are you seeing a line like the following? :
ERRORS (not suppressed): ...
WARNINGS (suppressed): ...
Can you try suppressing other errors, does that work? E.g. run the macrobenchmark on an emulator, which should require adding "EMULATOR" to the suppression list, and show it as a suppressed warning.
Description
Version used: 1.1.0
Devices/Android versions reproduced on: All
All the examples are pretty basic, in which Dagger or Hilt are not used. However, modern android development tends to have injections happening in the Application class or elsewhere in the activities that might be under test.
If you replace the Application name in the android manifest for the tests, the Test runner will crash immediately and there is no way to get why it crashed. Extending the BenchmarkRunner also reproduces similar results.
Ideally need a sample that shows how to work with dependency injection that may need a custom class for testing environments.