radarsh / gradle-test-logger-plugin

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

Print class name in the same line as the test name #285

Closed dbardbar closed 2 years ago

dbardbar commented 2 years ago

Description

Print class name in the same line as the test name

Additional information

Today the output prints the class name (either full or simple name), then the test output stream(s) are printed, and when test finishes the summary of the test is written. In cases where there's a lot of logs written by a test, it is hard to understand which class the test belongs to. It would be great to have an option to also print the class name next to the test name. I think this should be controlled by a flag orthogonal to the simple/full class name.

Suggested example of output:

TestClass Test TestClass::test1() PASSED (3ms) Test TestClass::test2() PASSED (5ms)

Or with showSimpleNames = false:

com.company.TestClass com.company.Test TestClass::test1() PASSED (3ms) com.company.Test TestClass::test2() PASSED (5ms)

radarsh commented 2 years ago

This already happens if you use one of the parallel themes. Is this not what you're after?

image