radarsh / gradle-test-logger-plugin

A Gradle plugin for printing beautiful logs on the console while running tests
Apache License 2.0
836 stars 37 forks source link

How do you group tests by class? #269

Closed lackovic closed 2 years ago

lackovic commented 2 years ago

Description

When I run the tests using a new Spring Boot project I get:

$ ./gradlew clean test

> Task :test

Prova2ApplicationTests > pippo() PASSED

Prova2ApplicationTests > pluto() PASSED

BUILD SUCCESSFUL in 3s
5 actionable tasks: 5 executed

But in the README the output of the example shows the tests grouped by class name:

Standard theme

How do I get the same grouping? I.E.:

$ ./gradlew clean test

> Task :test

com.bla.bla.bla.Prova2ApplicationTests

    pippo() PASSED
    pluto() PASSED

BUILD SUCCESSFUL in 3s
5 actionable tasks: 5 executed
radarsh commented 2 years ago

Grouping is only supported if you're not using parallel themes. So one of plain, standard or mocha.

lackovic commented 2 years ago

Grouping is only supported if you're not using parallel themes. So one of plain, standard or mocha.

Thanks! I was using non parallel themes, but I still got the tests not grouped.

The reason why I got the tests non grouped is because I had this other configuration in my build.gradle:

testLogging {
    events "passed", "skipped", "failed"
}

Once I removed it I got the expected result.