add ability to categorize test data for functional tests (fixes #3422, BP from #3404)

add ability to categorize test data for functional tests (fixes #3422, BP from #3404)

(cherry picked from commit a3beff99b303105c04cbf40dd3918ed3f1828504)