Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter: hide regular passing tests, show slow passing tests #158

Closed
C-Otto opened this issue Jul 25, 2020 · 4 comments · Fixed by #207
Closed

Add filter: hide regular passing tests, show slow passing tests #158

C-Otto opened this issue Jul 25, 2020 · 4 comments · Fixed by #207
Assignees
Labels

Comments

@C-Otto
Copy link

C-Otto commented Jul 25, 2020

Description

My project has several thousand (unit and integration) tests and I really don't want to see a line for each passing test.
However, there are a few slow tests, and the "slowThreshold" feature is extremely helpful - thank you!

To be able to identify the slow tests, I'd like to see the corresponding output, while the regular (fast) tests are not displayed.

Additional information

Current:

SomeTest testA PASSED
SomeTest testB PASSED
SomeTest testC PASSED
SomeTest testD PASSED (502ms)

Expected:

SomeTest testD PASSED (502ms)
@C-Otto
Copy link
Author

C-Otto commented Jul 25, 2020

Related to #159 (consider time spent in setUp).

@C-Otto
Copy link
Author

C-Otto commented Jul 25, 2020

Quirky workaround for one-shot scans of slow tests: ./gradlew test | grep "s)"

@grimmjo
Copy link
Contributor

grimmjo commented Apr 30, 2021

Hi @radarsh,

what do you think about adding a parameter showSlow? It is true by default.
If showPassed is false, then just all slow passed test will be shown.
This would be an easy extension to the existing code. I can do that 😄

grimmjo added a commit to grimmjo/gradle-test-logger-plugin that referenced this issue May 13, 2021
grimmjo added a commit to grimmjo/gradle-test-logger-plugin that referenced this issue Dec 10, 2021
@C-Otto
Copy link
Author

C-Otto commented Feb 27, 2022

Thanks a lot for the new release! This is how I use it in my project:

testlogger {
    theme 'standard-parallel'
    slowThreshold 1000
    showSimpleNames true
    showOnlySlow true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants