Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Negative matching in filters



my scenarios are:

“Find all test cases that DO NOT HAVE any labels"
"Find all test cases that DO NOT HAVE any references”

For the latter I assume, a report can do this, but I like to have it for the filters in the overview of all test cases.

These fields are not mandatory, but nevertheless it would be great to have the possibility to filter on negative matching.

E.g. for labels, I can only select one of the label and choose between “Match all” or “Match any”, but not like “Match none”, or any better phrasing for a negation.

Also for the references, it seems that an empty string is not accepted. Selecting a condition and leaving the field empty has no affect.

Is there any possibility to filter on negative condition (not sure how this is called officially) ?


Hello Andreas,

This is already possible to some extent with some creativity. For example, if you know that all references start with PROJ, you can add a Doesn't Contain PROJ filter for the References field.

A general concept for negating filters is already on our feature request list. For the Select/Copy Cases dialogs, you can also use the Remove/Add actions and this adds additional flexibility on top of the filters alone.



but this would not help me finding all cases without any reference, but its good to hear that its on your list. thanks


Actually, it would! When searching for all cases with references that don’t include a certain string, TestRail would also return cases with an empty references field.

I hope this helps!



ok I see - so I can filter with that trick all cases that have no references.

Unfortunately this is not working for labels

thanks again


Yep, that’s true and we will make sure to look into a generic way to negative filters, or search for empty attributes.



Yup, throw another vote on here for that, especially “empty attributes”.

I have been tasked with finding out what testcases don’t have any associated steps with them. Right now the only way I can do that (as far as I know) is to export all the entire testcase folder to CSV and load it into excel; then use excel’s magic to show me the testcases that have no steps associated.

unfortunately, i have no easy way to mark those back in Testrail as “needing attention” or something to that effect.

unless, of course, you can give me a magical way to do something like this :slight_smile:


Hi Jim,

Thanks for your feedback. :slight_smile: For most attributes, you can simply add them as a column to the tables and then sort by this attribute (cases with no value for this attribute will appear at the top of the list). This is not possible for Text and Step fields because they cannot be added to the tables but you can use the exports or API to automate this.



+1 for the ability to filter by “does not equal” and “is blank”. The “sort by” workaround just doesn’t cut it sometimes!


Hi Brooke,

Thanks for your feedback! I added your vote to the request.



Are there any updates on this being released? Not having negative matching filters is an extreme burden on suites with thousands of test cases. I would love to see this added asap. Thanks!


Hi Lauren,

Thanks for your reply! We still have plans to look into adding this to our filter options, however we don’t have any timeframes/ETAs for this just yet. I’ve also added your vote to the request on your behalf.



This option is vital, I hope you are going to add this soon.