Rails browser testing with Cuprite

Topics: Rails testing, Continuous integration

The linked guide covers configuring Cuprite and Ferrum for stable Rails system tests, including CI and remote Chrome.

Subtopics

Bookmarks

Notes

The Evil Martians article covers a working Cuprite/Ferrum setup for Rails system tests, including Capybara configuration, CI stability settings, Dockerized browser testing, and remote Chrome configuration.

Useful details to check when CI browser tests fail:

  • register a dedicated Cuprite driver instead of relying on default Selenium assumptions
  • set a stable browser window size
  • raise Chrome startup process_timeout for CI
  • configure Capybara server host/app host correctly when the browser runs outside the Rails process
  • use a remote Chrome service in containerized environments instead of trying to smuggle a local browser into CI
  • store Capybara artifacts somewhere predictable for screenshots and HTML dumps

Questions