How abstract should you get with BDD
Posted
by
Newton
on Programmers
See other posts from Programmers
or by Newton
Published on 2012-05-30T16:56:08Z
Indexed on
2012/06/01
4:49 UTC
Read the original article
Hit count: 350
I was writing some tests in Gherkin (using Cucumber/Specflow). I was wondering how abstract should I get with my tests.
In order to not make this open-ended, which of the following statements is better for BDD:
Given I am logged in with email [email protected] and password 12345
When I do something
Then something happens
as opposed to
Given I am logged in as the Administrator
When I do something
Then something happens
The reason I am confused is because 1 is more based on the behaviour (filing in email and password) and 2 is easier to process and write the tests.
© Programmers or respective owner