java - Run specific Android test with gradle -


i need execute android test case (class or method) gradle console. located @ src/androidtest/java/com/example/certaintest.java.

android studio makes available via complicated adb shell instrument.

is possible invoke android test via gradle?

i have read how run 1 test class on gradle, test command line quite complicated way of doing that.

this how android studio launches specific test class:

launching tests $ adb push /.../app/build/outputs/apk/app-debug.apk /data/local/tmp/com.example.andrii.espressotutorial $ adb shell pm install -r "/data/local/tmp/com.example.andrii.espressotutorial"     pkg: /data/local/tmp/com.example.andrii.espressotutorial success $ adb push /.../app/build/outputs/apk/app-debug-androidtest.apk /data/local/tmp/com.example.andrii.espressotutorial.test $ adb shell pm install -r "/data/local/tmp/com.example.andrii.espressotutorial.test"     pkg: /data/local/tmp/com.example.andrii.espressotutorial.test success running tests $ adb shell instrument -w -r   -e debug false -e class com.example.andrii.espressotutorial.exampleinstrumentedtest2 com.example.andrii.espressotutorial.test/android.support.test.runner.androidjunitrunner client not ready yet.. started running tests tests ran completion. 


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -