Company
Date Published
Author
The Sauce Labs Team
Word count
771
Language
English
Hacker News points
None

Summary

To set up Selenium tests with RSpec for automated full-stack testing of Rails apps, start by creating a new Rails project, installing required gems, and configuring the environment. This includes adding the `rspec-rails` gem to integrate RSpec with Rails and setting up a separate selenium database using SQLite. The process also involves installing the Selenium gem, preparing an environment for selenium tests, and running tests using Sauce RC or Selenium RC. A spec helper is created to use the Selenium gem, and example stories are written to test specific scenarios, such as creating a new person with valid input. However, this setup has some weaknesses, including the need to manually start/stop the test server and create the selenium environment's database. Running Selenium tests in serial can be slow, but a plugin called SpecStorm is available to automate some of these issues and run tests in parallel.