HOW-TO Test Rules and Pattern Matches

    

Gravity does not have a built in PCRE or Rule tester, but you can use some tools. This page contains four suggestions to test effects of PCREs, plain text strings, or Rule Conditions. (Before you create a rule to perform a delete action and risk deleting all articles, you should test!)

Test PCRE or Plain Text Expressions with the Quick Filter
Quick Filter (CONTROL + Q or "/")
The Quick Filter is a very fast way to test PCREs (or plain text strings) within the current newsgroup.

ü     Remember to check the Regular Expression box, if testing PCREs
If you select both Subject and From, the logic is OR (in Subject OR in From).
Results depend on the current display filter - set your filter to "All Articles" to test across all articles in the group. To restore the display, re-apply the main filter, or press F5 (after setting focus in the main window with a mouse click).

Ø    Do NOT use a filter that is set to "Include entire thread if any article matches filter"
Also see the Topic

Test PCRE, Plain Text, or Rule Conditions with Filters
(Useful for previewing Rule actions)
Create a new display filter using the dialog to create the PCRE or plain text patterns and conditions similar to your rule and view the filtered results.
The advantage is - you can save the filter and COMBINE filter conditions with most Rule Conditions, if wanted, which you can not do with the Quick Filter (and you do not risk deleting articles).
ü     Do not use "Include entire thread if any article matches filter" in the filter.
Use the Search Window
  Search (Ctrl+Shft+F) (also in the Search Menu)
The Search Window is powerful way to search.
You can optionally search across ALL subscribed groups, rather than just one, and view the matches in the bottom window.
You can search Bodies and Headers. Usually, you should limit BODY or HEADERS searches to Local Articles Only. If you do not, and are storing headers only, Gravity will begin fetching ALL the article bodies from the server (and not store them).
ü      Remember to check the Regular Expression check box, if testing PCREs
See

Use the Rule Itself to Test
The advantage is that you are testing the actual rule.
Create your new rule, but before using a delete or other action (s)action, set the rule action to tag the article for download. Then run the rule manually.
You can see in the group(s) what was tagged. This is nice to see what articles were hit but also what articles were NOT hit, and shows what will actually happen when you apply the rule.
·      Note: Articles with stored local bodies will *not* be tagged (Gravity will not let you tag an article if the body is stored). If you store article bodies, this will not work for you.
Alternately, use the Important Flag (if you are not marking articles important).
You can also enable the rule for incoming articles and watch it for few days to be sure it works, then change the actions to do what you want.

Cleanup/Reset
This method leaves tagged or important flags in the group. To reset or clear the tags quickly for another test:

·      Switch to a "All Tagged Articles" filters (you might have to make one)

·      CONTROL-A (select all) you might need to click in the thread pane to set focus

·      Press "T" once (T is a toggle so will UN-tag everything selected)