Forum: RSpec Cucumber: Running a single feature / scenario

Cdf378de2284d8acf137122e541caa28?d=identicon&s=25 Matt Wynne (mattwynne)
on 2008-09-01 19:29
(Received via mailing list)
Am taking cucumber for a first spin today - first impressions are good.

How do I go about running a single feature or scenario so I don't
have to run the whole lot when I'm working on a particular one?

cheers,
Matt
----
http://blog.mattwynne.net
http://songkick.com

In case you wondered: The opinions expressed in this email are my own
and do not necessarily reflect the views of any former, current or
future employers of mine.
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-09-01 21:48
(Received via mailing list)
On Mon, Sep 1, 2008 at 12:08 PM, Matt Wynne <matt@mattwynne.net> wrote:
> Am taking cucumber for a first spin today - first impressions are good.
> How do I go about running a single feature or scenario so I don't have to
> run the whole lot when I'm working on a particular one?

There's no support for this yet in Story Runner or Cucumber. Feel free
to add a feature request at
http://rspec.lighthouseapp.com/projects/16211.
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 aslak hellesoy (Guest)
on 2008-09-01 22:32
(Received via mailing list)
On Mon, Sep 1, 2008 at 9:45 PM, David Chelimsky <dchelimsky@gmail.com>
wrote:
> On Mon, Sep 1, 2008 at 12:08 PM, Matt Wynne <matt@mattwynne.net> wrote:
>> Am taking cucumber for a first spin today - first impressions are good.
>> How do I go about running a single feature or scenario so I don't have to
>> run the whole lot when I'm working on a particular one?
>
> There's no support for this yet in Story Runner or Cucumber. Feel free

Yes there is. It's been in Cucumber for at least a month.

> to add a feature request at
> http://rspec.lighthouseapp.com/projects/16211.

cucumber --help

Example:

cucumber path/to/file.feature --line 33

Or with Rake:

rake features FEATURE=path/to/file.feature CUCUMBER_OPTS="--line 33"

It's not documented on the Wiki yet. Pass the line number of one of
the steps. I think it's broken when GivenScenario is involved.

Aslak
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-09-01 22:39
(Received via mailing list)
On Mon, Sep 1, 2008 at 3:30 PM, aslak hellesoy
<aslak.hellesoy@gmail.com> wrote:
> On Mon, Sep 1, 2008 at 9:45 PM, David Chelimsky <dchelimsky@gmail.com> wrote:
>> On Mon, Sep 1, 2008 at 12:08 PM, Matt Wynne <matt@mattwynne.net> wrote:
>>> Am taking cucumber for a first spin today - first impressions are good.
>>> How do I go about running a single feature or scenario so I don't have to
>>> run the whole lot when I'm working on a particular one?
>>
>> There's no support for this yet in Story Runner or Cucumber. Feel free
>
> Yes there is. It's been in Cucumber for at least a month.

Sorry man - didn't realize.
Cdf378de2284d8acf137122e541caa28?d=identicon&s=25 Matt Wynne (mattwynne)
on 2008-09-02 01:00
(Received via mailing list)
On 1 Sep 2008, at 21:30, aslak hellesoy wrote:
> It's not documented on the Wiki yet. Pass the line number of one of
> the steps. I think it's broken when GivenScenario is involved.
>
> Aslak

Thanks Aslak. i've added a bit more detail to the github wiki to
explain the line number thing.
2aa199dfea7a3beb6a07994af7aa5c26?d=identicon&s=25 Pirkka Hartikainen (pikemon)
on 2009-07-08 09:52
--line option has been deprecated, use the colon syntax instead.

cucumber path/to/file.feature --line 33

has become

cucumber path/to/file.feature:33


PS. updating this thread because of a high google page rank, it's the
first search result for "cucumber running a single scenario"
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2011-05-20 19:22
cucumber path/to/file.feature --line 33

seems to still work (google led me here, too).
Ee26e5124a47d063b75bc66bc8bff8a0?d=identicon&s=25 Nishith R. (nishith_r)
on 2011-08-23 07:24
For sake of completeness, if you are using bundle in rails3, and don't
want to invoke rake [to save init time], you can also execute it the
following way:

bundle exec cucumber --guess --profile default
path/feature_name.feature:line_number

HTH
Nishith
1df9fc8ddf084661265bbae74a8d0b43?d=identicon&s=25 Justin Ko (Guest)
on 2011-08-23 14:40
(Received via mailing list)
Sent from my iPhone

On Aug 22, 2011, at 11:25 PM, "Nishith R." <lists@ruby-forum.com> wrote:

> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Cucumber has its own mailing list.
This topic is locked and can not be replied to.