Agile Glossary

Given – When – Then

What is Given – When – Then?

The Given-When-Then formula is a template intended to guide the writing of acceptance tests for a User Story:

  • (Given) some context
  • (When) some action is carried out
  • (Then) a particular set of observable consequences should obtain

An example:

  • Given my bank account is in credit, and I made no withdrawals recently,
  • When I attempt to withdraw an amount less than my card’s limit,
  • Then the withdrawal should be complete without errors or warnings

Tools such as JBehave, RSpec, or Cucumber encourage the use of this template, though it can also be used purely as a heuristic irrespective of any tool.

Join us today!

Agile Alliance offers many online and in-person events and workshops for our members. If you’re not currently a member, you can join now to take advantage of our many members-only resources and programs. LEARN MORE >

Get the latest Agile news!

  • This field is for validation purposes and should be left unchanged.

By subscribing, you acknowledge the Agile Alliance Privacy Policy, and agree to receive our emails.

Additional Agile Glossary Terms

"Integration" (or "integrating") refers to any efforts still required for a project team to deliver a product suitable for release as a functional whole.
In consultation with the customer or product owner, the team divides up the work to be done into functional increments called "user stories."
In the context of software development, build refers to the process that converts files and other assets under the developers' responsibility into a software product in its final or consumable form. The build is automated when these steps are repeatable, require no direct human intervention, and can be performed at any time with no information other than what is stored in the source code control repository.
"Integration" (or "integrating") refers to any efforts still required for a project team to deliver a product suitable for release as a functional whole.
A technique to scale Scrum up to large groups (over a dozen people), consisting of dividing the groups into Agile teams of 5-10.
A product backlog is a list of the new features, changes to existing features, bug fixes, infrastructure changes or other activities that a team may deliver in order to achieve a specific outcome.

Help us keep the definitions updated

Ready to join Agile Alliance?

Unlock members-only access to online learning sessions, Agile resources, annual conference discounts, and more! And when you join, you’ll be supporting our member initiatives, regional events, and global community groups.

Privacy Preference Center

IMPORTANT: We have transitioned to a new membership platform. If you have not already done so, you will need to SET UP AN ACCOUNT on the new platform to establish your user profile. Your previous login credentials will not work until you do this set up.

When you see the login screen, choose “Set up Account” and follow the prompts to create your new account. You can choose to log in using your social credentials for either Google or Linkedin (recommended), or you can set up your account using an email address.