Do you do this in every step definition ? "Given that I am logged in"
I am new to cucumber.
And for most of the site'开发者_运维知识库s functionality, you have to be logged in.
So when writing cucumber, do you write, given that I am logged in
for every step definition?
I typically do, yes. For me, it seems clearer when you're reading the tests and seeing the output in the console.
If you don't want the duplication you can use a Background to setup stuff that's common to all the scenarios in the file.
精彩评论