1000 feature files in src/test/resources. I want to run only the features file which are even( 2, 4, 6,......1000) how can we do that?
I tried to group them but not sure like this will be good approach.
If you are using JUnit 5 with Cucumber the you can use a PostDiscoveryFilter
from the JUnit Platform to filter out tests.
Something like:
public FilterResult apply(TestDescriptor t) {
// Determine if test descriptor is a feature file based on t.getSource()
Collection siblings = t.getParent().getChildren();
// Find index of t in siblings
// decide to keep or not if index is even
}