Before and After blocks for individual feature files?

On 1 May 2009, at 03:32, Julian L. wrote:

Hey ben,

Selenium is slow, and we have a lot of
Ajax, so I’m just looking at ways to speed it up. Tags will be my
first port of call and splitting out between automated and
simulated. It irks me we can’t then simply run all our tests with
one simple cucumber command -we need two. It’d be nice if webrat
could switch between browser types per scenario or per feature. Sigh.

Have you looked at celerity? I’m not sure if webrat has an adapter for
it yet, but it’s a ‘headless’ browser which drives a lot faster than
selenium. Some people on this list are getting a lot of joy out of it.

It’d be kinda cool if there was a sort of before and after for a
than simply once.
usually for look-up data… but if you were really concerned about
can I ask if your scenarios are written in a declarative or
imperative fashion[1]? If they are written declaratively, or at
least partly, then you can specify a lot more behavior in a step
without adding too much noise to the scenario. Another thing I
should point out is that you don’t need to, and you shouldn’t, test
everything on the Cucumber level. For complex views, for example,
it may be easier to do RSpec


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Matt W.
http://blog.mattwynne.net

On Fri, May 1, 2009 at 12:33 PM, Matt W. [email protected] wrote:

Have you looked at celerity? I’m not sure if webrat has an adapter for it
yet, but it’s a ‘headless’ browser which drives a lot faster than selenium.
Some people on this list are getting a lot of joy out of it.

+1 to celerity. You need to jump through some hoops with JRuby/Java but
it
cut the time it takes to run my features by 3-4 times almost.

Ben

Celerity is very cool - when it works. It didn’t work with out messy
combination of javascript libraries, alas. (Dojo 0.4-ish for legacy
bits, GWT for new bits) - apparently it will work with either of these
frameworks, but for us, with both, it died mysteriously (and we gave
up trying to fix it due to limited time)

  • Korny

On Fri, May 1, 2009 at 10:08 PM, Ben L. [email protected]
wrote:


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users


Kornelis Sietsma korny at my surname dot com
“Every jumbled pile of person has a thinking part
that wonders what the part that isn’t thinking
isn’t thinking of”

Korny S. wrote:

Celerity is very cool - when it works. It didn’t work with out messy
combination of javascript libraries, alas. (Dojo 0.4-ish for legacy
bits, GWT for new bits) - apparently it will work with either of these
frameworks, but for us, with both, it died mysteriously (and we gave
up trying to fix it due to limited time)

  • Korny

Yeah, I have had similar experiences with Celerity. To be fair, it is
not Celerity’s shortcoming but rather it is HTMLUnit’s and Rhino’s for
not being able to support all the JS frameworks yet. If you don’t have
a legacy system though I think Celerity is the way to go for JS testing.

-Ben

Ben L. wrote:

+1 to celerity. You need to jump through some hoops with JRuby/Java
but it cut the time it takes to run my features by 3-4 times almost.

I would suggest taking a look at Culerity a nice wrapper for Celerity
which takes the headache out of having a non JRuby app use Celerity.

There is also a Selenium style equivalent → WebDriver → a headless
browser. I’ve not got round to playing with it yet, but it looks nice

http://code.google.com/p/webdriver/


Joseph W.