Given-When-Then
Given-When-Then (GWT) is a semi-structured way to write down test cases.[src] They can either be tested manually or automated as browser tests with tools like Selenium and Cucumber.[src] It derives its name from the three clauses used, which start with the words given, when and then.[src] Given describes the preconditions and initial state before the start of a test and allows for any pre-test setup that may occur.[src] When describes actions taken by a user during a test.[src] Then describes the outcome resulting from actions taken in the when clause.[src] The Given-When-Then was proposed by Dan North in 2006, as part of behavior-driven development.[src]
Given-When-Then (GWT) is a semi-structured way to write down test cases.[src] They can either be tested manually or automated as browser tests with tools like Selenium and Cucumber.[src] It derives its name from the three clauses used, which start with the words given, when and then.[src] Given describes the preconditions and initial state before the start of a test and allows for any pre-test setup that may occur.[src] When describes actions taken by a user during a test.[src] Then describes the outcome resulting from actions taken in the when clause.[src] The Given-When-Then was proposed by Dan North in 2006, as part of behavior-driven development.[src] GIVEN that the inventory contains 10 units of steel AND the inventory contains 30 units of copper WHEN we consume 2 units of steel AND we consume 10 units of copper AND we purchase 5 units of steel THEN the inventory should contain 13 units of steel AND the inventory should contain 20 units of copper AND the purchase of 5 units of steel should be registered in the expenses list ==References==[src]
15 sentences · 15 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Given-When-Then." encyclopegia.org, 2026, https://encyclopegia.org/wiki/given-when-then. Accessed 27 November 2026.
Chicago
"Given-When-Then." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/given-when-then.
APA
encyclopegia.org. (2026). Given-When-Then. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/given-when-then
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON