Forum: Ruby on Rails Cucumber + Selenium: Programmatically Starting a Test Server

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Beaae552ed6ef82efbc5b2de396ade85?d=identicon&s=25 Aaron Carlton (Guest)
on 2009-05-13 21:45
(Received via mailing list)
Hi All,

I am trying to learn BDD using the Cucumber framework, and am
integrating Selenium for client side tests.  I've been playing with
refactoring my cucumber installation a bit, and have pulled the code
to start the selenium server out into a profile-configuration file,
similar to env.rb:

# start selenium
server
@@browser = Selenium::SeleniumDriver.new("localhost", 4444, "*chrome",
"http://localhost", 15000)
@@browser.start

# teardown - stop selenium
server
at_exit do
  @@browser.stop
end

I would like to do the same thing to start my rails application test
server that I can run browser tests against, but I've googled and
haven't been able to find a clearcut suggestion.  Does anyone know how
to start/stop a rails server in :test mode via ruby?  Will I have to
resort to system() calls?  Your help and time is appreciated!

Aaron
This topic is locked and can not be replied to.