Explain the difference between Cucumber Scenario Outline and Examples keywords.
Example:
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。
了解热门 Cucumber 面试题与答案,帮助应届生和有经验的候选人为求职面试做好准备。
了解热门 Cucumber 面试题与答案,帮助应届生和有经验的候选人为求职面试做好准备。
搜索问题以查看答案。
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
收藏此条目、标记为困难题,或将其加入复习集合。