In the Apex Classes page, how can I create a view that filters on code coverage ? Code coverage is one of the fields selectable so I figured I could do just do:

Code coverage -  less then -  90

But this is not working, the view still contains classes with 100% test coverage. What value can I use ?

Update: I combine this with a namespace filter to filter out package apex

Namespace Prefix  - equals  -  (blank)

Filter logic 1 AND 2

Neither 90 or 90% give a different result, nor should the namespace filter have any impact, the code coverage filter appears to not be applied, whereas the namespace filter is applied.


  • Both "Greater Than" and "Greater of equal" will work as expected, but both "Less than" and "Less or equal" do not.
  • While either of the "less" can be negated with NOT and work, using NOT on either of the "Greater" operators will not work and display all classes.

Is this is a bug or am I doing something wrong ?

  • Aren't percentages expressed in terms of a float between 0.0 and 1.0? – bigassforce Apr 30 '13 at 12:45
  • I've tried, for code coverage this is not working and will only show you the 0% ones. – Samuel De Rycke Apr 30 '13 at 12:51

This should work. When I used it I had the % sign in my value, but looking at this again it works even without it. Here is an example that works for me. Example of working filter

Can you post your full filter? Are you perhaps using filter logic with multiple conditions?

EDIT-- So looking at this again in light of what you've said, it looks like the less filter fails specifically on the case of classes with 100% coverage. I tried progressively lowering the value in the filter and it seems to work against values less than 100 but not 100%. So <90% gives you <90% + everything with 100%. Looks like a bug to me!

Filtered on coverage less than 40%

Here are my results for "<40% coverage"...

  • 2
    I guess they are performing an alphabetical comparisment and not a numerical. I've added a "does not contain 100" filter clause which seems to do the trick. – Samuel De Rycke Apr 30 '13 at 12:21
  • Yes! That's it. I just tried filtering on code coverage <4 and got results from 39% down. So it is an alpha comparison. – Doug B Apr 30 '13 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.