Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the 'DocString' in Cucumber?
Answer: DocString is used to pass a large string as an argument to a step, providing a way to include multiline data in a step definition.

Example:

Scenario: Add product description
    Given the user is on the product page
    When the user adds the following description
      """
      This is a detailed description of the product.
      It includes features and specifications.
      """
    Then the description should be saved
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook