My understanding of feature files tallies up with Zeljko.

Assuming you haven't looked into this already but I'm sure there's a Cucumber 
feature called a Background that might help? (Travelling at the moment 
otherwise I'd check this out for you - sorry).


Sent from Samsung Mobile

-------- Original message --------
From: Nikolas Everett <[email protected]> 
Date: 18/12/2013  15:49  (GMT+00:00) 
To: "QA (software quality assurance) for Wikimedia projects." 
<[email protected]> 
Subject: Re: [QA] Best practices for long scenarios in Cucumber? 
 



On Wed, Dec 18, 2013 at 10:41 AM, Željko Filipin <[email protected]> wrote:
On Tue, Dec 17, 2013 at 10:26 PM, Jeff Hall <[email protected]> wrote:
This works just fine, but it seems like a violation of the Don't Repeat 
Yourself (DRY) philosophy1].  Does anyone know if there is a more elegant way 
to construct a long Scenario in Cucumber?

I have already commented in the commit[1], but I will repeat here:

"The goal of feature file is communication. Lines 17-32 should be replaced with 
something like "given I have edited the page three times"."

Like I said, I don't like looping constructs in steps because they make 
failures harder to read.  Something like
Given I have edited the page to add foo
And I have edited the page to add bar
And I have edited the page to add splat

is longer, has more repetition, but will at least tell you which edit failed if 
one did.  Even if you don't expect the edits to fail, stuff happens, and 
knowing more is important.  Especially if the tests take a long time to fun.

Nik
_______________________________________________
QA mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/qa

Reply via email to