[QA] Best practices for long scenarios in Cucumber?
Nikolas Everett
neverett at wikimedia.org
Wed Dec 18 15:49:43 UTC 2013
On Wed, Dec 18, 2013 at 10:41 AM, Ċ½eljko Filipin <zfilipin at wikimedia.org>wrote:
> On Tue, Dec 17, 2013 at 10:26 PM, Jeff Hall <jhall at wikimedia.org> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20131218/be4ab487/attachment.html>
More information about the QA
mailing list