DEV Community

Discussion on: BDD rather than TDD: Result-Oriented Testing

Collapse
 
yucer profile image
yucer • Edited

With the time I have seen as a trend to use the first person to describe the interactions with the system (described by verbs).

So instead of:

When create a reservation

I use:

When I create a reservation

So all of them are described as my actions and the response of the system.

That makes the design of your language simpler.

Strictly speaking, in the Business Layer all the Business Functions are performed by Business Actors who play a Business Role. Look at this:

Business Layer

They would be Users and Groups in the Software Application that you are testing.

That's way I normally implement a login step:

Given I am logged in as an Student
 When I create a reservation

I try always to start all the scenarios with a login statement so that the Business Role can be easily identified.

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited

Though I try to make my sentence as compact as possible since the result would affect the console display as in the picture below (some text gets cropped), I like the idea of adding the subject pronoun (would definitely make it more readable).

cmder-python-behave