Gherkin Language

A Feature consists of one or more Scenarios

A Scenario may have Background conditions that need to be met up front

A Gherkin Scenario consists of Given (precondition), When (action) and Then (assertion) statements, in that order:
  • Given (a precondition unique to this scenario)
    • And (maybe a second precondition too)
  • When (an action is taken)
    • And (maybe an additional action too)
  • Then (an outcome occurs)
    • And (maybe a secondary outcome as well)
    • But (not this outcome)

When-Then pairs are called Behaviors.

Additional Resources

-- NicoleRadziwill - 13 Apr 2020
Topic revision: r2 - 24 Jul 2020, SummerDale
© 2020 Ultranauts - 75 Broad Street, 2nd Floor, Suite 206, New York, NY 10004 - info@ultranauts.co