问:如何在多个设备上运行单个测试? [英] Q: How to run single test in multiple devices?
问题描述
我试着四处看看如何在多个设备上启动自动化测试,但我真的找不到我想要的东西.
I tried to look around about how to launch an automated test in multiple devices, but I couldn't really find what I was looking for.
我每个班级有 5 个测试,我只想在所有连接的设备上执行一个测试,例如登录的端到端测试.
I have like 5 tests per class and I want to execute just one test in all my connected devices, like a End to End test to login.
我尝试使用连接的设备,但它不只启动我想要的测试...
I tried to use connected device but it doesn't launch only the test I want...
我使用的是 Espresso、UIAutomator、Gradle 和 AndroidStudio.
I'm using Espresso, UIAutomator, Gradle and AndroidStudio.
如何使用这些工具在我的设备中运行该单个测试?
How can I run that single test in my devices using these tools?
推荐答案
使用 gradle connectedCheck
命令您可以在此处从 google 找到示例应用
Use gradle connectedCheck
command
You can find an example app here from google
https://github.com/googlesamples/android-testing-templates/tree/master/AndroidTestingBlueprint
您还可以在那里阅读如何从命令行/终端或从 Android Studio 中在多个设备上运行示例测试
There you can also read how to run the example tests on multiple devices from the command line / terminal, or from within Android Studio
如果你想使用外部工具插件,你也可以看看 Spoon:https://github.com/square/spoon
You can also take a look at Spoon if you want to use an external tool plugin: https://github.com/square/spoon
祝你好运
这篇关于问:如何在多个设备上运行单个测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!