added a comment - - edited
Applied in revIds: 1235412-1235416
All existing tests are passing; now I need to add a few new tests to verify the extra expression combination features.
BTW, the mechanisms used to introduce these matchers into JUnit and TestNG are:
Modified FilterFactory to parse the group expressions, combine them into a single matcher object (with the excludes matcher section inverted). Then, wrapped the matcher in a JUnit Filter implementation, and passed back in place of the old comma-separated listing of Filter instances.
Modified AbstractDirectConfigurator to parse group expressions in much the same way as above (with JUnit), then set the matcher instance STATICALLY on a new IMethodSelector implementation. This static setter is my workaround for the fact that TestNG classloads / instantiates method selectors, rather than allowing instances to be injected directly. I didn't want to use a file-based approach, in case multiple TestNG processes ran simultaneously in a build (the selector would have to know the file name). The old groups / excludeGroups settings are commented out in favor of the new method selector.
These implementations may be controversial / flawed. If so, please provide some guidance as to a preferred alternative mechanism, since I'm relatively unfamiliar with the deep workings of these test frameworks.