that's all my problem, I want to run Android TestProject in my application, but I don’t know how, and I found that I can start it with a command, for example. "adb shell am instrument -w com.demo.test / android.test.InstrumentationTestRunner" So I tried using in my application: Runtime.getRuntime (). Exec ("adb shell am instrument -w com.demo.test / android.test.InstrumentationTestRunner"), but has:
03-15 02: 24: 42.246: WARN / System.err (3597): java.io.IOException: Error executing exec (). Command: [adb, shell, am, instrument, -w, com.demo.test / android.test.InstrumentationTestRunner] Working directory: null Environment: null ..... 03-15 02: 24: 42.246: WARN / System.err (3597): called: java.io.IOException: permission denied where is my problem?
source
share