Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Calling steps from step defs in Cuke4Duke (Was: Paper on Imperative vs Declarative style / Nested steps)

Received: by 10.224.126.72 with SMTP id b8mr374923qas.13.1307634059238;
        Thu, 09 Jun 2011 08:40:59 -0700 (PDT)
X-BeenThere: cukes@googlegroups.com
Received: by 10.224.187.145 with SMTP id cw17ls143434qab.2.gmail; Thu, 09 Jun
 2011 08:40:57 -0700 (PDT)
Received: by 10.224.203.133 with SMTP id fi5mr371992qab.20.1307634057025;
        Thu, 09 Jun 2011 08:40:57 -0700 (PDT)
Received: by 10.224.203.133 with SMTP id fi5mr371991qab.20.1307634057003;
        Thu, 09 Jun 2011 08:40:57 -0700 (PDT)
Return-Path: <m...@mattwynne.net>
Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28])
        by gmr-mx.google.com with ESMTPS id k32si1490916qcs.1.2011.06.09.08.40.55
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 09 Jun 2011 08:40:55 -0700 (PDT)
Received-SPF: neutral (google.com: 66.111.4.28 is neither permitted nor denied by best guess record for domain of m...@mattwynne.net) client-ip=66.111.4.28;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 66.111.4.28 is neither permitted nor denied by best guess record for domain of m...@mattwynne.net) smtp.mail=m...@mattwynne.net; dkim=pass header...@messagingengine.com
Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42])
	by gateway1.messagingengine.com (Postfix) with ESMTP id A0CE520E20
	for <cukes@googlegroups.com>; Thu,  9 Jun 2011 11:40:55 -0400 (EDT)
Received: from frontend2.messagingengine.com ([10.202.2.161])
  by compute2.internal (MEProxy); Thu, 09 Jun 2011 11:40:55 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:mime-version:content-type:subject:date:in-reply-to:to:references:message-id; s=smtpout; bh=RMelk1V6uG1qdnaFNjwQn5wOSp0=; b=n/hNgMswHrPdFOtYts15ham3CLIVz9rJYGaWeHQkv9Ud5z5E3i2CxSKCNiEXhrBd371n1iVsPYOfADXR973w/kvOI1X+1woyLHpi7nVPW3A78PTM20gZEIvg5q4D/7qtrmAxcQl4XWTWSnvERhtocFT8cpwmVK5yFxMmeDKT7yY=
X-Sasl-enc: nZm7y/uLdWmjE01sb8eI2zemY/JvS8Y5pSazAA6oJWKX 1307634054
Received: from [192.168.1.2] (cust123-dsl48.idnet.net [212.69.48.123])
	by mail.messagingengine.com (Postfix) with ESMTPSA id D05F5442DB5
	for <cukes@googlegroups.com>; Thu,  9 Jun 2011 11:40:54 -0400 (EDT)
From: Matt Wynne <m...@mattwynne.net>
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: multipart/alternative; boundary=Apple-Mail-1-761854971
Subject: Re: [Cucumber:8173] Calling steps from step defs in Cuke4Duke (Was: Paper on Imperative vs Declarative style / Nested steps)
Date: Thu, 9 Jun 2011 16:40:52 +0100
In-Reply-To: <18909504.736.1307573714949.JavaMail.geo-discussion-forums@prne37>
To: cukes@googlegroups.com
References: <18909504.736.1307573714949.JavaMail.geo-discussion-forums@prne37>
Message-Id: <34E88484-59C2-4C08-AFE8-C92FE968B...@mattwynne.net>
X-Mailer: Apple Mail (2.1084)


--Apple-Mail-1-761854971
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii


On 8 Jun 2011, at 23:55, Robert wrote:

>=20
> On Wednesday, June 8, 2011 8:06:59 AM UTC-7, mattwynne wrote:
>=20
> On 5 Jun 2011, at 20:15, Robert wrote:
>> be of some help to the testers I know.  Or, possibly, just more =
education on the pitfalls of using an imperative style might be of some =
use.  My apologies if I've rambled a bit.  Obviously, my ramblings are =
solely based on my experience as a tester, and are not reflective of the =
entire testing community.
>=20
> Thanks for your contribution to the discussion, Robert.
>=20
> It's worth noting that you can already do this. You can call the =
#steps method from within a step definition, and pass it arbitrary =
gherkin steps to try to run:
>=20
> Given /I am on page 3 of the wizard/ do
>    steps %{
>      Given I have completed page 1 of the wizard
>      And I have completed page 2 of the wizard
>    }
> end
>=20
> There are maintainability problems with this approach, which are well =
documented on this list if you search the archives (for Nested Steps). =
But as a first step to help move away from imperative steps, it can be a =
great move.
>=20
>=20
>=20
> Thanks, Matt.  This could certainly lessen the troubles of a number of =
my colleagues.  The example you provided looks like it was meant for =
Ruby.  Is this feature also supported in Java (i.e., Cuke4Duke) ? And, =
if so, could you provide an example.

