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).
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.
On Wed, Jan 14, 2009 at 12:23 PM, Sebastian W. [email protected]
wrote:
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,
When I do more stuff
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)
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. : )
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.
On Wed, Jan 14, 2009 at 6:23 PM, Sebastian W. [email protected]
wrote:
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 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.
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 D. 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,
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.
On Thu, Jan 15, 2009 at 12:04 AM, Sebastian W. [email protected]
wrote:
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
The 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.