가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

모의 시험

홈페이지로 설정

이 페이지 북마크

이메일 주소 구독

Cucumber 면접 질문과 답변

Ques 21. Explain the difference between Background and Hooks in Cucumber.

Background is used to define a set of common steps for all scenarios in a feature, while Hooks are blocks of code that run before or after specific events in the Cucumber execution cycle.

Example:

Feature: Online Shopping
  Background:
    Given a user is logged in
  Scenario: Add item to cart
    When the user adds an item to the cart
    Then the cart should display the item

도움이 되었나요? Add Comment View Comments
 

Ques 22. How can you reuse step definitions in Cucumber?

Step definitions can be reused by creating separate step definition files and then referencing those step definitions in the feature files using the 'glue' option in the test runner configuration.

Example:

glue = {"path.to.step.definitions"}

도움이 되었나요? Add Comment View Comments
 

Ques 23. What is the purpose of the 'Scenario Outline' Examples table header in Cucumber?

The Examples table header in Scenario Outline specifies the names of the variables that will be used in the scenario, and it helps map the values from the Examples table to the corresponding placeholders in the scenario steps.

Example:

Scenario Outline: Search with different keywords
    Given the user is on the search page
    When the user searches for 
    Then results should include 
    Examples:
      | keyword   | result           |
      | cucumber  | relevant results |
      | testing   | accurate results |

도움이 되었나요? Add Comment View Comments
 

Ques 24. What is the purpose of the 'But' keyword in Cucumber?

The 'But' keyword is used to provide an alternative step with additional clarification, often used after 'Given', 'When', or 'Then' for better readability.

Example:

Scenario: Login with valid credentials
    Given the user is on the login page
    When the user enters valid credentials
    Then the user should be logged in
    But the user dashboard should be displayed

도움이 되었나요? Add Comment View Comments
 

Ques 25. How do you organize feature files in a Cucumber project?

Feature files are typically organized based on the functionality they represent or by feature. A common approach is to create directories for each feature and place related feature files within those directories.

Example:

project
|-- src
|   |-- test
|       |-- java
|           |-- features
|               |-- login
|                   |-- login.feature
|               |-- search
|                   |-- search.feature

도움이 되었나요? Add Comment View Comments
 

Most helpful rated by users:

Copyright © 2026, WithoutBook.