I'm fixing up some old integration tests for our (RoR 2.3.5) website, and some scenarios (and their behaviors) depend on having multiple users logged in simultaneously. Once upon a time, these worked... three engineers and 18 months ago.
Our basic scenarios are written in cucumber, with capybara binding to selenium. I've tried all of the variations on Capybara::Session.new and open_session that I can imagine. These either programatically succeed, but continue to use the existing selenium window; or, they result in some testing method not existing.
I've also tried using webrat for the "secondary" sessions, but can't convince cucumber to switch drivers for a single step in a scenario (although it does switch between scenarios).
Am I totally up the proverbial creek? What would be awesome is for selenium to open multiple browsers as multiple unix users so that they don't share session state, and then log into the website. But, I have no idea where I'd even look to start hacking on that.
Honestly, at this point, I don't even know what tools I'm using, and which is responsible for what feature. Diving into the code of capybara and cucumber yields hundreds of lines of metaprogramming magic that somehow accretes into a testing framework. It's really making me loathe TDD despite my previous youthful enthusiasm.