thombashi / pytest-md-report

A pytest plugin to generate test outcomes reports with markdown table format.
MIT License
33 stars 5 forks source link

Feature request: verbose only for errors #8

Closed joekiller closed 4 months ago

joekiller commented 7 months ago

Thank you for this very nice plugin. I have integrated it into our builds and appreciate it as is. I couldn't help but think, when I discovered a failing test, I wish the plugin could be verbose for test failures but not for successful tests.

That way I could have a clean report when there are no issues and if there are, I could see the tests that were failing. I'm currently using the verbose output so that I may at a glance review the errors but of course this makes the total report much longer.

Thanks again for the plugin; it is useful as is.

thombashi commented 7 months ago

@joekiller Thank you for your feedback.

One idea to resolve your issue is to add an option to suppress certain test result outputs for the report. For example, if you run pytest with the verbose option while suppressing pass results, only failed or skipped tests will be reported in verbose. This may not be exactly the output you desire. However, this approach simplifies the implementation, potentially making the feature easier to provide.

What do you think about this?

joekiller commented 6 months ago

I think that is useful yes. Thank you for your consideration of the enhancement.

thombashi commented 4 months ago

I had implemented the feature at pytest-md-report v0.6.0. https://github.com/thombashi/pytest-md-report?tab=readme-ov-file#add-report-to-pull-requests-only-failed-tests

Please try that version.