Comments on: DRY up your Cucumber Steps https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/ Matt Wynne taking it one tea at a time Wed, 21 Aug 2019 13:02:06 +0000 hourly 1 https://wordpress.org/?v=6.2 By: Jeffrey Biles https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-1675 Tue, 12 Jun 2012 17:09:06 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-1675 Thanks for the info!

Just a quick update: using ‘given’ and ‘when’ as part of a step definition is now deprecated, and the cucumber team wants you to use ‘step’ instead (according to my console output).

]]>
By: Matt https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-1366 Fri, 15 Jul 2011 13:53:01 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-1366 In reply to Arnaud Meuret.

I agree Arnaud, it would be better if these mappings were surfaced in Gherkin. However it’s not easy to do technically, so it’s hasn’t been implemented yet. I hope it will happen eventually, but we might have to wait for Cucumber 2.0!

]]>
By: Arnaud Meuret https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-1365 Fri, 15 Jul 2011 12:15:06 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-1365 Yes reusing Gherkin steps in the step definitions was a huge progress. However I really miss the matching feature in Gherkin space. RSpec has its Shared Examples feature and I have always wondered why the Cucumber team never wanted to augment Gherkin to allow a better behaviour factoring.

Isolating the stakeholders from the programming language is one of the main justification of Cucumber so why are we forced to enter the step definition space to get a nice feature like nested specifications ?

An example is here: https://gist.github.com/1084580

]]>
By: Matt https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-1361 Fri, 08 Jul 2011 16:45:03 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-1361 @Jairo: according to https://github.com/cucumber/cucumber/blob/master/History.md it was first added in v0.1.7

]]>
By: Jairo Diaz https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-1360 Fri, 08 Jul 2011 15:54:54 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-1360 I am working on a legacy application with an old cucumber version. From what version does Cucumber support nested steps?

]]>
By: Mark’s Link Blog » links for 2009-06-09 https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-604 Wed, 10 Jun 2009 06:05:52 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-604 […] blog.mattwynne.net : DRY up your Cucumber Steps (tags: testing cucumber bdd tdd dry) […]

]]>
By: Paul Jensen https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-566 Wed, 27 May 2009 07:59:41 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-566 Thanks for the post, I was in the same place of reusing steps for testing user authentication with authlogic.

]]>
By: Alexis Perrier https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-502 Sat, 18 Apr 2009 08:06:53 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-502 Thanks a lot, very useful.
A must have if your serious about testing
I was trying to find your article using “cucumber nested given” on google which didn’t work.
So I thought i’d add the keywords in the comment.

]]>
By: Robby on Rails : 20 articles on Cucumber and a free beverage recipe! https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-491 Fri, 10 Apr 2009 03:32:45 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-491 […] DRY up your Cucumber Steps, Matt Wynne […]

]]>
By: Matt https://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/comment-page-1/#comment-488 Wed, 08 Apr 2009 20:36:27 +0000 http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/#comment-488 Hi Wes,

It definitely sounds like Background would fit well for you – you can set up the data in the background then carry out different actions on it in different scenarios. The advantage of doing this is your tests are very clear about the data being set up. The disadvantage is that you can’t vary that data at all in the different scenarios. Spelling out the data to use can also be a bit noisy – sometimes the specific data you use doesn’t matter – you just want the general sense of the state of the system.

See this excellent post by Ben Mabey on that subject.

]]>