Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ 14 Gradle task in Test Runner

Upgraded to IntelliJ 14.0.1 One of the big new features I was looking for:

"If you run tests via a Gradle task, the IDE offers you the standard Test Runner instead of the console output." (Source: https://www.jetbrains.com/idea/whatsnew/#buildTools)

I right click on the Gradle Task to run our Integration Tests:

enter image description here

However, I see the results of the test still going to console output, not to the Test Runner:

enter image description here

Has anyone been able to get this new feature in IntelliJ IDEA 14 to work?

Thank you in advance,

Philip

like image 232
Philip Tenn Avatar asked Nov 18 '14 19:11

Philip Tenn


People also ask

How do I run a Gradle task from the command line?

To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … ​ e.g. gradlew clean allTests.

How do I view Gradle tasks in IntelliJ?

Click Gradle on the right sidebar to open the tool window. The tool window displays the Gradle linked projects, their tasks, dependencies, and all changes made to the underlying build.

How do you run a test case using Gradle command?

Use the command ./gradlew test to run all tests.


1 Answers

Looks like IntelliJ looks for a task named "test" rather than a task of type Test.

https://github.com/JetBrains/intellij-community/blob/master/plugins/gradle/src/org/jetbrains/plugins/gradle/execution/test/runner/GradleTestsExecutionConsoleManager.java#L191

like image 184
Mark Vieira Avatar answered Oct 27 '22 01:10

Mark Vieira