Welcome to MegaDriver

With MegaDriver, you can simulate multiple clients in the same {Cucu}[http://en.wikipedia.org/wiki/Cucumber]{mber}[https://github.com/cucumber/cucumber] scenario.

It is a Capybara Driver extended from Selenium Capybara Driver with some Cucumber Steps.

Getting Started

  1. Install MegaDriver at the command prompt if you haven’t yet:

    gem install megadriver

  2. Copy MegaDriver’s step definitions to your step definitions directory

    PS: we have in pt-BR besides English

  3. Add the following code to your features/support/env.rb:

    Before do Capybara.session_name = :default @other = 0 end

  4. Set up MegaDriver as your Capybara driver:

  5. Add Capybara.default_driver = :megadriver to your features/support/env.rb

  6. OR tag your Cucumber scenarios with @megadriver

Example

Feature: Chat

  Scenario: Exchange messages
    Given "Falcon" is in control
    And I am in the chatroom

    Given "Humbert" is in control
    And I am in the chatroom
    When I type "Hi" in the message box
    And press enter

    Given "Falcon" is in control
    Then I should see "Hi"

  Scenario: Other exchange message example
    Given "Falcon" is in control
    And I am in the chatroom

    Given another client is in control
    And I am in the chatroom
    When I type "Hi" in the message box
    And press enter

    Given "Falcon" is in control
    Then I should see "Hi"

Observation

TODO

Make possible to select the browser type Create a generator

Thanks

Copyright © 2011 Pedro Menezes. See LICENSE.txt for further details.