Package com.privalia.qa.aspects
Class RunOnTagAspect
- java.lang.Object
-
- com.privalia.qa.aspects.RunOnTagAspect
-
public class RunOnTagAspect extends Object
Allows conditional scenario execution using @skipOnEnv and @runOnEnv tags- Author:
- Jose Fernandez
-
-
Constructor Summary
Constructors Constructor Description RunOnTagAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Allows conditional scenario execution.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)
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)
boolean
checkParams(String[] params)
String[]
getParams(String s)
protected void
replacementScenarios(List<gherkin.ast.Tag> tags, gherkin.ast.Location location, String keyword, String name, String description, List<gherkin.ast.Step> steps)
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)
boolean
tagsIteration(List<gherkin.ast.Tag> tags, gherkin.ast.Location location)
-
-
-
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.
- \@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 pjptags
- the tagslocation
- the locationkeyword
- the keywordname
- the namedescription
- the descriptionsteps
- the stepsexamples
- the examples- Throws:
Throwable
- the throwable
-
tagsIteration
public boolean tagsIteration(List<gherkin.ast.Tag> tags, gherkin.ast.Location location) throws Exception
- Throws:
Exception
-
-