Given-When-Then | Glossary

Definition
It is a template/ format specified to facilitate the writing of acceptance tests for a User Story. The test cases can be tested manually, or as browser tests with Selenium.

  • Given: Specifies the context
  • When: The action that needs to be carried out
  • Then: A set of observable results that are obtained as a result of actions taken.

Origin
Given-When-Then was invented by Dan North as a part of Behavior-Driven Development.

Further Reading

  • “Specification by Example: How Successful Teams Deliver the Right Software, by Gojko Adzic.
  • “Feature Injections: Three Steps to Success”, by Chris Matts and Gojko Adzic.
  • “Introducing BDD”, by Dan North.

Know more about Given-When-Then by visiting our website.