Document and simplify test case filtering functions
Add documentation about test filtering