Cucumber is a Behavior Driven Development (BDD) tool. Cucumber is a tool that executes plain-text functional descriptions as automated tests. The language that Cucumber understands is called Gherkin.
What is profile in cucumber ?
We can create Cucumber profiles to run specific features and step definitions.We can use following command to execute a cucumber profile
cucumber features -p <profile_name>
Ex: cucumber features -p regression
What is cucumber.yml file in cucumber ?
in cucumber.yml file we will create profiles
What is cucumber dry run ?
Cucumber dry run is used to compile cucumber feature files and step Definitions. If there is any compilations errors it will show when we use dry run
Ex: Cucumber features –dry-run
What is scenario outline ?
Scenario outline is used to execute the same scenario with different test data.
we will add test data in examples section
What are the keywords that we use in cucumber scenario steps ?
We use Given,when,Then,And and But keywords in cucumber scenario steps
How to generate cucumber execution reports ?
–format html –out report.html –format pretty
How to run a particular scenario from a feature file ?
We can run particular scenario from a feature file by giving the scenario line number
Ex: cucumber features/test.feature:21
Learn more about Ruby Cucumber Interview Questions in this blog post.
Why Ruby on Rails?
There are lot of advantages of using Ruby on Rails(ROR)
-Gems and Plugins
-Pure OOP Concept
What is BDD Framework.what is the benefit of BDD in selenium?
-BDD is becoming widely accepted practice in agile software development, and Cucumber-JVM is a mainstream tool used to implement this practice in Java. Cucumber-JVM is based on Cucumber framework, widely used in Ruby on Rails world as well as in Java and .Net.
-Cucumber-JVM allows developers, QA, and non-technical or business participants to write features and scenarios in a plain text file using Gherkin language with minimal restrictions about grammar in a typical Given, When, and Then structure.
-The feature file is then supported by a step definition file, which implements automated steps to execute the scenarios written in a feature file. Apart from testing APIs with Cucumber-JVM, we can also test UI level tests by combining Selenium WebDriver.
-For more information on BDD framework with selenium and cucumber visit here.
What software do you need to run a Cucumber Web Test ?
-Ruby and its Development Kit
-IDE like ActiveState
-Watir ( To simulate browser)
-Ansicon and rspec (if required)