
flexcover - issue #9
Add ability to exclude class or package from percentage calculation
What steps will reproduce the problem?
When viewing a coverage report sometimes classes or packages get pulled in that you don't want to include in the calculation of percentage of covered code. A right-click option to manually exclude a class or package would be handy to examine what-if scenarios.
What version of the product are you using? On what operating system?
flexcover-0.50
Comment #1
Posted on Sep 12, 2008 by Happy CamelThis does sound like a good one to me too.
Comment #2
Posted on Dec 8, 2008 by Grumpy Lionand for me.
We have generic test helper classes that are tested in their own projects. When we use them they lower the coverage!
Comment #3
Posted on Sep 23, 2009 by Grumpy DogMe too facing the same issue. Was wondering if such a support is now available.
Comment #4
Posted on Jul 8, 2010 by Happy DogI second this idea. When I run my unit test suites to check coverage, the test themselves are included in the report which isn't really what I'm interested seeing in the report. It would be nice if you could filter by package name. One idea would be to include not operator in the search field. So you can do stuff like "-*.tests"
Comment #5
Posted on Feb 6, 2011 by Helpful MonkeyI wrote a little script that edits the report by only include specific packages/classes or exclude them. It edits the coverage data too. Here is it, I wrote it for my ant builds, maybe it is useful for someone else. It's tested on OSX, but should work on Linux or Windows too. It is built against Python 2.6 and needs lxml to be installed. Uses regex patterns as include and exclude parameters, so you must use 'my.package' in include, to only see classes in my.package for example. The regexes are matched and not searched, so 'package' will not hold to include my.package.
- coveragereporteditor.py 7.98KB
Comment #6
Posted on Feb 7, 2011 by Swift Ox@maenu This is awesome. Thank you so much for doing this.
One thing: I'm not sure if it's b/c i'm running the script directly from command line, but it takes space separated patterns not comma separated.
Comment #7
Posted on Feb 9, 2011 by Helpful MonkeyYes, the arguments are space separated. Seems like I forgot to update the help text after changing it.
Status: New
Labels:
Type-Defect
Priority-Medium