liveBook · Manning

Asterisk

As explained in Effective Behavior-Driven Development

A Gherkin step marker that can introduce a step without explicitly stating Given, When, or Then semantics.

An asterisk can introduce a Gherkin step instead of Given, When, or Then. The scenario behaves the same, but the marker removes the context, action, and outcome cues those keywords provide. section 10.6

Asterisks make a journey scenario more concise. Keep the keywords in focused illustrative scenarios, where their semantic cues help readers understand expected behavior. section 10.6

Listing 10.6 Pay-on-collection journey using asterisks
@journey
Scenario: Pay-on-collection journey
  * Reggie visits our website
  * he adds a pizza to his basket
  * he chooses to checkout as a guest
  * he enters valid contact details
  * he chooses pay-on-collection
  * he receives an order confirmation

A pay-on-collection journey shows each step introduced with an asterisk. section 10.6

How Effective Behavior-Driven Development covers it

How deep it goes
Defines equivalent scenario behavior and explains that asterisks remove context, action, and outcome cues.
Examples
Shows a pizza pay-on-collection journey and a restricted customer who cannot choose that payment option.
What you can do after
Evaluate/understand when concise asterisk steps suit a journey scenario and when keyword semantics are useful.
How it connects
Connects Gherkin asterisks with Given, When, Then, journey scenarios, and illustrative scenarios.

This explainer was generated by Manning's knowledge graph from the text of Effective Behavior-Driven Development. The section links point to the parts of the book it draws on.