简体   繁体   中英

How to get the command for an Run Configuration in Android Studio?

When I right on JUnit test class file, a run configuration is formed. I just need to click the run button. How I get the right command or executing process for the run configutration in order to run it in shell?

There is no generic way to this. Idea assembles the classpath from your modul configuration and the AppMain class opens a Sockets to communicate with IDEA and provide infomation about the unit test process.

Running the same command IDEA uses in a shell will not print the results to stdout . It does not help you, even if get that command running from your shell.

You tagged your question as android-gradle so I guess you want to execute android unit tests.

If you want to know how to run unit or android test using gradle in your shell, you can read Unit testing support .

I'm afraid you can't do that in a simple way. Accepted answer from here says that you might have to write your own IntelliJ/Android Studio plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM