<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div><div></div><div><br></div><div><div>My understanding of feature files tallies up with Zeljko.</div><div><br></div><div>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).</div></div><div><br></div><div><br></div><div><div style="font-size:75%;color:#575757">Sent from Samsung Mobile</div></div></div><br><br><br>-------- Original message --------<br>From: Nikolas Everett <neverett@wikimedia.org> <br>Date: 18/12/2013  15:49  (GMT+00:00) <br>To: "QA (software quality assurance) for Wikimedia projects." <qa@lists.wikimedia.org> <br>Subject: Re: [QA] Best practices for long scenarios in Cucumber? <br> <br><br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 18, 2013 at 10:41 AM, Ċ½eljko Filipin <span dir="ltr"><<a href="mailto:zfilipin@wikimedia.org" target="_blank">zfilipin@wikimedia.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="gmail_quote">On Tue, Dec 17, 2013 at 10:26 PM, Jeff Hall <span dir="ltr"><<a href="mailto:jhall@wikimedia.org" target="_blank">jhall@wikimedia.org</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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?</blockquote>




</div><br></div>I have already commented in the commit[1], but I will repeat here:</div><div class="gmail_extra"><br></div>"The goal of feature file is communication. Lines 17-32 should be replaced with something like "given I have edited the page three times"."<br>

</div></blockquote><div><br></div><div>Like I said, I don't like looping constructs in steps because they make failures harder to read.  Something like<br></div><div>Given I have edited the page to add foo<br></div><div>

And I have edited the page to add bar<br></div><div>And I have edited the page to add splat<br><br></div><div>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.<br>

<br></div><div>Nik<br></div></div></div></div></div></div></div></div>
</body>