Hello RSpec forum, So...I realize this is a bit of a crazy question, but I wanted to throw it out there to see what answers came back: is there any way to start an "interactive Cucumber" session similar to irb? For example: bash> crb>> Given that I do stuff >> When I do more stuff >> Then stuff should happenFor each line, this imaginary "crb" utility would search some feature & steps folders that I define somewhere, go look them up and then execute them one by one. I was thinking it''d be kinda neat for experimenting and playing around. Also, I''m my own case, I''m integrating Cucumber with Selenium, so it''d be nice to be able to drive the browser and play around as you''re writing up a feature (I was thinking the QA folks I work with would find it pretty fun). Is this even possible, or am I dreaming the impossible dream? What would it take to accomplish? I''d love to contribute this if it was doable. :) Thank you! Sebastian -- Posted via http://www.ruby-forum.com/.
On Wed, Jan 14, 2009 at 6:23 PM, Sebastian W. <lists at ruby-forum.com> wrote:> Hello RSpec forum, > So...I realize this is a bit of a crazy question, but I wanted to throw > it out there to see what answers came back: is there any way to start an > "interactive Cucumber" session similar to irb? > > For example: > bash> crb > >> Given that I do stuff > >> When I do more stuff > >> Then stuff should happen > > For each line, this imaginary "crb" utility would search some feature & > steps folders that I define somewhere, go look them up and then execute > them one by one. I was thinking it''d be kinda neat for experimenting and > playing around. >What value vould it bring over plain old: cucumber features/scratchpad.feature:34> Also, I''m my own case, I''m integrating Cucumber with Selenium, so it''d > be nice to be able to drive the browser and play around as you''re > writing up a feature (I was thinking the QA folks I work with would find > it pretty fun). > > Is this even possible, or am I dreaming the impossible dream? What would > it take to accomplish? I''d love to contribute this if it was doable. :) >I assume you''ve stumbled upon this: http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium Aslak> > Thank you! > Sebastian > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090114/507125d2/attachment.html>
On Jan 14, 2009, at 12:23 PM, Sebastian W. wrote:> Hello RSpec forum, > So...I realize this is a bit of a crazy question, but I wanted to > throw > it out there to see what answers came back: is there any way to > start an > "interactive Cucumber" session similar to irb? > > For example: > bash> crb >>> Given that I do stuff >>> When I do more stuff >>> Then stuff should happen > > For each line, this imaginary "crb" utility would search some > feature & > steps folders that I define somewhere, go look them up and then > execute > them one by one. I was thinking it''d be kinda neat for experimenting > and > playing around. > > Also, I''m my own case, I''m integrating Cucumber with Selenium, so it''d > be nice to be able to drive the browser and play around as you''re > writing up a feature (I was thinking the QA folks I work with would > find > it pretty fun).Why not just start the debugger in the middle of a step definition? (Check out the ruby-debug gem) Scott
On Wed, Jan 14, 2009 at 12:23 PM, Sebastian W. <lists at ruby-forum.com> wrote:> Hello RSpec forum, > So...I realize this is a bit of a crazy question, but I wanted to throw > it out there to see what answers came back: is there any way to start an > "interactive Cucumber" session similar to irb? > > For example: > bash> crb >>> Given that I do stuff >>> When I do more stuff >>> Then stuff should happen > > For each line, this imaginary "crb" utility would search some feature & > steps folders that I define somewhere, go look them up and then execute > them one by one. I was thinking it''d be kinda neat for experimenting and > playing around. >This is a very interesting idea. I like it a lot. I imagine it would be fairly easy to write. If someone doesn''t do one by this weekend I may give it a go, Zach> Also, I''m my own case, I''m integrating Cucumber with Selenium, so it''d > be nice to be able to drive the browser and play around as you''re > writing up a feature (I was thinking the QA folks I work with would find > it pretty fun). > > Is this even possible, or am I dreaming the impossible dream? What would > it take to accomplish? I''d love to contribute this if it was doable. :) > > Thank you! > Sebastian > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com
Aslak Helles?y wrote:> cucumber features/scratchpad.feature:34 > >Hi Aslak, I tried running this against one of my own feature files, but it didn''t seem to do anything? I wasn''t sure what was supposed to happen. Any light you can shed would be awesome. : )> I assume you''ve stumbled upon this: > http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium >Yes! It is awesome. Thanks a million. For Scott: I definitely want to do the same thing with the debugger, being able to step through the steps and so forth, but the use case for "crb" would be just to play around and try writing expressions for fun. E.g. if I wrote "Given that I do some step that hasn''t been implemented yet", the utility might say "=> pending" or some other message. I don''t know, color the shell yellow maybe, for the return value? Bottom line is that this is more for fun than profit. :) -- Posted via http://www.ruby-forum.com/.
2009-01-14 18:47, aslak hellesoy:> What value vould it bring over plain old: > cucumber features/scratchpad.feature:34You gotta admit that at least the cool-factor would be pretty high. :) -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
2009-01-14 18:23, Sebastian W.:> "interactive Cucumber" session similar to irb?I can imagine it (when combined with Selenium) being not only cool, but very useful tool when writing features. Kinda same way console is useful when writing code. -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
On Wed, Jan 14, 2009 at 9:57 PM, Tero Tilus <tero at tilus.net> wrote:> 2009-01-14 18:47, aslak hellesoy: > > What value vould it bring over plain old: > > cucumber features/scratchpad.feature:34 > > You gotta admit that at least the cool-factor would be pretty high. :) >Cool is soo 2008 ;-)> > -- > Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090114/53a5fae4/attachment.html>
On Wed, Jan 14, 2009 at 9:55 PM, Sebastian W. <lists at ruby-forum.com> wrote:> Aslak Helles?y wrote: > > > > cucumber features/scratchpad.feature:34 > > > > > > Hi Aslak, I tried running this against one of my own feature files, but > it didn''t seem to do anything? I wasn''t sure what was supposed to > happen. Any light you can shed would be awesome. : ) >The :line suffix tells cuke to run only the scenario on that particular line. http://wiki.github.com/aslakhellesoy/cucumber/running-features cucumber --help Aslak> > > > I assume you''ve stumbled upon this: > > http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium > > > > Yes! It is awesome. Thanks a million. > > For Scott: I definitely want to do the same thing with the debugger, > being able to step through the steps and so forth, but the use case for > "crb" would be just to play around and try writing expressions for fun. > > E.g. if I wrote "Given that I do some step that hasn''t been implemented > yet", the utility might say "=> pending" or some other message. I don''t > know, color the shell yellow maybe, for the return value? > > Bottom line is that this is more for fun than profit. :) > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090114/8203b759/attachment.html>
Aslak Helles?y wrote:> On Wed, Jan 14, 2009 at 9:57 PM, Tero Tilus <tero at tilus.net> wrote: > >> 2009-01-14 18:47, aslak hellesoy: >> > What value vould it bring over plain old: >> > cucumber features/scratchpad.feature:34 >> >> You gotta admit that at least the cool-factor would be pretty high. :) >> > > Cool is soo 2008 ;-)But for those of us living in the US, in 2009 the slogan is "Yes, you can!" :D -- Posted via http://www.ruby-forum.com/.
Aslak Helles?y wrote:> On Wed, Jan 14, 2009 at 9:55 PM, Sebastian W. <lists at ruby-forum.com> > wrote: > >> > The :line suffix tells cuke to run only the scenario on that particular > line. > > http://wiki.github.com/aslakhellesoy/cucumber/running-features > cucumber --help > > AslakAh, okay - I think I understand. But couldn''t I just as easily do that with the "-s" option? When I tried running my feature with the :line suffix it still executed everything before it, and continued going afterwards. For my purposes, it''d just be really nifty to play have a more interactive environment to play around in. Again...I''m totally game for you saying "you should get right on that, here''s where to go look". :) I''m more than willing to scratch my own itch, just not sure where to begin. :P -- Posted via http://www.ruby-forum.com/.
On Thu, Jan 15, 2009 at 12:04 AM, Sebastian W. <lists at ruby-forum.com> wrote:> Aslak Helles?y wrote: > > On Wed, Jan 14, 2009 at 9:55 PM, Sebastian W. <lists at ruby-forum.com> > > wrote: > > > >> > > The :line suffix tells cuke to run only the scenario on that particular > > line. > > > > http://wiki.github.com/aslakhellesoy/cucumber/running-features > > cucumber --help > > > > Aslak > > Ah, okay - I think I understand. But couldn''t I just as easily do that > with the "-s" option? When I tried running my feature with the :lineThe idea is to copy the last line of the backtrace of a failing scenario. It already has the line in the number. Copy paste is easy.> > suffix it still executed everything before it, and continued going > afterwards. >Then you may have found a bug.> > For my purposes, it''d just be really nifty to play have a more > interactive environment to play around in. Again...I''m totally game for > you saying "you should get right on that, here''s where to go look". :) > > I''m more than willing to scratch my own itch, just not sure where to > begin. :PWrite scenario. Doh :-) Aslak> > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090115/7fe5dc6c/attachment-0001.html>
Just in case it wasn''t clear from my other comments, yes! Please do! :) If there''s a call for assistance, I''d love to help. Zach Dennis wrote:> > This is a very interesting idea. I like it a lot. I imagine it would > be fairly easy to write. If someone doesn''t do one by this weekend I > may give it a go, > > Zach-- Posted via http://www.ruby-forum.com/.
On Jan 14, 2009, at 6:04 PM, Sebastian W. wrote:> Aslak Helles?y wrote: >> On Wed, Jan 14, 2009 at 9:55 PM, Sebastian W. <lists at ruby-forum.com> >> wrote: >> >>> >> The :line suffix tells cuke to run only the scenario on that >> particular >> line. >> >> http://wiki.github.com/aslakhellesoy/cucumber/running-features >> cucumber --help >> >> Aslak > > Ah, okay - I think I understand. But couldn''t I just as easily do that > with the "-s" option? When I tried running my feature with the :line > suffix it still executed everything before it, and continued going > afterwards. > > For my purposes, it''d just be really nifty to play have a more > interactive environment to play around in. Again...I''m totally game > for > you saying "you should get right on that, here''s where to go look". :) > > I''m more than willing to scratch my own itch, just not sure where to > begin. :PYeah, just insert this into your step definition: require ''rubygems''; require ''ruby-debug''; debugger Then type irb <return> Now you''ll be in the middle of an IRB session Scott
On Wed, Jan 14, 2009 at 3:51 PM, Scott Taylor <scott at railsnewbie.com> wrote:> > Yeah, just insert this into your step definition: > > require ''rubygems''; require ''ruby-debug''; debugger > > Then type irb <return> > > Now you''ll be in the middle of an IRB session >You can actually do ~$ irb>> require ''ruby-debug''=> true>> debugger(rdb:1) irb>>///ark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090114/59fc2d0e/attachment-0001.html>