JUnit5: Same parameterized test against two different sets (depending on tags)

78 views Asked by At

I have two different sets of parameter sources for a parameterized test (set 1 being a subset of set 2). Depending on JUnit5 tags I want to execute the same test method either against set 1 or set 2.

Unfortunately neither the annotation @ParameterizedTest nor @MethodSource allow to specify a tag.

Obviously I can define two different test methods which have the same functionality but act on different parameter sets but that is very redundant/verbose. Isn't there a more elegant way?

0

There are 0 answers