问题分析(Analysis)
fail log:
07-08 15:10:12 D/Modulelistener: ModuleListener.testRunFailed(Instrumentation run failed due to 'Processcrashed.'
Crash message:height must be > 0
java.lang.IllegalArgumentException: height must be > 0
at android.graphics.Bitmap.checkWidthHeight(Bitmap.java:453)
at android.graphics.Bitmap.createBitmap(Bitmap.java:874)
at android.graphics.Bitmap.createBitmap(Bitmap.java:836)
at android.server.wm.EnsureBarContrastTest$TestActivity.screenshotBar(EnsureBarContrastTest.java:289)
atandroid.server.wm.EnsureBarContrastTest.lambda$runTestEnsureContrast$0$EnsureBarContrastTest(EnsureBarContrastTest.java:89)
最终导致案例失败:
We use the following command to manually open the navigation bar and retest, the four cases are passed
$ sudo adb shell setprop qemu.hw.mainkeys 0
$ adb shell stop
$ adb shell start
这个箱子的设计没有考虑到手机物理按键的情况。