[rspec-users] Cucumber: Running one feature under one profile

Ben Mabey ben at benmabey.com
Fri May 22 16:32:09 EDT 2009

aslak hellesoy wrote:
>> 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 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. :)



>> I followed the instructions on http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium
>> 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
>> Thanks
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list