HOME

TheInfoList



OR:

Given-When-Then (GWT) is a semi-structured way to write down
test case In software engineering, a test case is a specification of the inputs, execution conditions, testing procedure, and expected results that define a single test to be executed to achieve a particular software testing objective, such as to exercise ...
s. They can either be tested manually or automated as browser tests with tools like
Selenium Selenium is a chemical element with the symbol Se and atomic number 34. It is a nonmetal (more rarely considered a metalloid) with properties that are intermediate between the elements above and below in the periodic table, sulfur and tellurium, ...
and
Cucumber Cucumber (''Cucumis sativus'') is a widely-cultivated Vine#Horticultural climbing plants, creeping vine plant in the Cucurbitaceae family that bears usually cylindrical Fruit, fruits, which are used as culinary vegetables.
. It derives its name from the three clauses used, which start with the words given, when and then. 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.


See also

* Acceptance test-driven development *
Acceptance testing In engineering and its various subdisciplines, acceptance testing is a test conducted to determine if the requirements of a specification or contract are met. It may involve chemical tests, physical tests, or performance tests. In systems en ...
* Behavior-driven development * Cucumber syntax *
Hoare triple Hoare logic (also known as Floyd–Hoare logic or Hoare rules) is a formal system with a set of logical rules for reasoning rigorously about the correctness of computer programs. It was proposed in 1969 by the British computer scientist and lo ...


References

Software testing {{comp-sci-stub