Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the 'Background' keyword in Cucumber?
Answer: Background is used to define a set of steps that are common to all scenarios in a feature, helping to reduce duplication of steps.

Example:

Feature: Product Management
  Background:
    Given a user is logged in
  Scenario: Add a new product
    When the user adds a new product
    Then the product should be added successfully
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook