Class RunOnTagAspect


  • public class RunOnTagAspect
    extends Object
    Allows conditional scenario execution using @skipOnEnv and @runOnEnv tags
    Author:
    Jose Fernandez
    • Constructor Detail

      • RunOnTagAspect

        public RunOnTagAspect()
    • Method Detail

      • replacementScenarios

        protected void replacementScenarios​(List<gherkin.ast.Tag> tags,
                                            gherkin.ast.Location location,
                                            String keyword,
                                            String name,
                                            String description,
                                            List<gherkin.ast.Step> steps)
      • replacementScenariosOutline

        protected void replacementScenariosOutline​(List<gherkin.ast.Tag> tags,
                                                   gherkin.ast.Location location,
                                                   String keyword,
                                                   String name,
                                                   String description,
                                                   List<gherkin.ast.Step> steps,
                                                   List<gherkin.ast.Examples> examples)
      • aroundScenariosOutlineDefinition

        public void aroundScenariosOutlineDefinition​(org.aspectj.lang.ProceedingJoinPoint pjp,
                                                     List<gherkin.ast.Tag> tags,
                                                     gherkin.ast.Location location,
                                                     String keyword,
                                                     String name,
                                                     String description,
                                                     List<gherkin.ast.Step> steps,
                                                     List<gherkin.ast.Examples> examples)
                                              throws Throwable
        Throws:
        Throwable
      • aroundScenariosDefinition

        public void aroundScenariosDefinition​(org.aspectj.lang.ProceedingJoinPoint pjp,
                                              List<gherkin.ast.Tag> tags,
                                              gherkin.ast.Location location,
                                              String keyword,
                                              String name,
                                              String description,
                                              List<gherkin.ast.Step> steps)
                                       throws Throwable
        Throws:
        Throwable
      • aroundScenarios

        public void aroundScenarios​(org.aspectj.lang.ProceedingJoinPoint pjp,
                                    List<gherkin.ast.Tag> tags,
                                    gherkin.ast.Location location,
                                    String keyword,
                                    String name,
                                    String description,
                                    List<gherkin.ast.Step> steps,
                                    List<gherkin.ast.Examples> examples)
                             throws Throwable
        Allows conditional scenario execution. If the scenario contains the following tag:
        \@runOnEnv(param)
        The scenario will only be executed if the param is defined when test is launched. Configuration map object. More than one param can be passed in the tag. To do so, the params must be comma separated: \@runOnEnv(param): The scenario will only be executed if the param is defined when test is launched. \@runOnEnv(param1,param2,param3): The scenario will only be executed if ALL the params are defined.
        Additionally, if the scenario contains the following tag:
        \@skipOnEnv(param)
        The scenario will be omitted if the param is defined when test is launched. More than one param can be passed in the tag. To do so, the params must be comma separated. The scenario will omitted if ANY of params are defined. (OR)
        Or in separated lines to force ALL of the params to be defined in order to omit the execution
        \@skipOnEnv(param1) \@skipOnEnv(param2) \@skipOnEnv(param3)
        The scenario will omitted if ALL of params are defined. (AND)
        Parameters:
        pjp - the pjp
        tags - the tags
        location - the location
        keyword - the keyword
        name - the name
        description - the description
        steps - the steps
        examples - the examples
        Throws:
        Throwable - the throwable
      • tagsIteration

        public boolean tagsIteration​(List<gherkin.ast.Tag> tags,
                                     gherkin.ast.Location location)
                              throws Exception
        Throws:
        Exception