我正在尝试通过命令行在 firebase 测试实验室上运行一个特定的 espresso 测试类。当我尝试运行下面的命令时,androidTest 目录中的所有测试类都会被执行。
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
如何指定要在 Firebase 测试实验室中运行的一个测试类?
TIA
最佳答案
documentation建议您可以使用 --test-targets
标志来运行单个测试:
For example, you can use the --test-targets flag to test just one class used by your test APK, or to test just one method from a class used by your test APK. To learn more, see
gcloud firebase test android run
.
将您链接到 gcloud firebase test 的文档,它向您展示了如何指定特定测试的选项。
关于android - Firebase - 如何使用将在 firebase 测试实验室上运行的命令行运行特定的 Android UI 测试类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54894625/