Write and Publish a Tutorial!
Do you have good notes or papers written by you and seeking for a
platform to publish? We provide the platform to publish your tutorials
in your name. If you wish to publish your tutorial in your name to
help the readers, Please contact us by sending an email to
publish@tools4testing.com or publish@java4coding.com The main way that
others learn about your work is through your published tutorials. If
you don’t publish, it will be as if you never did the work. Your notes
can help the readers only when you share it.
How Cucumber Framework Works
When you run cucumber framework, it reads the test steps from a file called as feature file. These feature files have the file extension as feature. For example login.feature. Cucumber examines feature files for scenarios to test, and runs the scenarios against application under test. Feature file has list of steps written in Gherkin language. Gherkin language is a set of rules and syntax. Cucumber can understand only these feature files with gherkin language.
After cucumber read test steps from feature files, it needs the step definition to run the steps. Those step definitions can be made available by using any of the automation frameworks like selenium, puppeteer etc… In our tutorial we are using selenium to write the step definitions.
Cucumber maps the business-readable gherkin language of each step into selenium code to carry out whatever action is being described by the step. If the selenium code in the step definition executes without error, Cucumber proceeds to the next step in the scenario. If all steps are executed without any error from selenium definition, it marks the scenario as having passed. A feature file can have any number of scenarios, if any of the steps in the scenario fail; Cucumber marks the scenario as failed and moves on to the next scenario to test. Cucumber prints the result of each step and each scenario showing you exactly what is working and what isn’t.