What are layers of Test Automation Code?
A well-written Cucumber test automation framework is organized into several layers to make the automation code easier to understand and to maintain.
At the top layer, it is executable specifications written in Gherkin, the Given-When-Then notation. These describe scenarios, along with the preconditions and expected outcomes for each scenario.
Each scenario in this step gets executed using test automation code written using Cucumber. It is called glue code, and its job is to coordinate and orchestrate with the application under test.
The glue code coordinates classes and methods in a test domain layer, which models the interaction with the application, and this is where we do web driver or REST API calls.