Although TestNG has a feature to run specific groups of tests using the groups attribute, there may be cases where users will want to filter the data during extraction to include or exclude a subset of test data. The following filter code can be added to the DataProvider method (see the preceding placeholders).