Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run single test cases via Android's ant build script?

Android's standard build.xml comes with complete support for executing functional test cases on devices and emulators via the test target. But this target always executes all test cases in a test project; how can I instruct it to run only a single test case, for debugging reasons?

like image 401
Thomas Keller Avatar asked Jan 22 '26 11:01

Thomas Keller


1 Answers

You can use adb shell "start instrument -w -e class package_name/class_name package_name/android.test.InstrumentationTestRunner"

like image 76
Frank Cheng Avatar answered Jan 24 '26 02:01

Frank Cheng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!