You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should adopt BDD Testing, atleast for complicated test cases, requiring some documentation.
The BDD specification would be like:
given: "An item is created"
when: "Item is disabled"
then: "Item does not contribute to the composition"
And the code would be like:
given: "An item is created"def item =newItem()
verify {
item.enabled() ==true
}
when: "Item is disabled"
item.setEnabled(false)
then: "Item does not contribute to the composition"
verifyAll {
item.isEnabled() ==false
}
BDD tests can be written using the spock framework.
Spock also has an extension spock-reports that generates nice HTML test reports.
The text was updated successfully, but these errors were encountered:
This discussion begain in #57
We should adopt BDD Testing, atleast for complicated test cases, requiring some documentation.
The BDD specification would be like:
And the code would be like:
BDD tests can be written using the spock framework.
Spock also has an extension spock-reports that generates nice HTML test reports.
The text was updated successfully, but these errors were encountered: