नहीं हैं I मुझे एक रेल (3) ऐप मिला है और मौजूदा ककड़ी परीक्षणों के साथ पकड़ने की कोशिश कर रहा हूं। मैं एप्लिकेशन की 'सुविधाओं' फ़ोल्डर में निम्नलिखित सेटअप मिल गया है (मैं बाहर नहीं छूटा है किसी भी फाइल जो प्रासंगिक नहीं हैं, जैसे अतिरिक्त सुविधाओं और कदम)"रेक" मेरे सभी ककड़ी परीक्षणों को ठीक करता है लेकिन "ककड़ी" में
/features
/people
new-person.feature
/step_definitions
people_steps.rb
web_steps.rb
/support
env.rb
paths.rb
selectors.rb
अगर मैं 'रेक' रन तो इसे चलाता step_definitions में सूचीबद्ध चरणों का सही उपयोग करके सुविधाओं/लोगों/नए व्यक्ति.फेचर में सभी सुविधाएं।
हालांकि, मैं हर बार रेक चलाने के लिए नहीं चाहता क्योंकि यह बहुत लंबा लगता है, मैं सिर्फ ककड़ी में एक विशिष्ट परीक्षण चलाने के लिए चाहता हूं, उदाहरण के लिए cucumber features/people/new-person.feature -l 8
जब मैं ऐसा करता हूं, तो यह सुविधा चलाता है लेकिन चरणों को लोड नहीं करता है। मुझे यह वापस मिल गया:
Using the default profile...
Feature: Add a new person
In order to allocate tasks to people
As a community manager
I want to add a new person
Scenario: Secondary navigation should contain "Add new person" # features/people/new-person.feature:8
Given I am on the new person page # features/people/new-person.feature:9
Undefined step: "I am on the new person page" (Cucumber::Undefined)
features/people/new-person.feature:9:in `Given I am on the new person page'
Then I should not see "Add new person" # features/people/new-person.feature:10
Undefined step: "I should not see "Add new person"" (Cucumber::Undefined)
features/people/new-person.feature:10:in `Then I should not see "Add new person"'
1 scenario (1 undefined)
2 steps (2 undefined)
0m0.005s
You can implement step definitions for undefined steps with these snippets:
Given /^I am on the new person page$/ do
pending # express the regexp above with the code you wish you had
end
Then /^I should not see "([^"]*)"$/ do |arg1|
pending # express the regexp above with the code you wish you had
end
If you want snippets in a different programming language, just make sure a file
with the appropriate file extension exists where cucumber looks for step definitions.
ककड़ी क्यों चरणों को लोड नहीं कर रहा है? मुझे लगता है कि मुझे कहीं भी कदमों की आवश्यकता है लेकिन मैं कहां काम नहीं कर सकता।
धन्यवाद, मैक्स
के लिए तर्क की खाति फीचर फ़ाइल को एक निर्देशिका में ले जाती है। मुझे अपनी विभिन्न। फीचर फाइलों में कहीं भी आवश्यकता नहीं है, और मुझे इस बात को इंगित करने वाली सुविधाओं/समर्थन/फ़ाइलों में कोई कॉन्फ़िगरेशन गोप नहीं दिखाई देता है। क्या आप निश्चित हैं कि आपके लोग_स्टेप.आरबी कोड कार्यात्मक हैं? क्या आपने अभी तक एक चिकन बलिदान दिया है? – jaydel
@jaydel - यह सब ठीक काम करता है जब मैं इसे 'रेक' के साथ चलाता हूं, यानी सभी चरणों को ठीक से लोड किया जाता है। मैं समझदार समूहों में उन्हें व्यवस्थित करने के लिए सिर्फ अपनी विशेषताओं को उप-देना जारी रखना चाहता हूं। –
@jaydel - लेकिन, फीचर फ़ाइलों को मुख्य विशेषताएं फ़ोल्डर में ले जाने से समस्या ठीक हो गई है ... कहीं और आवश्यकता होनी चाहिए कि मुझे एक अतिरिक्त "../" जोड़ने की आवश्यकता है। –