What is Cucumber?
Example:
Feature: Login
Scenario: Successful login
Given the user is on the login page
When the user enters valid credentials
Then the user should be logged in
복습용 저장
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.
Know the top Cucumber interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Know the top Cucumber interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Search a question to view the answer.
Example:
Feature: Login
Scenario: Successful login
Given the user is on the login page
When the user enters valid credentials
Then the user should be logged in
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Feature: Shopping Cart
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
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
@smoke
Feature: User Authentication
Scenario: Successful login
Given the user is on the login page
When the user enters valid credentials
Then the user should be logged in
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
@ignore
Scenario: This scenario will be skipped
Given a precondition
When an action is performed
Then the result is validated
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
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
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
cucumber --tags @smoke
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
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
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
project
|-- src
| |-- test
| |-- java
| |-- features
| |-- login
| |-- login.feature
| |-- search
| |-- search.feature
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
cucumber --dry-run
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
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 |
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Given(/^the user is on the login page$/, () => {
// code to navigate to the login page
});
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario Outline: Search with dynamic data
Given the user is on the search page
When the user searches for
Then results should include
Examples:
| dynamic_keyword | result |
| cucumber | relevant results |
| testing | accurate results |
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Before(() => {
// code to run before each scenario
});
After(() => {
// code to run after each scenario
});
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario: Data-driven login
Given the user is on the login page
When the user enters the following credentials
| Username | Password |
| user1 | pass123 |
Then the user should be logged in
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Feature: Online Shopping
Background:
Given a user is logged in
Scenario Outline: Add item to cart
When the user adds- to the cart
Then the cart should display the
Examples:
| item |
| Laptop |
| Headphones|
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
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
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario Outline: Access different URLs
Given the user navigates to
Then the page should load successfully
Examples:
| url |
| https://example.com |
| https://test.com |
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
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
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
glue = {"path.to.step.definitions"}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
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 |
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario Outline: Search with dynamic data
Given the user is on the search page
When the user searches for
Then results should include
Examples:
| dynamic_keyword | result |
| cucumber | relevant results |
| testing | accurate results |
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Feature: Login
Scenario: Successful login
Given the user is on the login page
When the user enters valid credentials
Then the user should be logged in
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario: Sharing data between steps
Given a variable is initialized
When the variable is modified
Then the modified value should be accessible in subsequent steps
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario: Asynchronous operation
Given the user initiates an asynchronous operation
When the operation completes
Then the result should be visible
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario: Sharing data between steps
Given a variable is initialized
When the variable is modified
Then the modified value should be accessible in subsequent steps
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
mvn test -Dcucumber.options="--threads 2"
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
@chrome
Scenario: Test on Chrome browser
Given the user is on the application
When the user performs an action
Then the result should be validated
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
Scenario: Sharing data between steps
Given a variable is initialized
When the variable is modified
Then the modified value should be accessible in subsequent steps
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.