获取“测试 APK 不包含用户或清单文件指定的测试运行程序类。” 使用 Firebase

Fre*_*han 6 android firebase firebase-test-lab

我尝试通过命令行在 firebase 上运行 UI 测试时收到以下错误:

Test [matrix-1dy3j2omlw7n9] has been created in the Google Cloud.
Firebase Test Lab will execute your instrumentation test on 1 device(s).
Creating individual test executions...failed.                                  
ERROR: (gcloud.firebase.test.android.run) 
Matrix [matrix-1dy3j2omlw7n9] failed during validation: The test APK does not contain the test runner class specified by the user or the manifest file. The test runner class name may be incorrect, or the class may be mislocated in the app APK..
Run Code Online (Sandbox Code Playgroud)

当我尝试使用 2 个 APK 在本地通过命令行运行测试时,我能够很好地运行测试。这是我在命令行中使用的从 firebase 获取错误消息的方法:

gcloud firebase test android run \
>   --type instrumentation \
>   --app app-fred-stage-debug-androidTest.apk \
>   --test app-fred-stage-debug.apk \
>   --device model=Nexus6,version=21,locale=en,orientation=portrait
Run Code Online (Sandbox Code Playgroud)

我需要添加什么来解决这个问题以及在哪里?

TIA

Mai*_*aik 4

看起来应用程序 apk 和测试 apk 在参数中交换了。它应该是

gcloud firebase test android run \
    --type instrumentation \
    --app app-fred-stage-debug.apk \
    --test app-fred-stage-debug-androidTest.apk \
    --device model=Nexus6,version=21,locale=en,orientation=portrait
Run Code Online (Sandbox Code Playgroud)