#150 ✓out-of-date
Joe Van Dyk

multiple session support

Reported by Joe Van Dyk | February 1st, 2009 @ 11:16 PM

I had been doing something like this in an earlier version of webrat:


def login_as user
  session = ActionController::Integration::Session.new
  session.visit '/"
  # session does steps to login
  return session
end

def test_do_stuff
  bob = login_as(:bob)
  jim = login_as(:jim)
  bob.go_do_stuff
  jim.go_do_other_stuff
  # test interaction
end

Recently, webrat doesn't seem to add its methods to the the Session class anymore. So I get messages like "method 'visit' undefined" when doing session.visit.

Comments and changes to this ticket

  • Bryan Helmkamp

    Bryan Helmkamp February 8th, 2009 @ 11:45 PM

    • Tag set to featurerequest
    • State changed from “new” to “open”

    Thanks for the report, Joe.

    The next step on this ticket is to figure out what API for multiple sessions Webrat should support, I think. Ideally, it would not be dependent on the underlying framework, so it can be the same with Rails, Merb, Rails+Selenium, Mechanize, etc.

    Then, making that work in the various environments may be tricky.

    WDYT?

  • gaffo

    gaffo June 3rd, 2009 @ 10:16 AM

    • State changed from “open” to “out-of-date”

    Closing as out-of-date as there has been no response in several months. Will always re-open if it's commented on again.

  • Douglas Tan

    Douglas Tan September 10th, 2009 @ 01:39 AM

    • Assigned user set to “gaffo”

    I recently added rudimentary support for creating and maintaining concurrent selenium sessions on my fork of webrat. It's on the multiple-selenium-sessions branch [http://github.com/bianster/webrat/tree/multiple-selenium-sessions]. I'll appreciate it if someone could take a look at it.

  • cschiefelbein

    cschiefelbein January 12th, 2010 @ 08:03 PM

    I am new to webrat, have been hunting all over for a clue as to how to test multiple simultaneous logins. Any work on concurrent webrat sessions since last year?

    (not using Selenium so not sure how a webrat+selenium approach would back-translate to just webrat)

  • Jarl Friis

    Jarl Friis April 21st, 2010 @ 10:03 AM

    @gaffo. It is commented on again, which to me looks like there still is an interest... Could you please reopen?

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

Pages