3 ms·
Cucumber is part of our workflow and, although I don't have a control for this comparison, I think it makes us more efficient. Our product owners write in Gherk
by mildavw 13y ago
Cucumber is part of our workflow and, although I don't have a control for this comparison, I think it makes us more efficient. Our product owners write in Gherkin (non-technical != illiterate btw) and can essentially throw the feature files over the wall and any dev can pick it up and get to work. Now, there is conversation around every feature but sometimes only at estimation time.
Our POs also use git (non-technical != vcs illiterate) so we have a history of who wrote/modified what spec when.
Also, we have an additional simple layer of abstraction between feature steps and the actual tests. Most of our step definitions are three line methods that make calls to a ui driver that knows the details of our ui; or to a "given" driver that knows the details of our database/models. This ensures that there is only one place where anyone will implement, say, a user logging in.
Given(/^I am a logged in user$/) do
given.a_logged_in_user
end
while elsewhere there might be
Given(/^I have signed in$/) do
given.a_logged_in_user
end
If the log in process changes, we just edit the given driver.
We generally only write golden path features. Edge cases are handled with lower level testing.
Our feature files stick to specifying business value rather than ui implementation. For example, we don't do this:
Given I visit the homepage
When I enter "children's bikes" in the search field
And I hit the submit button
Then I am on the results page
And I see a fieldset with a legend "Children's Bikes"
And I see a table containing "Huffy Sprite"
We would write it like:
Given I search for a specific product category
Then I see the search term I used
And the results of the search
When a dev needs to work on an app they haven't touched in 6 months, it's nice for them to read feature files like this to get up to speed on what the app is actually supposed to do. Then can then dig into the ui and given drivers to see how it does it.
There is additional infrastructure and PO training involved, but overall, I'd say cucumber improves clarity and communication on our team.