JUnit Categories includeCategories filter not working for Parameterized tests


I’ve a small Java project at https://github.com/marcosbento/JunitParameterizedGradleBug where it seems that JUnit includeCategories is not working for Parameterized tests.

The project uses excludeCategories to customize :test task and exclude all tests with @Category(Tag.class). That is working perfectly for both regular and parameterized tests.

However, the project defines a new :tagTest task specifying includeCategories, but in this case tests the @Category(Tag.class) are not included with they are also annotated with @RunWith(Parameterized.class).

I’m I doing something wrong?

I’m having the same problem. I’ve tried a minimal “not working” example using gradle 2.12, 2.14, 3.1 and 3.3. Since the forum-description asks for github issues I created one. I refered to your github-repo and hope, that’s in your best interest.

It seems that this is very similar to GRADLE-3112.