Implements filtering of tests.