Monday, 17 February 2020

Top 17 interview questions on Cucumber/BDD/SDET/Automation Testing/Lead QA?


Check questions from 1 to 10 below:

Question set 11 to 20:
Qus Set - 11 to 20

  • Scenario outline:

 The Scenario Outline keyword can be used to run the same Scenario multiple times, with different combinations of values.
  • Background: 
Sometimes you’ll find yourself repeating the same Given steps in all of the scenarios in a feature.
Since it is repeated in every scenario, this is an indication that those steps are not essential to describe the scenarios. You can literally move such Given steps to the background, by grouping them under a Background section.

  • Monochrome

Display console output in readable way

  • Glue

it helps Cucumber to locate theStep Definition file.Whenever Cucumber encounters a Step, it looks for a Step Definition inside all the files present in the folder mentioned in Glue Option.
  • Feature: 
The purpose of the Feature keyword is to provide a high-level description of a software feature, and to group related scenarios.The first primary keyword in a Gherkin document must always be Feature, followed by a : and a short text that describes the feature.
  • plugin:

 plugin Option is used to specify different formatting options for the output reports.

  • Format

It will define the format of the reports. Options are pretty,html,json,junit.
Note – Format option is deprecated . Use Plugin in place of that.
  • RunWith:

This is a JUnit annotation that specifies which runner it has to use to execute this class

  • CucumberOptions

This annotation provides some important information which will be used to run your cucumber feature file.

  •  Given

It is for pre condition

  •     When
Test action that will get executed

  •     Then

It defines the expected result.
  •     Add
Add conditions to step
  •     But:

 It is used to add negative type comments
  •     Strict:
with true as opted value, It will fail execution if any undefined or pending steps found.
  
  •     dryRun: Check if all steps have step definition
  •     tag:

    The tags can be used when specifying what tests to run through any of the running mechanism.
    @RunWith(Cucumber.class)
    @CucumberOptions(
                  features = “src/test/“,
                  tags ={“@Web“},...  )
    Cucumber can exclude scenarios with a particular tag by inserting the tilde character before the tag.
    For the following command will run all Scenarios without the UI tag.
    @RunWith(Cucumber.class)
    @CucumberOptions(
                  features = “src/test/features“,
                  tags ={“~@UI“},...  )



Want to learn more ! Below is the best interview question for Docker:

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...