I'm afraid I don't know the answer to this. I expect there is a way, but =
I haven't used Cuke4Duke much. Can anyone help?

cheers,
Matt

m...@mattwynne.net
07974 430184


--Apple-Mail-1-761854971
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On 8 Jun 2011, at 23:55, Robert wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><br>On =
Wednesday, June 8, 2011 8:06:59 AM UTC-7, mattwynne wrote:<blockquote =
class=3D"gmail_quote" style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; =
border-left-color: rgb(204, 204, 204); border-left-style: solid; =
padding-left: 1ex; position: static; z-index: auto; "><div =
style=3D"word-wrap:break-word"><br><div><div>On 5 Jun 2011, at 20:15, =
Robert wrote:</div><blockquote type=3D"cite">be of some help to the =
testers I know.&nbsp; Or, possibly, just more education on the pitfalls =
of using an imperative style might be of some use.&nbsp; My apologies if =
I've rambled a bit.&nbsp; Obviously, my ramblings are solely based on my =
experience as a tester, and are not reflective of the entire testing =
community.<br></blockquote><div><br></div>Thanks for your contribution =
to the discussion, Robert.</div><div><br></div><div>It's worth noting =
that you can already do this. You can call the #steps method from within =
a step definition, and pass it arbitrary gherkin steps to try to =
run:</div><div><br></div><div>Given /I am on page 3 of the wizard/ =
do</div><div>&nbsp;&nbsp; steps %{</div><div>&nbsp;&nbsp; &nbsp; Given I =
have completed page 1 of the wizard</div><div>&nbsp;&nbsp; &nbsp; And I =
have completed page 2 of the wizard</div><div>&nbsp;&nbsp; =
}</div><div>end</div><div><br></div><div>There are maintainability =
problems with this approach, which are well documented on this list if =
you search the archives (for Nested Steps). But as a first step to help =
move away from imperative steps, it can be a great =
move.</div><div><br></div><div>
<span style=3D"border-collapse:separate;color:rgb(0, 0, =
0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight=
:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-inde=
nt:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:m=
edium"><span style=3D"border-collapse:separate;color:rgb(0, 0, =
0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight=
:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;font-size:medium"><div =
style=3D"word-wrap:break-word"><span =
style=3D"border-collapse:separate;color:rgb(0, 0, =
0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight=
:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;font-size:medium"><div =
style=3D"word-wrap:break-word"><span =
style=3D"border-collapse:separate;color:rgb(0, 0, =
0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight=
:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;font-size:medium"><div =
style=3D"word-wrap:break-word"><span =
style=3D"border-collapse:separate;color:rgb(0, 0, =
0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight=
:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;font-size:medium"><div =
style=3D"word-wrap:break-word"><div><font class=3D"Apple-style-span" =
color=3D"#144FAE"><font class=3D"Apple-style-span" =
color=3D"#000000"><br></font></font></div></div></span></div></span></div>=
</span></div></span></span></div></div></blockquote><div><br>Thanks, =
Matt.&nbsp; This could certainly lessen the troubles of a number of my =
colleagues.&nbsp; The example you provided looks like it was meant for =
Ruby.&nbsp; Is this feature also supported in Java (i.e., Cuke4Duke) ? =
And, if so, could you provide an example.<br></div>


</blockquote><br></div><div>I'm afraid I don't know the answer to this. =
I expect there is a way, but I haven't used Cuke4Duke much. Can anyone =
help?</div><br><div>
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; =
font-variant: normal; font-weight: normal; letter-spacing: normal; =
line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; =
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; font-size: medium; =
"><div>cheers,</div><div>Matt</div><div><br></div><div><a =
href=3D"mailto:m...@mattwynne.net">m...@mattwynne.net</a></div><div>07974 =
430184</div></span>
</div>
<br></body></html>=

--Apple-Mail-1-761854971--