खोज…


परिचय

आप ककड़ी को QTP और सेलेनियम में एक प्लगइन के रूप में उपयोग कर सकते हैं। ककड़ी परिदृश्य में चरण वैश्विक चर हैं। आप एक बार लागू कर सकते हैं और कई बार कॉल कर सकते हैं। इसलिए कोड रखरखाव कम कर देता है, और आवश्यकता होने पर उसी कोड का पुन: उपयोग कर सकता है।

टिप्पणियों

ककड़ी सुविधाओं खीरा भाषा में लिखा और प्रत्यय के साथ फाइल में जमा हो जाती है .feature । यह विषय घेरकिन की प्रत्येक विशेषता का उदाहरण देता है।

एक न्यूनतम ककड़ी सुविधा

सुविधाओं / प्रलेखन में।

Feature: Documentation

  Scenario: User views documentation
    When I go to the "Cucumber" documentation
    Then I should see the "Cucumber" documentation

मिनिमम फ़ीचर में एक Feature लाइन और एक Scenario जिसमें एक या एक से अधिक चरणों की शुरुआत होती है, When , Then या किसी अन्य Gherkin कीवर्ड के साथ।

एक समझदार परिदृश्य शायद एक से अधिक कदम होगा।

परिदृश्य की रूपरेखा

नीचे के रूप में टेम्पलेट

Scenario Outline: As a homemaker i want to buy and pay for the below product
  Given I purchase <a product>
    And I require a carry bag to take things to home
  When I pay bill using <payment method> to successfully checkout
  Then I should have a receipt

Examples:
| a product     | payment method |
|  Cake         | Visa           |
|  Coke         | Paypal         |

सिंटेक्स उपयोग

Feature: Some terse yet descriptive text of what is desired
     Textual description of the business value of this feature
     Business rules that govern the scope of the feature
     Any additional information that will make the feature easier to understand

Background:
    Given some precondition needed for all scenarios in this file
        And another precondition

Scenario: Some determinable business situation
  Textual description of the business value of this scenario
  Business rules that govern the scope of the scenario
  Any additional information that will make the scenario easier to understand
    Given some precondition
      And some other precondition
    When some action by the actor
      And some other action
      And yet another action
    Then some testable outcome is achieved
      And something else we can check happens too
      But something else we can check does not happen

Scenario Outline: Some determinable business situation
    Given I am <precondition>
        And some other precondition
    When some action by the actor
    Then I have <outcome> rights

Examples:
    | precondition | outcome  |
    | username1    | customer |
    | username2    | admin    |

निम्नलिखित खोजशब्द विनिमेय हैं, लेकिन संदर्भ के आधार पर, उपयोग करने के लिए बेहतर हो सकते हैं:

  • Feature: | Ability: | Business Need:
  • Scenario Outline: | Scenario Template:
  • Examples: | Scenarios:
  • Given | When | Then | And | But | *


Modified text is an extract of the original Stack Overflow Documentation
के तहत लाइसेंस प्राप्त है CC BY-SA 3.0
से संबद्ध नहीं है Stack Overflow