def given(self): from corejet.core.model import RequirementsCatalogue, Epic, Story self.catalogue = RequirementsCatalogue(project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) epic2 = Epic("E2", "Second epic") self.catalogue.epics.append(epic2) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) story2 = Story("S2", "Second story", points=3, status="closed", resolution="fixed", priority="high", epic=epic1) epic1.stories.append(story2) text = """\ Scenario: First scenario Given something When something happens Then do something And something else Scenario: Second scenario Given something When something happens Then do something And something else """ appendScenarios(story1, text)
def create(self): from corejet.core.model import RequirementsCatalogue from corejet.core.model import Epic, Story, Scenario, Step self.catalogue = RequirementsCatalogue( project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0), testTime=datetime.datetime(2011, 1, 2, 12, 5, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) epic2 = Epic("E2", "Second epic") self.catalogue.epics.append(epic2) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) story2 = Story("S2", "Second story", points=3, status="closed", resolution="fixed", priority="high", epic=epic1) epic1.stories.append(story2) scenario1 = Scenario( "First scenario", story=story1, givens=[Step("something", 'given')], whens=[Step("something happens", 'when')], thens=[ Step("do something", 'then'), Step("and something else", 'then') ], status="pass", ) story1.scenarios.append(scenario1) scenario2 = Scenario( "Second scenario", story=story2, givens=[Step("something", 'given')], whens=[Step("something happens", 'when')], thens=[ Step("do something", 'then'), Step("and something else", 'then') ], status="mismatch", ) story1.scenarios.append(scenario2)
def given(self): from corejet.core.model import RequirementsCatalogue, Epic, Story self.catalogue = RequirementsCatalogue(project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) text = u"""\ # language: fi Tapausaihio: Montako yötä on jouluun Oletetaan, että tänään on <päivä>. joulukuuta. Kun avaan vielä <avaukset> luukkua joulukalenterista, niin jouluun on enää <jäljellä> yötä. Tapaukset: | päivä | avaukset | jäljellä | | 1 | 2 | 21 | | 21 | 3 | 0 | """ appendScenarios(story1, text)
def given(self): from corejet.core.model import RequirementsCatalogue, Epic, Story self.catalogue = RequirementsCatalogue( project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) epic2 = Epic("E2", "Second epic") self.catalogue.epics.append(epic2) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) story2 = Story("S2", "Second story", points=3, status="closed", resolution="fixed", priority="high", epic=epic1) epic1.stories.append(story2) text = """\ Scenario Outline: Count some apples Given I have <Start amount> apples When I get <Red> red and <Green> green apples more Then I have a total of <Sum> apples Examples: | Start amount | Red | Green | Sum | | 2 | 3 | 4 | 9 | | 3 | 4 | 5 | 12 | """ appendScenarios(story1, text)
def given(self): from corejet.core.model import RequirementsCatalogue, Epic, Story self.catalogue = RequirementsCatalogue(project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) text = u"""\ # language: fi Tapaus: RTFM suomeksi Oletetaan, että olen pulassa. Kun klikkaan "Ohjeet"-linkkiä, niin löydän apua. """ appendScenarios(story1, text)
def given(self): from corejet.core.model import RequirementsCatalogue, Epic, Story self.catalogue = RequirementsCatalogue(project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) text = u"""\ # language: fi Tapaus: Toinen tapaus Oletetaan, että olen 1. ja 2. korttelin välissä. Kun katson suoraan oikealle niin näen uuden kirjakaupan ja kauniin näyteikkunan. """ appendScenarios(story1, text)
def given(self): from corejet.core.model import RequirementsCatalogue, Epic, Story self.catalogue = RequirementsCatalogue(project="Test project", extractTime=datetime.datetime(2011, 1, 2, 12, 1, 0)) epic1 = Epic("E1", "First epic") self.catalogue.epics.append(epic1) story1 = Story("S1", "First story", points=3, status="open", priority="high", epic=epic1) epic1.stories.append(story1) text = u"""\ # language: fi Tapaus: Ensimmäinen tapaus Oletetaan, että ajan polkupyörällä, mutta minulla ei ole pyöräilykypärää. Kun törmään liikenteessä autoon, niin minulle käy tosi huonosti, mutta auton kuljettaja voi selvitä vammoitta. """ appendScenarios(story1, text)