Running Android Junit tests from command line

后端 未结 2 1665
不知归路
不知归路 2021-01-03 10:25

I want to be able to run Junit tests from the command line, but when I run this command

java -cp /usr/share/java/junit.jar org.junit.runner.JUnitCore [test c         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-03 10:55

    I just managed to run JUnit tests from command line, but using an adb shell.

    The command was

    ./adb shell am instrument -w com.ffffdforandroid.api/android.test.InstrumentationTestRunner
    

    More details here.

提交回复
热议问题