कहें कि मैं ककड़ी के साथ एक शॉपिंग कार्ट, बीडीडी विकसित कर रहा हूं। एक गाड़ी बल्कि जटिल है और इसमें कई घंटियां हैं और सीटी हैं, लेकिन यह "ब्लॉग" या "उपयोगकर्ता प्रोफ़ाइल" के लिए भी हो सकती है।गेचरिन और ककड़ी में एक फीचर और क्या परिदृश्य बनाता है?
मैं हमेशा "कार्ट" परिदृश्य के होने की फ़ीचर और घंटी और सीटी माना जाता है। हालांकि, यह फ़ीचर फ़ाइलों को बना सकता है और परिदृश्य के शाब्दिक अर्थ के विरुद्ध चला जाता है। यहां बताया गया है कि यह कैसे देखेंगे:
Feature: Cart
So that I can buy items
As a user
I want to place items in a cart
#.... Many more scenarios
Scenario: Empty a filled cart
Given 2 products in my cart
When I visit the cart page
And I press "Empty cart"
Then I should see the text:
"""
Your cart is empty.
"""
Scenario: Empty an empty cart
Given 0 products in my cart
When I visit the cart page
Then I should not see the "Empty cart" button
# Many more Scenario's
अधिक जानकारी भर दी गई है, अब तक यह "खाली कार्ट" समूह बन जाता है। मुझे आश्चर्य है, "कार्ट खाली करना" एक स्टैंडअलोन फ़ीचर माना जाना चाहिए? इससे कई विशेषताएं हो सकती हैं, जिनमें सभी शामिल हैं लेकिन कुछ परिदृश्य है। परिदृश्य का फिर "संदर्भ" की तरह बन गया। इसलिए जैसा:
Feature: Emptying Cart
So that I can reconsider my shopping-spree
As a user
I want to empty my cart
Scenario: with a filled cart
Given 2 products in my cart
When I visit the cart page
And I press "Empty cart"
Then I should see the text:
"""
Your cart is empty.
"""
Scenario: with an empty cart
Given 0 products in my cart
When I visit the cart page
Then I should not see the "Empty cart" button
कुछ एक फ़ीचर बनाने के लिए एक अच्छा दिशानिर्देश क्या है? मुझे परिदृश्य को अपने फ़ीचर में पुन: समूह कब करना चाहिए? कितने परिदृश्य एक फ़ीचर आमतौर पर है?