I am fairly new to android development, so please be patient.
I want to create an automated test for an application and run it via adb The test case that I generated does simple actions (such as clicking buttons) however I can't find a way to simply run this test without having to use Android studio
@Test
public void mainActivityTest() {
ViewInteraction switch_ = onView(
allOf(withId(R.id.switch1), withText("Switch"), isDisplayed()));
switch_.perform(click());
Is there a way to take the package generated by espresso and run it directly from adb, without having to open the source code and android studio (since it takes a lot of resources ) ?
If not, is there some kind of independent automation tool that would generate a test file and that test would be ran from an ADB shell.
您可以使用Gradle任务(例如, connectedAndroidTest
) 从命令行运行检测测试。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.