Option to hide terminal coverage report on test failure
See original GitHub issueThis is a feature request related to the term/term-missing reporters. In general I would like to use
addopts =
--cov=myproject --cov-report term-missing
so that co-developers automatically see coverage stats on stdout. However, for big projects, the coverage reports fills more than an entire page on the screen. In case all tests were successful this is fine, because here the coverage is the most relevant information for the developer. However, if a test fails, coverage isn’t so relevant and the user has to scroll back up to get information on the failed test. This can get annoying to the point that I often turn off the reporter during development.
It would be nice to have the option to report coverage to terminal only in the success case.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Command line usage — Coverage.py 6.4.4 documentation
The -i or --ignore-errors switch tells coverage.py to ignore problems encountered trying to find source files to report on.
Read more >pytest-cov - Read the Docs
--no-cov-on-fail. Do not report coverage if test run fails. Default: False. --no-cov. Disable coverage report completely (useful for ...
Read more >Customize pipeline configuration - GitLab Docs
You can customize how pipelines run for your project. For an overview of pipelines, watch the video GitLab CI Pipeline, Artifacts, and Environments....
Read more >Customizing Code Coverage Analysis - Visual Studio (Windows)
Learn how to use the ExcludeFromCodeCoverageAttribute attribute to exclude test code from coverage results. You can include assemblies ...
Read more >How can I use pytest-cov to both generate a coverage report ...
If you run with the coverage CLI directly, you can do this I think. · You have more control if you split up...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Assuming
--no-cov-on-fail
is what is wanted here.@bluenote10 so it turns out there’s
--no-cov-on-fail
- doesn’t that solve your problem?