Skip to content

Instantly share code, notes, and snippets.

@raygunsix
Created May 17, 2011 22:18
Show Gist options
  • Save raygunsix/977544 to your computer and use it in GitHub Desktop.
Save raygunsix/977544 to your computer and use it in GitHub Desktop.
Sauce Labs selenium test with pass / fail status reporting
require "test/unit"
require "rubygems"
require "sauce"
# This should go in your test_helper.rb file if you have one
Sauce.config do |config|
config.browser_url = "http://www.suite101.com/"
config.browsers = [
#["Linux", "firefox", "3.6."],
["Windows 2003", "firefox", "3.6."]
]
end
class ReaderTest < Sauce::TestCase
def test_article_page
page.open "/content/dog-pneumonia-symptoms-causes-and-treatment-a209441"
assert page.is_text_present("Ads by Google")
end
def teardown
(@test_passed ? page.passed! : page.failed!)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment