github.com/maps90/godog@v0.7.5-0.20170923143419-0093943021d4/features/events.feature (about)

     1  Feature: suite events
     2    In order to run tasks before and after important events
     3    As a test suite
     4    I need to provide a way to hook into these events
     5  
     6    Background:
     7      Given I'm listening to suite events
     8  
     9    Scenario: triggers before scenario event
    10      Given a feature path "features/load.feature:6"
    11      When I run feature suite
    12      Then there was event triggered before scenario "load features within path"
    13  
    14    Scenario: triggers appropriate events for a single scenario
    15      Given a feature path "features/load.feature:6"
    16      When I run feature suite
    17      Then these events had to be fired for a number of times:
    18        | BeforeSuite    | 1 |
    19        | BeforeFeature  | 1 |
    20        | BeforeScenario | 1 |
    21        | BeforeStep     | 3 |
    22        | AfterStep      | 3 |
    23        | AfterScenario  | 1 |
    24        | AfterFeature   | 1 |
    25        | AfterSuite     | 1 |
    26  
    27    Scenario: triggers appropriate events whole feature
    28      Given a feature path "features/load.feature"
    29      When I run feature suite
    30      Then these events had to be fired for a number of times:
    31        | BeforeSuite    | 1  |
    32        | BeforeFeature  | 1  |
    33        | BeforeScenario | 6  |
    34        | BeforeStep     | 19 |
    35        | AfterStep      | 19 |
    36        | AfterScenario  | 6  |
    37        | AfterFeature   | 1  |
    38        | AfterSuite     | 1  |
    39  
    40    Scenario: triggers appropriate events for two feature files
    41      Given a feature path "features/load.feature:6"
    42      And a feature path "features/multistep.feature:6"
    43      When I run feature suite
    44      Then these events had to be fired for a number of times:
    45        | BeforeSuite    | 1 |
    46        | BeforeFeature  | 2 |
    47        | BeforeScenario | 2 |
    48        | BeforeStep     | 7 |
    49        | AfterStep      | 7 |
    50        | AfterScenario  | 2 |
    51        | AfterFeature   | 2 |
    52        | AfterSuite     | 1 |
    53