Created
May 17, 2011 22:18
-
-
Save raygunsix/977544 to your computer and use it in GitHub Desktop.
Sauce Labs selenium test with pass / fail status reporting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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