Class MethodGroupsHelper


  • public class MethodGroupsHelper
    extends Object
    Collections of helper methods to help deal with test methods
    Author:
    Cedric Beust , nullin
    • Constructor Detail

      • MethodGroupsHelper

        public MethodGroupsHelper()
    • Method Detail

      • findMethodsThatBelongToGroup

        protected static ITestNGMethod[] findMethodsThatBelongToGroup​(ITestNGMethod method,
                                                                      ITestNGMethod[] methods,
                                                                      String groupRegexp)
        Only used if a group is missing to flag an error on that method
        Parameters:
        method - if no group is found, group regex is set as this method's missing group
        methods - list of methods to search
        groupRegexp - regex representing the group
        Returns:
        all the methods that belong to the group specified by the regular expression groupRegExp. methods[] is the list of all the methods we are choosing from and method is the method that owns the dependsOnGroups statement (only used if a group is missing to flag an error on that method).
      • findMethodsThatBelongToGroup

        protected static ITestNGMethod[] findMethodsThatBelongToGroup​(ITestNGMethod[] methods,
                                                                      String groupRegexp)
        Parameters:
        methods - list of methods to search
        groupRegexp - regex representing the group
        Returns:
        all the methods that belong to the group specified by the regular expression groupRegExp. methods[] is the list of all the methods we are choosing from.