1、在 android studio 直接 run as 可以运行,执行脚本,运行日志打印如下执行命令
adb shell am instrument -w -r -e debug false -e class 'com.testdemo.Test#testLoan' com.haofenqi.myapplication04.test/androidx.test.runner.AndroidJUnitRunner

2、直接 cmd 运行 adb shell am instrument -w -r -e debug false -e class 'com.testdemo.Test#testLoan' com.haofenqi.myapplication04.test/androidx.test.runner.AndroidJUnitRunner 则不会执行脚本,如截图

3.使用命令 adb shell pm list instrumentation

求大神帮忙看下,是什么原因导致直接使用命令无法执行脚本?


↙↙↙阅读原文可查看相关链接,并与作者交流