radarsh / gradle-test-logger-plugin

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

Ordered output of parallel test run #287

Closed Januson closed 2 years ago

Januson commented 2 years ago

Description

A configuration option that would enable ordered logging of parallel tests.

Additional information

Currently when the tests run in parallel the output is mixed randomly according to how the tests run. Which makes sense since it's outputting the result as soon as the test finishes. This makes output harder to read. Especially in case of parameterized tests.

There are cases where I don't really care about the immediate output. For example when tests run on CI. It would be nice if where was an option to make the test output ordered. Even at the price of it not being immediate. It could hold on until the whole test class finishes and output the result of its tests organized as serial themes do.

radarsh commented 2 years ago

This might mean caching the test results for a very long time and could lead to memory issues, so I'm not sure it's a good idea. A cheap fix might be to do something like ./gradlew build | sort | uniq in the pipelines.