What is the purpose of implementing "cucumber.api.java8.En" interface by cucumber step definition classes?.
Asked
Active
Viewed 2,949 times
2
-
3From the [Cucumber Eclipse](https://github.com/cucumber/cucumber-eclipse/wiki/Lambda-Expression-support-for-Cucumber-Java8) page: > If you want to write any step-definitons by lambda-expression, You must have to import cucumber-java8 api(ex.cucumber.api.java8.En) in your step-definition(java) file. – Ascalonian Mar 26 '19 at 18:40
1 Answers
2
From Official Github page:
Declare a step definition calling a method in the constructor of the glue class. For localized methods import the interface from
io.cucumber.java8.<ISO2 Language Code>
En
stands for English, which is a public interface.
public interface En extends LambdaGlue
To execute steps in a feature file the steps must be connected to executable code. This can be done by implementing this interface (step-definitions to be written as Lambda expression).

Saikat
- 14,222
- 20
- 104
- 125