How to ignore failed test in Android macrobenchmark

139 Views Asked by At

I create some macrobenchmark test on Android. And refer to the Android documentation, i can run all the benchmark tests using single gradle command below:

./gradlew :macrobenchmark:connectedCheck

However, some tests are FAILED and stop the process.

And I have no idea why macrobenchmark is so flaky, success on some iterations and failed on next iteration. I already setup my device to no disturbing condition or activity such as Push notifications, etc.

Below is example error:

com.example.benchmark.ActiveAlertBenchmark > scrollActiveAlert[SM-G985F - 13] FAILED 
        java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.test.uiautomator.UiObject2.click()' on a null object reference
        at com.example.benchmark.UtilsKt.searchByTextAndClick(Utils.kt:112)

Can I just ignore the FAILED and continue run the test process?

Thank you

0

There are 0 best solutions below