Android:Espresso测试套件-如何在emulator上现有的应用程序上运行Espresso测试
我想从emulator上的本地驱动程序安装android应用程序,并在现有应用程序上运行浓缩咖啡测试。有没有办法跳过浓缩咖啡测试中应用程序的安装?您可以使用ADB安装APK,然后手动启动测试:Android:Espresso测试套件-如何在emulator上现有的应用程序上运行Espresso测试,android,android-espresso,Android,Android Espresso,我想从emulator上的本地驱动程序安装android应用程序,并在现有应用程序上运行浓缩咖啡测试。有没有办法跳过浓缩咖啡测试中应用程序的安装?您可以使用ADB安装APK,然后手动启动测试: $ adb install myapp.apk (1) $ adb install myapp-androidTest-unaligned.apk (2) $ adb shell am instrument -w com.myapp.test/android.support.test.runner.And
$ adb install myapp.apk (1)
$ adb install myapp-androidTest-unaligned.apk (2)
$ adb shell am instrument -w com.myapp.test/android.support.test.runner.AndroidJUnitRunner (3)
- (1) 上传你的应用程序apk
- (2) 上传您的测试apk apk
- (3) 请确保使用您的测试apk的软件包名称,该名称通常是您的应用程序软件包名称,通过
进行后期修复。您还必须使用完全合格的测试运行程序。这是您在build.gradle文件中指定为.test
的内容testInstrumentationRunner
/gradlew connectedAndroidTest
)
看一看,它讲述了更多关于adb shell am仪器的信息。实际上,您可以使用任何仪器测试运行程序:D