Feature: CheckSample
@ignored
Scenario Outline: check ABC #checkout.feature:2
Given I open the applciation
When I enter username as "<username>"
And I enter password as "<password>"
Then I enter title as "<title>"
Examples:
| username | password |
| dude | daad |
के रूप में सुविधा फ़ाइल "CheckSample.feature"
ऊपर पर विचार और नीचे यह आपके कदम फाइल है,
public class Sampletest {
@Given("^I open the applciation$")
public void i_open_the_applciation() throws Throwable {
// Write code here that turns the phrase above into concrete actions
//throw new PendingException();
}
अब नीचे धावक फ़ाइल हो जाएगा::
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"pretty", "html:target/reports",
"json:target/reports/cucumber-report.json"},
monochrome = true,
tags = {"[email protected]"}
)
public class junittestOne {
public static void main(String[] args) {
JUnitCore junit = new JUnitCore();
Result result = junit.run(junittestOne.class);
}
}
यहाँ नोट करने के लिए महत्वपूर्ण है, सुविधा फ़ाइल में "@ignored" पाठ CucumberOptions (टैग) में साथ में बताया गया है "सिर्फ आंशिक फ़ाइल है junittestone "वर्ग फ़ाइल। साथ ही, सुनिश्चित करें कि आपके पास प्रोजेक्ट में उपलब्ध ककड़ी, गेरकिन, जुनीट और अन्य जार दोनों के लिए सभी प्रासंगिक जार फ़ाइलें हैं और आपने उन्हें अपनी चरण परिभाषाओं (कक्षा) में आयात किया है।
"अनदेखा" के कारण, परीक्षण निष्पादित करते समय परिदृश्य छोड़ा जाएगा।
कूल, क्या कहीं भी मुझे गुणों की एक सूची मिल सकती है? –
हम यहां टैग के बारे में बात कर रहे हैं। @ignore एकमात्र "पूर्व परिभाषित" टैग है। अन्य टैग को पहले// बाद-हुक को नियंत्रित करने और चुनिंदा सुविधाओं को चलाने के लिए स्वतंत्र रूप से परिभाषित किया जा सकता है। – jbandi
मैं जेनरेटर के कोड को देखता हूं क्योंकि यह सबसे सटीक उत्तर प्रदान करता है: https://github.com/techtalk/SpecFlow/blob/master/Generator/UnitTestProvider/MsTest2010GeneratorProvider.cs SpecFlow changelog https भी है : //github.com/techtalk/SpecFlow/blob/master/changelog।txt और मैं उद्धृत करूंगा: "MsTest: MSTest के [मालिक] और [WorkItem] के लिए समर्थन \ @owner: foo \ @workitem: 123 (अंक 162, 161 खींचें) जैसे टैग के साथ विशेषताएँ" हालांकि, गुणों की सूची स्पीकफ्लो के साथ परीक्षण फ्रेमवर्क और परीक्षण धावक पर निर्भर करता है :) –