<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Sauce Labs</title>
	
	<link>http://saucelabs.com/blog</link>
	<description>Green is Good</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:16:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SauceLabs" /><feedburner:info uri="saucelabs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>A bit of sugar and parallelism for Rails and RSpec</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/AWgh01hvbiA/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/03/a-bit-of-sugar-and-parallelism-for-rails-and-rspec/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 01:14:05 +0000</pubDate>
		<dc:creator>Sean Grove</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=393</guid>
		<description><![CDATA[Even though we focus very heavily on full-stack acceptance testing for the rails world, we know other forms of automated tests are critical as well. Our rails developers here make pretty heavy use of RSpec unit tests, and it&#8217;s nice to understand how to run those in parallel as well.
If you&#8217;re looking at how to [...]]]></description>
			<content:encoded><![CDATA[<p>Even though we focus very heavily on full-stack acceptance testing for the rails world, we know other forms of automated tests are critical as well. Our rails developers here make pretty heavy use of RSpec unit tests, and it&#8217;s nice to understand how to run those in parallel as well.</p>
<p>If you&#8217;re looking at how to setup a rails and selenium testing environment, check out <a href="http://saucelabs.com/blog/index.php/2010/02/running-selenium-tests-for-rails">our last post</a>.</p>
<h2>Parallelize the specs</h2>
<p>We&#8217;ll use the excellent <a href="http://github.com/grosser/parallel_specs">parallel_specs</a> to beat a bit of parallelism into our specs. It prepares a separate database for each test environment, groups the specs to divide amongst processes, and then starts up a rails environment with a separate database for each group of processes.</p>
<p>I&#8217;ll paraphrase the installation instructions for convenience.</p>
<p>Install the required plug-in/gem:</p>
<pre class="brush:bash">sudo gem install parallel
script/plugin install git://github.com/grosser/parallel_specs.git</pre>
<p>Here&#8217;s the semi-ingenious point &#8211; yaml can interpret ERB, so we can pass in an environment variable to the database.yml specifying at launch which database we want it to connect to.</p>
<p>Open config/database.yml and add the following:</p>
<pre class="brush:yaml">test:
  adapter: sqlite3
  database: db/xxx_test&lt;% ENV['TEST_ENV_NUMBER'] %&gt;.sqlite3
  pool: 5
  timeout: 5000</pre>
<p>(You can of course replace xxx_ with your project name)<br />
So for example, to have our tests run against the xxx_test2 database, we would use:</p>
<pre class="brush:bash">export TEST_ENV_NUMBER=2; rake db:test:prepare</pre>
<p>But it doesn&#8217;t make much sense to invoke it manually. That&#8217;s what plug-ins are for! Let&#8217;s go head and create/migrate a few test databases:</p>
<pre class="brush:bash">export TEST_ENV_NUMBER=0; rake db:test:create; rake db:test:migrate;
export TEST_ENV_NUMBER=1; rake db:test:create; rake db:test:migrate;
export TEST_ENV_NUMBER=2; rake db:test:create; rake db:test:migrate;</pre>
<p>Great, now you&#8217;re able to run your non-Selenium tests in parallel!</p>
<h2>But what about Selenium tests?</h2>
<p>Stay tuned for our article on Sauce Labs&#8217; SpecStorm plugin, that allows you to run your Selenium tests in <em>true</em> parallel fashion with Selenium Grid or our very own <a href="http://saucelabs.com/products/sauce-ondemand">Sauce OnDemand</a> service.</p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/AWgh01hvbiA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/03/a-bit-of-sugar-and-parallelism-for-rails-and-rspec/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/03/a-bit-of-sugar-and-parallelism-for-rails-and-rspec/</feedburner:origLink></item>
		<item>
		<title>Selenium IDE 1.0.5 is released!</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/YjvAU1_yqy8/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/02/selenium-ide-1-0-5-is-released/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 22:22:30 +0000</pubDate>
		<dc:creator>Adam Goucher</dc:creator>
				<category><![CDATA[Selenium Releases]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=741</guid>
		<description><![CDATA[One month (to the day!) after the release of Selenium IDE 1.0.4 was released, 1.0.5 is now available.

Download Selenium-IDE 1.0.5 now

This release fixes a couple really annoying bugs that were introduced in 1.0.4 and starts to build towards the future. Here are the highlights.

Self-hosting &#8211; Se-IDE will not longer be relying on addons.mozilla.org to be [...]]]></description>
			<content:encoded><![CDATA[<p>One month (to the day!) after <a href="http://saucelabs.com/blog/index.php/2010/01/selenium-ide-1-0-4-is-released/">the release of Selenium IDE 1.0.4</a> was released, 1.0.5 is now available.<br />
<br />
<a href="http://release.openqa.org/selenium-ide/1.0.5/selenium-ide-1.0.5.xpi">Download Selenium-IDE 1.0.5 now</a><br />
<br />
This release fixes a couple <i>really</i> annoying bugs that were introduced in 1.0.4 and starts to build towards the future. Here are the highlights.</p>
<ul>
<li><i>Self-hosting</i> &#8211; Se-IDE will not longer be relying on addons.mozilla.org to be hosting updates. This gives the project more flexibility around when releases are available to users.</li>
<li><i>Back into main project</i> &#8211; The code for Se-IDE was in a separate subversion branch than the rest of the current Selenium project which meant its visibility to other developers was lower and that changes were not easily propagated. Se-IDE now lives in the main project so will reap the benefits of the rapidly changing core.</li>
<li><i>User Formats work again</i> &#8211; In 1.0.4 there was a bug which meant that while you could add a custom format it would not appear in the list. This has been fixed.</li>
<li><i>Version Display</i> &#8211; The version of Se-IDE now appears in the title bar</li>
<li><i>Reload Extensions</i> &#8211; A tweak was made to the &#8216;reload user extensions&#8217; functionality introduced in 1.0.4 so the toolbar button only appears when you have turned it on.</li>
<li><i>Bool Preferences</i> &#8211; Preferences used to only be string values, even when a boolean would have been a better choice. Well, now you have a choice about whether you want your preference to be a string <u>or</u> bool.</li>
<li><i>Plugins Pane</i> &#8211; There is a new pane in the Options screen called &#8216;Plugins&#8217;. This will become the central means of managing plugins in future releases, but for now it doesn&#8217;t do much aside from listing which plugins have registered themselves with the (also new) addPlugin(id) API function.</li>
<li><i>Icons</i> &#8211; You will see a couple icons now in Firefox for Se-IDE rather than the default ones. Such as in the main Extensions window and in the Tools menu</li>
<p>
For the full release notes and who contributed what, see the <a href="http://code.google.com/p/selenium/wiki/SeIDEReleaseNotes">Google Code wiki</a>. Also on the Google Code site is the <a href="http://code.google.com/p/selenium/issues/list?can=2&#038;q=ide&#038;colspec=ID+Stars+Type+Status+Priority+Milestone+Owner+Summary&#038;cells=tiles">Issue Tracker</a> for any problems you find. (Just make sure you tag them as <i>ide</i>.)<br />
<br />
And as before, thanks to <a href="http://saucelabs.com">Sauce Labs</a> for sponsoring my work on this release.<br />
<br />
-Adam Goucher</p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/YjvAU1_yqy8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/02/selenium-ide-1-0-5-is-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/02/selenium-ide-1-0-5-is-released/</feedburner:origLink></item>
		<item>
		<title>Sauce RC 1.0 Released with Web UI for Selenium RC!</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/I5MRAylHuoI/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/02/sauce-rc-1-0-released/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 17:25:25 +0000</pubDate>
		<dc:creator>Santiago Suarez Ordoñez</dc:creator>
				<category><![CDATA[sauce rc]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=719</guid>
		<description><![CDATA[We&#8217;re pleased to announce we just released the new Sauce RC!
Hoping you all find this useful, we created a web interface for anyone to configure Sauce RC from the browser, on the same machine or even remotely!
Here&#8217;s a video of Sauce RC in action.  We hope you download and enjoy it!

]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re pleased to announce we just released the new <a href="http://saucelabs.com/products/downloads" target="_self">Sauce RC</a>!</p>
<p>Hoping you all find this useful, we created a web interface for anyone to configure Sauce RC from the browser, on the same machine or even remotely!</p>
<p>Here&#8217;s a video of Sauce RC in action.  We hope you <a title="Download Sauce RC" href="http://saucelabs.com/products/downloads" target="_self">download</a> and enjoy it!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/0sPbz16uv1c" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/0sPbz16uv1c"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/I5MRAylHuoI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/02/sauce-rc-1-0-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/02/sauce-rc-1-0-released/</feedburner:origLink></item>
		<item>
		<title>Running Selenium RSpec tests for Rails 2.3.5</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/eAnQU8Xkh6g/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/02/running-selenium-tests-for-rails/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:03:24 +0000</pubDate>
		<dc:creator>Sean Grove</dc:creator>
				<category><![CDATA[Selenium knowledge]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[rspec-rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=349</guid>
		<description><![CDATA[This article will get you setup with the bare-minimum environment to run Selenium tests with RSpec, for automated, full-stack testing of Rails apps. Once that&#8217;s done, we&#8217;ll work on polishing it for a nicer experience. In this post you find amalgamations of mostly outdated articles from around the internet updated to work with a modern [...]]]></description>
			<content:encoded><![CDATA[<p>This article will get you setup with the bare-minimum environment to run Selenium tests with RSpec, for automated, full-stack testing of Rails apps. Once that&#8217;s done, we&#8217;ll work on polishing it for a nicer experience. In this post you find amalgamations of mostly outdated articles from around the internet updated to work with a modern rails system.</p>
<p>It&#8217;s written on a clean environment courtesy of <a href="http://rvm.beginrescueend.com/">rvm</a>, so you may have some of the gems already setup.</p>
<h3>A new Rails app, RSpec, and rspec-rails</h3>
<p>First off, we&#8217;ll start with a new rails project:</p>
<pre class="brush:bash">gem install rails --no-ri --no-rdoc
rails rspec_saucerc
gem install rspec
gem install rspec-rails</pre>
<p>Edit config/environment.rb and add:</p>
<pre class="brush:ruby">  config.gem "rspec", :lib =&gt; false, :version =&gt; "&gt;= 1.2.9"
  config.gem "rspec-rails", :lib =&gt; false, :version =&gt; "&gt;= 1.2.9"</pre>
<p>This sets up all the required files for RSpec to get off the ground, but we need to integrate it into Rails:</p>
<pre class="brush:bash">script/generate rspec</pre>
<p>That will add the rake tasks, create the appropriate directories, and basic files. Now let&#8217;s get Selenium up and running!</p>
<h3>Selenium</h3>
<p>We&#8217;ll need to create a separate selenium database. in config/database.yml, let&#8217;s add:</p>
<pre class="brush:yaml">selenium:
  adapter: sqlite3
  database: db/selenium.sqlite3
  encoding: utf8
  timeout: 5000</pre>
<p>To get Selenium running under our RSpec stories, we&#8217;ll need the Selenium gem (note the capital &#8220;S&#8221; — it&#8217;s case-sensitive). Let&#8217;s also make sure we have the sqlite3 gem installed, and then prepare an appropriate environment for our selenium tests:</p>
<pre class="brush:bash">gem install Selenium
gem install sqlite3-ruby
cp config/environments/test.rb config/environments/selenium.rb</pre>
<p>Open config/environments/selenium.rb and remove the last line that reads:</p>
<pre class="brush:ruby">config.gem 'rspec-rails', :version =&gt; '&gt;= 1.3.2', :lib =&gt; false unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))</pre>
<h3>Sauce RC and Selenium RC</h3>
<p>Sauce RC will broker all communication between rails and any browsers you might be driving. Get it from our <a href="http://saucelabs.com/products/downloads">downloads</a> page for Windows or Mac, or use <a href="http://seleniumhq.org/projects/remote-control/">Selenium RC</a> for Linux, and start it up so we can run our tests.</p>
<h3>Testables</h3>
<p>We&#8217;ll need some fodder to test. Use the RSpec generator, then create and migrate the database:</p>
<pre class="brush:bash">script/generate rspec_scaffold person name:string age:string language:string
rake RAILS_ENV=selenium db:create
rake RAILS_ENV=selenium db:migrate</pre>
<h3>Startup our test server</h3>
<p>Rails tests do not normally bind to a webserver, so there is no way for Selenium to access the frontend. As a temporary workaround, we&#8217;ll manually invoke a Rails server using the selenium environment:</p>
<pre class="brush:bash">script/server -e selenium</pre>
<h3>Our spec helper</h3>
<p>We will be using the Selenium gem, so let&#8217;s add it to the spec helper:</p>
<pre class="brush:ruby">gem "selenium-client"
require "selenium/client"
require "selenium/rspec/spec_helper"</pre>
<h3>Example story</h3>
<p>We&#8217;ll gloss over which types of tests should include selenium front-end testing for now, and just say it belongs in integration tests. Let&#8217;s run an example story that will fail the first time through, and we&#8217;ll then fix it.</p>
<p>Put the following in spec/integration/people_spec.rb:</p>
<pre class="brush:ruby">require 'spec_helper'
describe "People" do
  before(:all) do
    @verification_errors = []

    @browser = Selenium::Client::Driver.new(
      :host =&gt; "localhost",
      :port =&gt; 4444,
      :browser =&gt; "*firefox"
      :url =&gt; "http://localhost:3000",
      :timeout_in_second =&gt; 90)

    @browser.start
  end

  before(:each) do
    @browser.start_new_browser_session
  end

  append_after(:each) do
    @browser.close_current_browser_session
    @verification_errors.should == []
  end

  it "should create a new Person with valid input" do
    @browser.open "/people"
    @browser.click "link=New person"
    @browser.wait_for_page_to_load "2000"
    @browser.type "person_name", "Jason Huggins"
    @browser.type "person_age", "26"
    @browser.type "person_language", "Albanian"
    @browser.click "person_submit"
    @browser.wait_for_page_to_load "30000"
    @browser.is_alert_present.should be_true
  end
end</pre>
<p>Let&#8217;s try it out:</p>
<pre class="brush:bash">rake spec:integration
F
1) 'People should create a new Person with valid input' FAILED
expected false to be true
./spec/integration/people_spec.rb:22:

Finished in 7.443904 seconds

1 example, 1 failure</pre>
<p>It&#8217;s failing as we expected it to (there shouldn&#8217;t be a javascript alert on submit). Let&#8217;s change the last line:</p>
<pre class="brush:ruby">    @browser.is_alert_present.should be_false</pre>
<p>&#8230; and try our test again:</p>
<pre class="brush:bash">rake spec:integration
.

Finished in 7.079062 seconds

1 example, 0 failures</pre>
<p>Looks good! We finally have a working rails project with rspec runners and Selenium.</p>
<h3>Weaknesses</h3>
<p>Although we&#8217;ve got Rails, RSpec, and Selenium all working together, the relationship is not harmonious.</p>
<p>Automated tests in rails are not meant to serve the outside world, and as such they don&#8217;t bind to a webserver/port. Tests are run within the same process, which makes them quite fast, but prevents us from using browser-based frontend tools such as Selenium. To get around that, we manually fired up a rails server instance with the selenium environment, but this is messy for a number of reasons:</p>
<ul>
<li>We have to manually start/stop the test server that selenium wants to access</li>
<li>We have to manually create the selenium environment&#8217;s database</li>
<li>We have to manually migrate the selenium environment each time there&#8217;s a schema change</li>
<li>Worse, we have to manually reset the database after each run</li>
<li>Running Selenium tests in serial is <em>slow</em></li>
</ul>
<p>We‘ve developed a plugin to automate some of these issues, called <a href="http://github.com/sgrove/spec_storm">SpecStorm</a>. We&#8217;ll go over installing it to get the most out of your tests (including running them in parallel) in the next post.</p>
<p>Notes:</p>
<p>Selenium matchers are case-sensitive: @browser.click &#8220;link=New Person&#8221; won&#8217;t match a link with &#8220;New person&#8221;</p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/eAnQU8Xkh6g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/02/running-selenium-tests-for-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/02/running-selenium-tests-for-rails/</feedburner:origLink></item>
		<item>
		<title>Sauce OnDemand supports Firefox 3.6</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/EEK_3WgDtrE/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/02/sauce-ondemand-supports-firefox-3-6/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 19:55:57 +0000</pubDate>
		<dc:creator>Miki Tebeka</dc:creator>
				<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=621</guid>
		<description><![CDATA[Following our zero-day support for Firefox 3.6 in Sauce RC, we are pleased to announce that Sauce OnDemand now supports Firefox 3.6 as well.
Use the following settings in your JSON configuration:
{
    "username" : "SAUCE-USER-NAME",
    "access-key" : "SAUCE-API-KEY",
    "os" : "Windows 2003",
    "browser" : [...]]]></description>
			<content:encoded><![CDATA[<p>Following our zero-day support for Firefox 3.6 in <a href="http://saucelabs.com/products/sauce-rc">Sauce RC</a>, we are pleased to announce that <a href="http://saucelabs.com/products/sauce-ondemand">Sauce OnDemand</a> now supports Firefox 3.6 as well.</p>
<p>Use the following <a href="http://saucelabs.com/products/docs/sauce-ondemand#json-config">settings</a> in your JSON configuration:</p>
<pre>{
    "username" : "<em>SAUCE-USER-NAME</em>",
    "access-key" : "<em>SAUCE-API-KEY</em>",
    "os" : "Windows 2003",
    "browser" : "firefox",
    "browser-version" : "3.6."
}</pre>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/EEK_3WgDtrE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/02/sauce-ondemand-supports-firefox-3-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/02/sauce-ondemand-supports-firefox-3-6/</feedburner:origLink></item>
		<item>
		<title>Death to Internet Explorer! Long Live Internet Explorer!</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/j6wHQsmglsw/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/02/death-to-internet-explorer-long-live-internet-explorer/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 23:29:10 +0000</pubDate>
		<dc:creator>Jason Huggins</dc:creator>
				<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=585</guid>
		<description><![CDATA[There has been a lot of negative press surrounding Internet Explorer. This week, Google sent an email to Google Apps administrators explaining their intentions to phase out support for Microsoft Internet Explorer 6.0. Just last month, French and German governments asked citizens to stop using the Internet Explorer browser (no matter the version). Yes, there is [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of negative press surrounding Internet Explorer. This week, Google sent an email to Google Apps administrators explaining their intentions to <a href="http://bear454.blogspot.com/2010/02/google-follows-37signals-lead-gives-ie6.html">phase out support</a> for Microsoft Internet Explorer 6.0. Just last month, French and German governments asked citizens to <a href="http://mashable.com/2010/01/18/france-against-internet-explorer">stop using the Internet Explorer browser</a> (no matter the version). Yes, there is even a blog titled &#8220;<a href="http://whyiesucks.blogspot.com">Why IE Sucks</a>.&#8221; (Parental discretion advised).</p>
<p>We’re of mixed opinion on the matter. Do we believe people should dump Internet Explorer? Yes! In fact, I outline three reasons why below. At the same time, due to subpar browsers like Internet Explorer, the value of cross-browser functional testing using Selenium is that much more important and relevant. Call it job security for testers.</p>
<p>I have no secret reason to pan Internet Explorer. I work closely with all browser flavors including Internet Explorer, Firefox, Safari, Chrome and Opera. Though I am a former Googler, I have no built-in bias to push one browser over another. And even though I recommend users not use IE, Sauce Labs supports and will continue to support IE in our downloadable products, <a href="http://saucelabs.com/products/downloads">Sauce IDE and Sauce RC</a>, and our cloud testing service, <a href="http://saucelabs.com/products/sauce-ondemand">Sauce OnDemand</a>. With that context, here are three reasons why I feel you should dump Internet Explorer.</p>
<p>1) <strong>IE is a virus magnet</strong><br />
Virus authors target IE/Windows users because IE still has the majority market-share. If they targeted Opera users, even if they had 100% success rate, they&#8217;d still not have a massive impact. In this case, following the herd can get you more hurt. Meanwhile, creators of Firefox and Chrome argue that their browsers are more secure than IE in that their open source nature makes it easier for security analysts to inspect the source code and fix security holes. Of course, the best way to test that argument will be when Firefox or Chrome reaches majority market share  (already true in some places) and virus authors target those browsers, too.</p>
<p>2) <strong>IE is slower</strong><br />
IE 6,7,8 are all significantly slower compared to Firefox, Chrome, and Safari when viewing very dynamic sites (like Google Maps or Gmail). Google Chrome is arguably the fastest. Among the &#8220;<a href="http://martinfowler.com/bliki/AlphaGeek.html">alpha geek</a>&#8221; set, Google Chrome (and the non-Google branded Chromium version) is becoming their every-day browser because it is so fast.</p>
<p>3) <strong>Web-standards and innovation</strong><br />
MS is becoming irrelevant to the conversation. Microsoft is not keeping up, so users are missing out on new features. HTML5 brings offline storage, and <a href="https://wiki.mozilla.org/Labs/Bespin/UserGuide#How_can_I_use_Bespin">new kinds of applications</a> that leverage the new &lt;canvas&gt; and &lt;video&gt; tags. Microsoft is moving so slowly that web developers are more often ignoring IE to focus on Firefox, Chrome, and Safari when building bleeding-edge applications. IE users will be left behind for these new applications. This is especially true on mobile devices, where the WebKit rendering engine is the de facto standard. On the desktop, Chrome and Safari are built on WebKit and are benefiting in new features and bug fixes because of the innovation going on in the mobile space.</p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/j6wHQsmglsw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/02/death-to-internet-explorer-long-live-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/02/death-to-internet-explorer-long-live-internet-explorer/</feedburner:origLink></item>
		<item>
		<title>Selenium ToTW: CSS Selectors in Selenium Demystified</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/kB4rv6cWiUc/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 22:42:42 +0000</pubDate>
		<dc:creator>Santiago Suarez Ordoñez</dc:creator>
				<category><![CDATA[Selenium Tip of the Week]]></category>
		<category><![CDATA[Selenium knowledge]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css selectors]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=503</guid>
		<description><![CDATA[This week in Selenium Tip of the Week we explain how CSS Selectors can be used to greatly improve the readability and power of your Selenium test code.]]></description>
			<content:encoded><![CDATA[<p>Following my previous TOTW about <a href="http://saucelabs.com/blog/index.php/2009/10/selenium-tip-of-the-week-start-improving-your-locators/">improving your locators</a>, this blog post will show you some advanced CSS rules and pseudo-classes that will help you move your XPATH locators to CSS, a native approach on all browsers.</p>
<h3>Next sibling</h3>
<p>Our first example is useful for navigating lists of elements, such as forms or ul items.  The next sibling will tell selenium to find the next adjacent element on the page that&#8217;s inside the same parent.  Let&#8217;s show an example using a form to select the field after username.</p>
<pre class="brush:css">
<form>
<input class="username" />&lt;/input&gt;
<input class="alias" />&lt;/input&gt;
</form>
</pre>
<p>Let&#8217;s write  a css selector that will choose the input field after &#8220;username&#8221;.  This will select the &#8220;alias&#8221; input, or will select a different element if the form is reordered.</p>
<pre class="brush:css">css=form input.username + input</pre>
<h3>Attribute values</h3>
<p>If you don&#8217;t care about the ordering of child elements, you can use an attribute selector in selenium to choose elements based on any attribute value.  A good example would be choosing the &#8216;username&#8217; element of the form without adding a class.</p>
<pre class="brush:css">
<form>
<input name="username" />&lt;/input&gt;
<input name="password" />&lt;/input&gt;
<input name="continue" type="button" />&lt;/input&gt;
<input name="cancel" type="button" />&lt;/input&gt;
</form>
</pre>
<p>We can easily select the username element without adding a class or an id to the element.</p>
<pre class="brush:css">css=form input[name='username']</pre>
<p>We can even chain filters to be more specific with our selections.</p>
<pre class="brush:css">css=input[name='continue'][type='button']</pre>
<p>Here Selenium will act on the input field with name=&#8221;continue&#8221; and type=&#8221;button&#8221;</p>
<h3>Choosing a specific match</h3>
<p>CSS selectors in Selenium allow us to navigate lists with more finess that the above methods.  If we have a ul and we want to select its fourth li element without regard to any other elements, we should use nth-child or nth-of-type.</p>
<pre class="brush:css">
<ul id="recordlist">
&lt;p&gt;Heading&lt;/p&gt;
<li>Cat</li>
<li>Dog</li>
<li>Car</li>
<li>Goat</li>
</ul>
</pre>
<p>If we want to select the fourth li element (Goat) in this list, we can use the nth-of-type, which will find the fourth li in the list.</p>
<pre class="brush:css">css=ul#recordlist li:nth-of-type(4)</pre>
<p>On the other hand, if we want to get the fourth element only if it is a li element, we can use a filtered nth-child which will select (Car) in this case.</p>
<pre class="brush:css">css=ul#recordlist li:nth-child(4)</pre>
<p>Note, if you don&#8217;t specify a child type for nth-child it will allow you to select the fourth child without regard to type.  This may be useful in testing css layout in selenium.</p>
<pre class="brush:css">css=ul#recordlist *:nth-child(4)</pre>
<h3>Sub-string matches</h3>
<p>CSS in Selenium has an interesting feature of allowing partial string matches using ^=, $=, or *=.  I&#8217;ll define them, then show an example of each:</p>
<table>
<tbody>
<tr>
<td>^=</td>
<td>Match a prefix</td>
</tr>
<tr>
<td>$=</td>
<td>Match a suffix</td>
</tr>
<tr>
<td>*=</td>
<td>Match a substring</td>
</tr>
</tbody>
</table>
<pre class="brush:css">css=a[id^='id_prefix_']</pre>
<p>A link with an &#8220;id&#8221; that starts with the text &#8220;id_prefix_&#8221;</p>
<pre class="brush:css">css=a[id$='_id_sufix']</pre>
<p>A link with an &#8220;id&#8221; that ends with the text &#8220;_id_sufix&#8221;</p>
<pre class="brush:css">css=a[id*='id_pattern']</pre>
<p>A link with an &#8220;id&#8221; that contains the text &#8220;id_pattern&#8221;</p>
<h3>Matching by inner text</h3>
<p>And last, one of the more useful pseudo-classes, :contains()  will match elements with the desired text block:</p>
<pre class="brush:css">css=a:contains('Log Out')</pre>
<p>This will find the log out button on your page no matter where it&#8217;s located.  This is by far my favorite CSS selector and I find it greatly simplifies a lot of my test code.</p>
<p>Tune in next week for more Selenium Tips from <a href="http://saucelabs.com"></a>Sauce Labs.</p>
<p><tt>Sauce Labs created <a href="http://saucelabs.com/products/sauce-ondemand">Sauce OnDemand</a>, a Selenium-based testing service that allows you to test across multiple browsers in the cloud. With <a href="http://saucelabs.com/products/downloads">Selenium IDE and Selenium RC</a> compatibilities, you can get complete cross-platform browser testing today.</tt></p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/kB4rv6cWiUc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/</feedburner:origLink></item>
		<item>
		<title>Selenium ToTW: HTTPS and self-signed certificate exceptions</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/fpaqh3lxpfM/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/01/selenium-totw-https-and-self-signed-certificate-exeptions/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 18:02:32 +0000</pubDate>
		<dc:creator>Santiago Suarez Ordoñez</dc:creator>
				<category><![CDATA[Selenium Tip of the Week]]></category>
		<category><![CDATA[Selenium knowledge]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[selenium tips]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=456</guid>
		<description><![CDATA[This week in our support email, help@saucelabs.com, we&#8217;ve seen a considerable number of cases of problems with Firefox and the Invalid Certificate warning thrown when a development environment is using the production&#8217;s certificate for HTTPS URLs, which causes the browser to wonder about the website&#8217;s identity.
If you do much browser-based testing, you have surely dealt [...]]]></description>
			<content:encoded><![CDATA[<p>This week in our support email, <a href="mailto:help@saucelabs.com" target="_self">help@saucelabs.com</a>, we&#8217;ve seen a considerable number of cases of problems with Firefox and the Invalid Certificate warning thrown when a development environment is using the production&#8217;s certificate for HTTP<strong>S</strong> URLs, which causes the browser to wonder about the website&#8217;s identity.</p>
<div id="attachment_461" class="wp-caption aligncenter" style="width: 474px"><a href="http://saucelabs.com/blog/wp-content/uploads/2010/01/Picture-8.png"><img class="size-full wp-image-461   " title="Invalid Certificate warning" src="http://saucelabs.com/blog/wp-content/uploads/2010/01/Picture-8.png" alt="Invalid Certificate warning" width="464" height="270" /></a><p class="wp-caption-text">Warning displayed by Firefox 3.5 in this situation</p></div>
<p>If you do much browser-based testing, you have surely dealt with this situation more than once. In the manual testing world, you just tell your browser to add an exception for that certificate and ignore further errors, and you can forget about seeing that annoying warning anymore.</p>
<p>But when you move on to automation in the Selenium world, things are not always that simple. In most browsers, adding a certificate exception will work, as Selenium shares the same session as the user and will find the exception as you do. In Firefox, though, Selenium RC creates a special profile each time the browser is started and there&#8217;s no trail of the user settings in it.</p>
<p>The workaround for this problem is to <a href="http://seleniumhq.org/docs/05_selenium_rc.html#specifying-the-firefox-profile">create your own Firefox profile</a>, with the specific certificate added on it by hand, and then <a href="http://seleniumhq.org/docs/05_selenium_rc.html#specifying-the-firefox-profile">tell Selenium to launch the browser based on that profile</a>.</p>
<p>Another interesting approach, the one we take at Sauce Labs, where we can&#8217;t do this kind of trick, because we just don&#8217;t know which certificate the user will need before their test starts, is the use of <a href="https://addons.mozilla.org/en-US/firefox/addon/10246">RCE (Remember Certificate Exception)</a>, which is  a plugin that will automatically detect the warning and make the browser go through it, returning the control to Selenium after 4 or 5 seconds. Notice that if you use this approach, you will need to make sure your tests will tolerate this 5 secs additional delay to open the page.</p>
<p>Note: We currently support RCE in our Firefox 3.0 machines, and will be porting this extension to Firefox 3.5 soon.</p>
<p>You can find more info about RCE on <a href="https://addons.mozilla.org/en-US/firefox/addon/10246">its plugin page</a> or in the <a href="http://sejq.blogspot.com/2009/01/remember-certificate-exception.html">author&#8217;s blog post</a>.</p>
<p>Update: Adam Goucher, one of the big minds in the testing world just wrote a blog post that we couldn&#8217;t have written better ourselves about the first and most important advice regarding HTTPS and testing: <a href="http://adam.goucher.ca/?p=1365">Do yourself a favour and don’t  test using HTTPS</a></p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/fpaqh3lxpfM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/01/selenium-totw-https-and-self-signed-certificate-exeptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/01/selenium-totw-https-and-self-signed-certificate-exeptions/</feedburner:origLink></item>
		<item>
		<title>Zero day Firefox 3.6 support in Sauce RC, Selenium RC</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/9X0mWPOLGVc/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/01/zero-day-firefox-3-6-support-in-sauce-rc-selenium-rc/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 02:23:49 +0000</pubDate>
		<dc:creator>Sean McQuillan</dc:creator>
				<category><![CDATA[Selenium Releases]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[sauce rc]]></category>
		<category><![CDATA[selenium rc]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=450</guid>
		<description><![CDATA[Today Sauce Labs released a new version of Sauce RC supporting Firefox 3.6, which was released by Mozilla this morning. Sauce Labs also sponsored work on Selenium RC to support Firefox 3.6. In under 12 hours, Sauce RC has added support for a brand new browser, allowing customers to keep their websites on the cutting [...]]]></description>
			<content:encoded><![CDATA[<p>Today Sauce Labs released a new version of <a href=http://saucelabs.com/products/downloads>Sauce RC</a> supporting Firefox 3.6, which was released by Mozilla this morning. Sauce Labs also sponsored work on Selenium RC to support Firefox 3.6. In under 12 hours, Sauce RC has added support for a brand new browser, allowing customers to keep their websites on the cutting edge of browser support.</p>
<p><a href=http://saucelabs.com/products/downloads>Sauce RC</a> is Sauce Labs&#8217; commercially supported version of Selenium RC that includes simplified install and administration. Sauce RC is backed by a dedicated team of engineers to ensure bugs are fixed promptly and new browsers are supported.</p>
<p>Congratulations and thanks to <a href="http://adam.goucher.ca/" target="_blank">Adam Goucher</a> for his effort in making this happen in record time.</p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/9X0mWPOLGVc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/01/zero-day-firefox-3-6-support-in-sauce-rc-selenium-rc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/01/zero-day-firefox-3-6-support-in-sauce-rc-selenium-rc/</feedburner:origLink></item>
		<item>
		<title>Ridiculously easy cross-browser testing with Sauce IDE</title>
		<link>http://feedproxy.google.com/~r/SauceLabs/~3/FOA-3abKZQk/</link>
		<comments>http://saucelabs.com/blog/index.php/2010/01/ridiculously-easy-cross-browser-testing-with-sauce-ide/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 15:17:07 +0000</pubDate>
		<dc:creator>Jason Huggins</dc:creator>
				<category><![CDATA[Sauce IDE]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=413</guid>
		<description><![CDATA[Riding on the coattails of yesterday&#8217;s official Selenium IDE 1.0.4 release, we&#8217;re very excited to announce Sauce IDE 1.0 (beta 1). Download it here. Sauce IDE is Sauce Labs’ certified, enhanced and commercially-supported version of Selenium IDE.]]></description>
			<content:encoded><![CDATA[<p>Riding on the coattails of yesterday&#8217;s official Selenium IDE 1.0.4 release, we&#8217;re very excited to announce Sauce IDE 1.0 (beta 1). <a href="http://saucelabs.com/products/downloads">Download it here</a>. Sauce IDE is Sauce Labs’ certified, enhanced and commercially-supported version of Selenium IDE.</p</p>
<p>With Sauce IDE, we&#8217;ve made cross-browser cloud testing <em>ridiculously</em> easy. After you record a test in Sauce IDE, you&#8217;re only one click away from replaying that test on any major browser on Windows or Linux. Sauce IDE allows users to tap directly into our Sauce OnDemand cloud-hosted Selenium service while getting access to a sophisticated Selenium test infrastructure without having to build and maintain the infrastructure yourself.</p>
<p>Another really cool feature is video recording and playback. With every browser test you run with Sauce IDE on the <a href="http://saucelabs.com/products/sauce-ondemand">Sauce OnDemand</a> cloud, you can view or download a full screen video of your test.</p>
<p>Sauce IDE is a plugin for Firefox, and we&#8217;ve also included Firefox 3.6 support in our latest release.</p>
<p>Here’s a quick screencast showing how easy it can be to start running cross-browser tests in the cloud.</p>
<p>- Jason Huggins</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="545" height="349" id="viddler_8ab2d6fe"><param name="movie" value="http://www.viddler.com/player/8ab2d6fe/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/8ab2d6fe/" width="545" height="349" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_8ab2d6fe"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/SauceLabs/~4/FOA-3abKZQk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2010/01/ridiculously-easy-cross-browser-testing-with-sauce-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://saucelabs.com/blog/index.php/2010/01/ridiculously-easy-cross-browser-testing-with-sauce-ide/</feedburner:origLink></item>
	</channel>
</rss>
