This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is Bdd Framework.what Is The Benefit Of Bdd In Selenium ? |
|
Answer» 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. 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. |
|
| 2. |
What Does A Features/ Support File Contains? |
|
Answer» FEATURES/ support file contains supporting RUBY code. FILES in support LOAD before those in step_definitions, which can be useful for ENVIRONMENT configuration. Features/ support file contains supporting ruby code. Files in support load before those in step_definitions, which can be useful for environment configuration. |
|
| 3. |
What Softare Do You Need To Run A Cucumber Web Test? |
|
Answer» Ruby and its DEVELOPMENT Kit Ruby and its Development Kit |
|
| 4. |
Explain What Is Bdd (behaviour Driven Development) ? |
|
Answer» BDD or Behaviour driven DEVELOPMENT is a PROCESS of DEVELOPING SOFTWARE based on TDD (Test Driven Development) which focusses on BEHAVIOURAL specification of software units. BDD or Behaviour driven development is a process of developing software based on TDD (Test Driven Development) which focusses on behavioural specification of software units. |
|
| 5. |
Explain What Is Regular Expressions? |
|
Answer» A regular EXPRESSION is a pattern describing a certain amount of text. The most basic regular expression CONSISTS of a single LITERAL CHARACTER. A regular expression is a pattern describing a certain amount of text. The most basic regular expression consists of a single literal character. |
|
| 6. |
What Is The Language Used For Expressing Scenario In Feature File ? |
|
Answer» Gherkin LANGUAGE is used to express SCENARIO in feature files and ruby files CONTAINING UNOBTRUSIVE automation for the steps in scenarios. Gherkin language is used to express scenario in feature files and ruby files containing unobtrusive automation for the steps in scenarios. |
|
| 7. |
Explain When To Use Rspec And When To Use Cucumber? |
Answer»
|
|
| 8. |
Explain What Is Test Harness? |
|
Answer» A test harness for cucumber and rspec ALLOWS for separating responsibility between setting up the context and interacting with the browser and CLEANING up the STEP definition files. A test harness for cucumber and rspec allows for separating responsibility between setting up the context and interacting with the browser and cleaning up the step definition files. |
|
| 9. |
What Are The Difference Between Jbehave And Cucumber? |
Answer»
|
|
| 10. |
Give The Example For Step Definition Using “given” Function? |
|
Answer» For EXAMPLE to make VISITOR visit the SITE “wisdomjobs” the command we use for given: Given (/^ I am on www.wisdomjobs.com$/) do Browser.goto “HTTP://www.wisdomjobs.com” END – This will visit www.wisdomjobs.com For example to make visitor visit the site “wisdomjobs” the command we use for given: Given (/^ I am on www.wisdomjobs.com$/) do Browser.goto “http://www.wisdomjobs.com” end – This will visit www.wisdomjobs.com |
|
| 11. |
What Is Step Definition In Cucumber? |
|
Answer» A STEP definition is the actual code IMPLEMENTATION of the FEATURE mentioned in feature FILE. A step definition is the actual code implementation of the feature mentioned in feature file. |
|
| 12. |
Explain What Is Scenario Outline In Feature File? |
|
Answer» Scenario Outline: Same scenario can be executed for MULTIPLE sets of data USING scenario outline. The data is provided by a tabular structure separated by (I I). Scenario Outline: Same scenario can be executed for multiple sets of data using scenario outline. The data is provided by a tabular structure separated by (I I). |
|
| 13. |
Give An Example Of Behaviour Driven Test In Plain Text? |
|
Answer» FEATURE: Visit XYZ PAGE in ABC.com Scenario : Visit abc.com Given: I am on abc.com When: I CLICK on XYZ page Then: I should see ABC page Feature: Visit XYZ page in abc.com Scenario : Visit abc.com Given: I am on abc.com When: I click on XYZ page Then: I should see ABC page |
|
| 14. |
What Is Feature File In Cucumber? What Does Feature File Consist Of ? |
|
Answer» FEATURE file in CUCUMBER CONSIST of parameters or conditions required for EXECUTING code, they are:
Feature file in cucumber consist of parameters or conditions required for executing code, they are: |
|
| 15. |
What Are The 2 Files Required To Execute A Cucumber Test Scenario? |
|
Answer» The 2 files required to execute a Cucumber TEST SCENARIO are The 2 files required to execute a Cucumber test scenario are |
|
| 16. |
What Is Cucumber And What Are The Advantages Of Cucumber? |
|
Answer» To run functional tests WRITTEN in a plain text CUCUMBER tool is used. It is written in a Ruby programming language. Advantages of Cucumber:
To run functional tests written in a plain text Cucumber tool is used. It is written in a Ruby programming language. Advantages of Cucumber: |
|
| 17. |
How To Run A Particular Scenario From A Feature File ? |
|
Answer» We can run PARTICULAR scenario from a FEATURE file by giving the scenario line NUMBER EX: CUCUMBER features/test.feature:21 We can run particular scenario from a feature file by giving the scenario line number Ex: cucumber features/test.feature:21 |
|
| 18. |
How To Generate Cucumber Execution Reports? |
|
Answer» We can USE the following command to GENERATE HTML REPORTS. –format html –out report.html –format pretty. We can use the following command to generate html reports. –format html –out report.html –format pretty. |
|
| 19. |
Is It Mandatory To Use The Keywords While Writing Scenario Steps ? |
|
Answer» 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 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 |
|
| 20. |
What Is Scenario Outline? |
|
Answer» Scenario OUTLINE is used to EXECUTE the same scenario with DIFFERENT test data. Scenario outline is used to execute the same scenario with different test data. |
|
| 21. |
What Is Cucumber Dry Run? |
|
Answer» 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 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 |
|
| 22. |
What Are Cucumber Tags? Why We Use The Tags? |
|
Answer» 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 @<tag_name> EX: cucumber features -t @test 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 @<tag_name> Ex: cucumber features -t @test |
|
| 23. |
What Are Before, After, Beforestep And Afterstep Hooks? |
|
Answer» 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 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 |
|
| 24. |
What Is Profile In Cucumber? |
|
Answer» <P>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 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 |
|
| 25. |
What Is Support, Env.rb And Hooks.rb ? |
| Answer» | |
| 26. |
Cucumber Execution Starts From Where? |
|
Answer» 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. 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. |
|
| 27. |
What Is Cucumber? |
|
Answer» 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. In BDD, users (business ANALYSTS, PRODUCT owners) first write scenarios or acceptance tests that describes the behavior of the SYSTEM from the customer’s perspective, for review and sign-off by the product owners before developers write their codes. 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. In BDD, users (business analysts, product owners) first write scenarios or acceptance tests that describes the behavior of the system from the customer’s perspective, for review and sign-off by the product owners before developers write their codes. |
|