Skip to content

Instantly share code, notes, and snippets.

@barneywilliams
Created May 23, 2012 06:01
Show Gist options
  • Save barneywilliams/2773486 to your computer and use it in GitHub Desktop.
Save barneywilliams/2773486 to your computer and use it in GitHub Desktop.
Cucumber-Cpp Example Trace
Scenario: Regular numbers # division.feature:6
> ["begin_scenario"] # Cucumber sends this message to the Wire server to start the scenario
< ["success"] # Each message sent to the Wire server is acknowledged, and may include response data as well
> ["step_matches", # Cucumber sends the first step of the scenario
{
"name_to_match":"I have entered 3 into the calculator"
}
]
< ["success", # The Wire server responds with the regular expression that matches the specified step, including the extracted parameter and location of the step definition
[
{
"regexp":"^I have entered (\\d+) into the calculator$",
"args":[{"val":"3","pos":15}],
"id":"1",
"source":"CalculatorSteps.cpp:11"
}
]
]
> ["invoke", # Cucumber now tells the server to go ahead and execute the step
{
"args":["3"],
"id":"1"
}
]
< ["success"] # The server responds with the result
Given I have entered 3 into the calculator # CalculatorSteps.cpp:11 (This is the normal formatted output that appears on the console after a step is executed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment