If you're looking for Ruby Cucumber Interview Questions for Experienced & Freshers, you are at right place. There are lot of opportunities from many reputed companies in the world. According to research Ruby Cucumber has a market share of about 0.6%. So, You still have opportunity to move ahead in your career in Ruby Cucumber. Mindmajix offers advanced Ruby Cucumber Interview Questions 2018 that helps you in cracking your interview & acquire dream career as Ruby Cucumber Developer.
Q. Cucumber execution starts from where?
Cucumber execution will starts from support. In support first it will load the env.rb file then it will load hooks.rb and then it will start execute feature file scenario steps.
Q. What is support, env.rb and hooks.rb ?
Support is a foder where we can setup cucumber related support.
Env.rb file will be used to load the required libraries for cucumber scenario execution
hooks.rb we will add hooks like before, after, beforeStep and afterStep hooks
Q. 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
Ex: cucumber features -p regression
Q. What is cucumber.yml file in cucumber?
in cucumber.yml file we will create profiles
Q. What are before, after, beforeStep and afterStep hooks?
Before: execute before the feature file execution
After: executes after the feature file execution
BeforeStep: executes before the each step execution
AfterStep: executes after the each step execution
Q. What are cucumber tags? why we use the tags?
cucumber tags used to filter the scenarios. We can tag the scenarios and we can execute the scenarios based on tags,
We can add tags to scenarios with @
We can use following command to execute a cucumber tagged scenarios
cucumber features -t @
Ex: cucumber features -t @TEST
Q. What is cucumber dry run?
Cucumber dry run is used to compile cucumber feature files and stepDefinitions. If there is any compilations errors it will show when we use dry run
Ex: Cucumber features –dry-run
Q. What is scenario outline?
Scenario outline is used to execute the same scenario with different test data.
Q. What are the keywords that we use in cucumber scenario steps?
We use Given,when,Then,And and But keywords in cucumber scenario steps
Q. Is it mandatory to use the keywords while writing scenario steps?
No it is not mandatory to used keywords while writing scenario steps.
We can write the scenario steps like the following without using keywords
* I am on the landed page
Q. How to generate cucumber execution reports?
We can use the following command to generate html reports.
–format html –out report.html –format pretty
Q. 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
Get Updates on Tech posts, Interview & Certification questions and training schedules