0

My project contains multiple test classes and each class contains some test methods. I can run all the test using command line

gradlew testDebugUnitTest

Is there any gradlew command to run specific testMethod from a class?
Is there any gradlew command to run all test mmethods from a specific class?
Ranjan Kumar
  • 1,164
  • 7
  • 12

1 Answers1

0

Here is a class Foo2 and bar3 is the particular method you would like to test. This was taken from the Google developer Junit unit test command line documentation

$ adb shell am instrument -w \
> -e class com.android.demo.app.tests.Foo2#bar3 \
> com.android.demo.app.tests/android.support.test.runner.AndroidJUnitRunner
The_Martian
  • 3,684
  • 5
  • 33
  • 61