
In order to understand the GLUE keyword in cucumber , we first need to understand what is a feature file and a step definition file.
features: Identifies either a directory containing feature files, a specific feature or specific scenarios and examples (pickles) in a feature.
When no feature path is provided, Cucumber will use the package of the annotated class. For example, if the annotated class is com.examle.Runner then features are assumed to be located in com.example.
public abstract String[] features
Returns: the paths to the feature(s)
Default: {}
glue: Package to load glue code (step definitions, hooks and plugins) from. When no glue is provided, Cucumber will use the package of the annotated class. For example, if the annotated class is com.example.Runner then glue is assumed to be located in com.example.
public abstract String[] glue
Returns: where to look for glue code (stepdefs and hooks)
Default: {}