我在Java IntelliJ项目中配置了各种执行和测试配置。是否可以从命令行对给定项目和配置执行IntelliJ?
答案 0 :(得分:0)
You will need to define a command line build project to run your tests from the command line, as IntelliJ (or any graphical IDE) does not provide tools to do so.
In the following directions I picked Gradle as command line build language, though some use Ant, or Maven as possible alternatives. The gradle syntax is based on Groovy, which is a JDK-based scripting language.
A sample configuration for a basic java project is here: http://www.vogella.com/tutorials/Gradle/article.html
Once your Gradle project is setup, you can run 'gw test' from command line.
I highly suggest to install gradle wrapper called 'gdub' from here: https://github.com/dougborg/gdub -- this will save typing ./gradlew all the time.
Hope this helps!