Given-When-Then
From HandWiki
Short description: A semi-structured way to write down test cases used for testing in software development
Given-When-Then (GWT) is a semi-structured way to write down test cases. They can either be tested manually or automated as browser tests with tools like Selenium and Cucumber.[1][2]
It derives its name from the three clauses used, which start with the words given, when and then.[3] Given describes the preconditions and initial state before the start of a test and allows for any pre-test setup that may occur. When describes actions taken by a user during a test. Then describes the outcome resulting from actions taken in the when clause.
The Given-When-Then was proposed by Dan North in 2006, as part of behavior-driven development.[4]
See also
- Acceptance test-driven development
- Acceptance testing
- Behavior-driven development
- Cucumber syntax
- Hoare triple
References
- ↑ Percival, Harry (2014-06-11) (in en). Test-Driven Development with Python: Obey the Testing Goat: Using Django, Selenium, and JavaScript. "O'Reilly Media, Inc.". ISBN 978-1-4493-6517-2. https://books.google.com/books?id=fTLJAwAAQBAJ&dq=GivenWhenThen+Selenium&pg=PA437.
- ↑ Pugh, Ken (2010-12-22) (in en). Lean-Agile Acceptance Test-Driven Development: Better Software Through Collaboration. Pearson Education. ISBN 978-0-321-71944-7. https://books.google.com/books?id=tB23eWcG9DEC&dq=GivenWhenThen+Selenium&pg=PT432.
- ↑ Fowler, Perryn (24 November 2009). "Perryn Fowler's Weblog". http://www.jroller.com/perryn/entry/given_when_then_and_how. Retrieved 14 August 2014.
- ↑ Gorman, Mary; Ellen Gottesdiener (9 December 2012). "Using "Given-When-Then" to Discover and Validate Requirements". http://ebgconsulting.com/blog/using-given-when-then-to-discover-and-validate-requirements-2/. Retrieved 14 August 2014.
Original source: https://en.wikipedia.org/wiki/Given-When-Then.
Read more |