At last years RailsConf there was a presention by the Major League Gaming guys that discussed how they write Cucumber scenarios to test their services and infrastructure. Not sure about your specific timeout feature, but it may be helpful into how you could go about implementing those kind of tests.
http://confreaks.com/videos/895-railsconf2012-stack-smashing On Monday, February 25, 2013 6:00:03 AM UTC-7, Peter Mounce wrote: > > Hi there > > I'm trying to write some tests for infrastructure launched into and > running within AWS. Things like "home page should return 200 OK" to begin > with - end-to-end tests against just the public interface to kick the tyres. > > I want to kick off the test suite in parallel with a deployment, so that > the test suite is red, then goes green as various resources come into > service. > > I'd like to know whether there is an extension point so that I can wrap > `it` methods inside a `retryable` type structure, so that rspec does not > report the specs as failed until a particular number of retries have > occurred within a particular grace period. So, ideally, each `it` would > try itself and report back whether it passed or failed; if it passes, > remove itself from the not-passing-yet list. If it failed, go to the next > not-passing-yet test. I wouldn't want the first test to block the rest of > the suite from being attempted - so, breadth-first iterations. > > If there isn't that, I'd like to know whether it would be easier to create > one, vs create my own rspec runner that would do it at either a) the > individual spec basis, or b) the suite basis. > > The issue really is that I have a long running `before :all` (like, > ~25min), in the form of a series of shell commands, to execute, then run > tests against the result. That, combined with the fact that when the shell > commands finish, it's not guaranteed that the infrastructure that has been > spun up is actually ready for business, vs merely extant. Creating > something that is event-driven would be better, but not something I can > invest in immediately. > > Any help gratefully received! > > Regards > Pete > -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/rspec/-/23-q34t_MQ4J. For more options, visit https://groups.google.com/groups/opt_out.
