Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

sauce-rspec gem should be created #91

Open
rtyler opened this issue Sep 5, 2012 · 5 comments
Open

sauce-rspec gem should be created #91

rtyler opened this issue Sep 5, 2012 · 5 comments
Labels
Milestone

Comments

@rtyler
Copy link
Contributor

rtyler commented Sep 5, 2012

Right now these are just some loose ideas of what the gem should handle

  • It should set the name of the job running on Sauce (see: Sauce.config do |c| c[:name] = 'Foo' end)
  • It should be really easy to flip the switch between running against Selenium locally and running against Sauce
  • It should support running the tests highly parallel
  • It should encourage short and concise RSpec examples to be written, not long and contrived lists of driver commands
@ghost ghost assigned rtyler Sep 5, 2012
@rtyler rtyler mentioned this issue Sep 5, 2012
@chendo
Copy link

chendo commented Jan 8, 2013

+1, especially on the setting the name of the job on Sauce

@rtyler
Copy link
Contributor Author

rtyler commented Jan 9, 2013

I'm working on the foundational work for this, part of what is required is actually cleaning up the "root" sauce.gem.

@chendo, do you have any suggestions for the syntax for using Sauce with RSpec?

@chendo
Copy link

chendo commented Jan 9, 2013

I'm using Sauce with Capybara, so the main thing for me is to set Capybara.default_driver and that handles the rest, but I would like RSpec example naming as the job as a built-in feature. I've got a before hook that sets it by modifying the default config which is super hacky.

I've also just an env variable called USE_SAUCE that switches between selenium and sauce driver.

I would like to see a way to name parts of an RSpec example, kind of like how Cucumber steps work (without actually having to use Cucumber). This would enable the results to be easier to read what part actually went wrong, as well as being able to test multiple parts of a flow in one go rather than having multiple tests almost doing the same thing. Having these show up on the Sauce job log would be fantastic but would require much more work I presume.

@rtyler
Copy link
Contributor Author

rtyler commented Jan 9, 2013

@chendo I think I'm following you, but a couple example snippets would do wonders for helping me understand what you're suggesting.

Also, USE_SAUCE=1, YES! This is how we're toggling lots of things at @lookout just because it's the easiest way in some cases right now :-P

@chendo
Copy link

chendo commented Jan 9, 2013

Something like this, but not sure if I would prefer block syntax or like Rake desc syntax.

feature "authentication" do
  scenario "log in" do
    visit "/"
    tag("Sign in") do
      click_link 'Sign In'
      fill_in "Username", with: "user"
      fill_in "Password", with: "pass"
      click_button 'Sign In'
      within('#user_username') do
        page.should have_content('user')
      end
    end
    tag("Sign out") do
      click_button 'Sign Out'
      page.should_not have_selector('#user_username')
    end
  end
end

Then the stuff in tag are like mini examples that don't reset the state and show up on Sauce job descriptions.

@DylanLacey DylanLacey modified the milestone: Gem Version 4 Sep 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants