24 February 2012

BDD Ideas

In some meetings here, we've come up with some ideology of the Given, When, Then's.

Given's are seen here as having all the data set up. 

So a test shouldn't say:

Given a user logs in
and clicks continue
and clicks home
and clicks... etc.

If all of that is data set up, it would all be in the Given, like:
Given a user logs into the site and continues to the Personality page.

All the actions to get to that point, should be covered in the Given.

As for the Then, the Then area in GEB is always taken as true or false.  For this reason we don't need to define assertions.  assertions are given.  so instead of:
assert $("h3.title").text().equals("Questions")

we can just say
$("h3.title").text().equals("Questions")

No comments:

Post a Comment