Basically you ask what a function is. Think about it, you have a story, the story describes the function that you (or other people) want for your application. Usually it has the form: As a user, I want to view a list of products. You can add notes to this story to make it clearer. But then a specific behavior arises (which you will ultimately test) - there are an infinite number of behaviors corresponding to this story (think about viewing products and many ways of presenting them). Your focus, in BDD, is to find the behavior that suits your application (I use the application, not the user, because sometimes you have to decide for the user) - talking to as many people as you can, trying to try and iterate it ended .
I like to go from top to bottom - always try to focus on behavior - to be more specific when you walk. If you think about it, given the behavior (which means a set of tests), there are an infinite number of implementations. Therefore, the focus of BDD is to truly understand behavior by experimenting and talking - there is always a degree of freedom.
surui
source share