اكثر اسئلة واجوبة المقابلات طلبا والاختبارات عبر الإنترنت
منصة تعليمية للتحضير للمقابلات والاختبارات عبر الإنترنت والدروس والتدريب المباشر

طوّر مهاراتك من خلال مسارات تعلم مركزة واختبارات تجريبية ومحتوى جاهز للمقابلات.

يجمع WithoutBook أسئلة المقابلات حسب الموضوع والاختبارات العملية عبر الإنترنت والدروس وأدلة المقارنة في مساحة تعلم متجاوبة واحدة.

التحضير للمقابلة

الاختبارات التجريبية

اجعلها الصفحة الرئيسية

احفظ هذه الصفحة في المفضلة

الاشتراك عبر البريد الإلكتروني

Cucumber اسئلة واجوبة المقابلات

سؤال 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

هل هذا مفيد؟ اضف تعليقا عرض التعليقات
 

سؤال 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"}

هل هذا مفيد؟ اضف تعليقا عرض التعليقات
 

سؤال 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 |

هل هذا مفيد؟ اضف تعليقا عرض التعليقات
 

سؤال 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

هل هذا مفيد؟ اضف تعليقا عرض التعليقات
 

سؤال 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

هل هذا مفيد؟ اضف تعليقا عرض التعليقات
 

الاكثر فائدة حسب تقييم المستخدمين:

حقوق النشر © 2026، WithoutBook.