Forum: RSpec Cucumber: Running one feature under one profile

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3c1e5c89c8968ebd7b4387c40b06aea0?d=identicon&s=25 JohnnyH (Guest)
on 2009-05-22 21:10
(Received via mailing list)
Hey Folks,

I followed the instructions on
http://wiki.github.com/aslakhellesoy/cucumber/sett...
and created 2 profiles: default and selenium. It works, but not if I
want to run one feature under a specifc profile. For example, I tried:

cucumber -p default --require features features/plain/
manage_users.feature

and I get all the tests including the selenium server.

What's goin' on like?

Thanks
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-05-22 21:40
(Received via mailing list)
> Hey Folks,
>

Aargh profiles. The initial intention was that you could just do
cucumber -p foo.
And then you wouldn't have to type a lot of arguments.

The intention was *not* to use -p along with additional arguments,
although cucumber lets you do it by merging stuff together.

Using profiles as a mechanism to run various subsets of features and
step definitions that live underneath the same features directory is
something I do *not* recommend. It's much easier to have several
different root folders:

features # regular stuff
selenium_features # only selenium stuff

And a rake task for each. Or run cucumber selenium_features or
cucumber features as you see fit.

I know the wiki recommends all this crazy profile stuff. I'm sorry
about that - I didn't write it.

> I followed the instructions on 
http://wiki.github.com/aslakhellesoy/cucumber/sett...
> and created 2 profiles: default and selenium. It works, but not if I
> want to run one feature under a specifc profile. For example, I tried:
>
> cucumber -p default --require features features/plain/
> manage_users.feature
>
> and I get all the tests including the selenium server.
>
> What's goin' on like?

Try to add --verbose to see what's going on. Or better - organise your
features like I described above, and lose the profiles.

Aslak
C694a032be7518a0d704318895f8fe1d?d=identicon&s=25 Ben Mabey (mabes)
on 2009-05-22 22:59
(Received via mailing list)
aslak hellesoy wrote:
>
>
> I know the wiki recommends all this crazy profile stuff. I'm sorry
> about that - I didn't write it.
>

I somewhat disagree, the combination of profiles + tags is a good way to
organize the features IMO.  The feature file talks about the feature
regardless of if it uses JS or not.  So, if you have a feature that uses
webrat 90% of the time but then has one or two scenarios that require JS
you don't need to split that feature into two separate features files-
you can just tag them.   I can see how having separate dirs can be
helpful as well, but in general I kinda like the "crazy profile" stuff.
:)

FWIW,

Ben
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-05-23 00:43
(Received via mailing list)
>> The intention was *not* to use -p along with additional arguments,
>> And a rake task for each. Or run cucumber selenium_features or
> webrat 90% of the time but then has one or two scenarios that require JS you
> don't need to split that feature into two separate features files- you can
> just tag them.   I can see how having separate dirs can be helpful as well,
> but in general I kinda like the "crazy profile" stuff. :)
>

Good points Ben.

People ask questions almost daily about Selenium, and many of them
seem related to profiles. Since I don't use either of them much I'm
not in a good position to help people with it. That's why I recommend
people go for a less complex setup.

Aslak
This topic is locked and can not be replied to.