jeudi 3 mars 2016

How can intelliJ run gradle task as test

I have a gradle project with "unit test" and "integration tests" tasks defined as follows:

test {
  include '**/*Test.class'
}

task integrationTest(type: Test) {
  include '**/*IT.class'
}

I created a run configuration in IntelliJ to run all unit tests like image shows:

Run configuration of gradle 'test' task in intelliJ

And did the same with the task 'integrationTest':

Run configuration of gradle 'test' task in intelliJ

IntelliJ 'understands' the test task and run it showing graphical results, like in this image:

IntelliJ showing the results of gradle test task

The same doesn't happen when it runs the 'integrationTest' task. The results are shown in text, like when I run the task by command line.

Aucun commentaire:

Enregistrer un commentaire