Custom step implementations can be implemented by annotating a class with
@StepImplementations and including the class in the run configurations described above.
If the step implementation class requires specific setup and tear down, use the
requiredInitialisationClasses attribute on the
@StepImplementations annotation to list, in order, the initialisation classes.
Setup and tear down methods will need to have the appropriate annotation, e.g.
@BeforeAllFeatures etc., to signify when in the lifecycle to call that method.
See the Javadoc for
com.technophobia.substeps.runner.setupteardown.Annotations for more details.
Each step implemenation method should be annotated with
<expression> is a Java regular expression that is used to match on the strings from feature and Substep files.
Capture groups can be used to map to parameters eg:
Parameters can be converted to other simple types using the @StepParameter annotation and an appropriate Converter, eg:
The actual implementation can do whatever is necessary, if you need to use functionality from other step implementation classes or methods, it is possible to simply instantiate the class and call directly.