Differences
  • Placement 360 CourseExplore
  • Software testing day - 37

    Last Updated :
    Discuss
    Comments

    Question 1

    What is the primary purpose of a Cucumber Feature File?

    • A

      To write automated tests in a programming language

    • B

      To define application behavior in a human-readable format using Gherkin syntax

    • C

      To provide live documentation for the project

    • D

      To map Java methods to Gherkin steps

    Question 2

    Which of the following is not a component of Cucumber?

    • A

      Feature Files

    • B

      Step Definitions

    • C

      Selenium WebDriver

    • D

      Reports

    Question 3

    In a Cucumber Feature File, which keyword is used to define the expected outcome of an action?

    • A

      Given

    • B

      When

    • C

      Then

    • D

      But

    Question 4

    What is the purpose of the @CucumberOptions annotation in the TestRunner class?

    • A

      To link Feature Files with the Step Definitions

    • B

      To provide the configuration for running tests

    • C

       To set up Selenium WebDriver configurations

    • D

      To clean up after the tests

    Question 5

    Which file extension is used for Cucumber Feature Files?

    • A

      .java

    • B

      .xml

    • C

      .feature

    • D

      .json

    Question 6

    What is the role of Step Definitions in Cucumber testing?

    • A

       To define the test scenarios in human-readable language

    • B

      To implement actions that correspond to the steps in Feature Files

    • C

      To execute the tests

    • D

      To generate reports

    Question 7

    What is the first step when setting up a Cucumber project in an IDE?

    • A

       Install the Selenium WebDriver

    • B

      Create a Maven Project and add dependencies

    • C

      Write Feature Files

    • D

      Write Step Definitions

    Question 8

    What is the first step when setting up a Cucumber project in an IDE?

    • A

      @Then

    • B

      @Given

    • C

      @Before

    • D

      @After

    Question 9

    What happens when you run a Cucumber test using TestNG?

    • A

       It only runs Feature Files

    • B

      It executes the Java code directly without checking for feature files

    • C

      It runs the Feature Files, maps them to Step Definitions, and generates reports

    • D

      It skips running tests and only generates the report

    Question 10

    How does Cucumber contribute to Behavior-Driven Development (BDD)?

    • A

      It allows writing tests in a technical language only

    • B

       It ensures that only developers write the test cases

    • C

       It promotes collaboration among stakeholders by defining behavior in a shared language

    • D

       It focuses only on technical aspects of the software

    There are 10 questions to complete.

    Take a part in the ongoing discussion