<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Selenium Testing? Do Cross Browser Testing with Sauce Labs &#187; Uncategorized</title>
	<atom:link href="http://saucelabs.com/blog/index.php/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://saucelabs.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 22:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Brief History-In-Progress of Running Tests in Parallel with PHPUnit</title>
		<link>http://saucelabs.com/blog/index.php/2011/12/a-brief-history-in-progress-of-running-tests-in-parallel-with-phpunit/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/12/a-brief-history-in-progress-of-running-tests-in-parallel-with-phpunit/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 09:18:56 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=5654</guid>
		<description><![CDATA[PHPUnit is great. One of the great things about PHPUnit is that it does its job so well that there’s only one notable testing framework for PHP. Other languages have messy competition between multiple frameworks, and PHP gets to have just one. Like most testing frameworks, PHPUnit runs tests one-at-a-time. This makes sense because unit [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>PHPUnit is great.</li>
</ul>
<p>One of the great things about PHPUnit is that it does its job so well that there’s only one notable testing framework for PHP. Other languages have messy competition between multiple frameworks, and PHP gets to have just one.</p>
<ul>
<li>Like most testing frameworks, PHPUnit runs tests one-at-a-time.</li>
</ul>
<p>This makes sense because unit tests are usually fast and so you don&#8217;t have to wait for them to finish. But these days, many PHP shops also use PHPUnit to kick off their Selenium tests. And because Selenium uses real browsers and exercises the entire end to end system, they are by nature much slower than unit tests. And herein lies one of the biggest speed bumps preventing PHP shops from delivering new code to their users quickly. Here comes the metaphor!</p>
<p style="padding-left: 30px;"><a href="http://saucelabs.com/blog/wp-content/uploads/2011/12/hotdog.jpg"><img class="size-full wp-image-5657 alignright" title="hot dog stand" src="http://saucelabs.com/blog/wp-content/uploads/2011/12/hotdog.jpg" alt="" width="240" height="160" /></a>Your tests are people, and running them is feeding them. They all want to eat at the same time (lunch time is build time.) They get in line at the hot dog stand, run by the hot dog vendor, PHPUnit. PHPUnit quickly hands each of them a preheated hot dog, one at a time. Everybody gets fed.</p>
<p style="padding-left: 30px;">Then you find out about this new kind of person, the Selenium test. They’re more powerful, but their meal takes a long time to finish. No problem! You give PHPUnit the facilities and training to make Selenium food by downloading PHPUnit_Selenium. But now, each time it’s a Selenium test’s turn in line, everyone has to wait for it to finish.</p>
<p style="padding-left: 30px;">So maybe you heard about this restaurant across the street called Sauce Labs that specializes in Selenium food. They have hundreds of chefs waiting to cook for you. So you tell PHPUnit to use Sauce Labs.</p>
<p style="padding-left: 30px;"><a href="http://saucelabs.com/blog/wp-content/uploads/2011/12/kitchen.jpg"><img class="size-full wp-image-5660 alignleft" title="kitchen" src="http://saucelabs.com/blog/wp-content/uploads/2011/12/kitchen.jpg" alt="" width="240" height="128" /></a>But PHPUnit was brought up in a world of hot dogs, without Selenium or Sauce Labs. It doesn’t know how to multitask. It leads each Selenium test over to Sauce Labs alone, then sits next to it and watches while one Sauce chef cooks and 499 Sauce chefs anxiously twiddle their thumbs. PHPUnit needs to send all the Selenium tests to Sauce Labs at the same time, to take advantage of the idle Sauce chefs and get everyone fed in faster.</p>
<p>Many people, including several of our customers, have already realized how valuable PHPUnit parallelism would be.</p>
<p>They built their own parallelism support in-house. In particular, PBWorks’ OMGUnit, built on top of PHPUnit, launches their test files simultaneously to take advantage of Sauce’s cloud capacity.</p>
<p>That’s great for you if and only if you’re PBWorks, or one of the many PHPUnit users who have cooked up your own system that runs on top of PHPUnit. We don’t want all our customers to have to suffer those indignities. We wanted a parallelism solution to hand to all our customers, that works out of the box, regardless of setup.</p>
<p>I talked to PBWorks, and they graciously open sourced OMGUnit. The original plan was to make OMGUnit general enough to hand to our customers. I played with it until I felt like I had a handle on how parallelism works, but I realized there was a bigger opportunity here. The demand for PHPUnit to support parallel testing was risking PHPUnit&#8217;s future as the One And Only PHP test framework, and it didn&#8217;t have to.</p>
<ul>
<li>So we contributed parallel test execution to PHPUnit core.</li>
</ul>
<p>It&#8217;s fully cross-platform. As of Nov 30, 2011, it has not yet been released, and I probably have more work to do before it gets released. But you can get a working preview of it today! More on that later.</p>
<p>Once it&#8217;s released, you can run PHPUnit tests in parallel with a command line parameter:</p>
<pre class="brush:plain">-j|--jobs &lt;count&gt;</pre>
<p>or with the following attribute on your TestCase class:</p>
<pre class="brush:php">/*
* @runTestsInParallel &lt;count&gt;
*/</pre>
<p>where &lt;count&gt;is the maximum number of processes you want PHPUnit to use in parallel.</p>
<ul>
<li>It&#8217;s due for release in PHPUnit 3.7</li>
</ul>
<p>In the meantime you can get a preview version of it from the <a href="http://saucelabs.github.com/pear/">Sauce pear channel</a>, but it&#8217;s built off of some old versions of PHPUnit&#8217;s supporting libraries. There are steps for getting it working in <a href="http://www.google.com/url?q=http%3A%2F%2Fsaucelabs.com%2Fdocs%2Fondemand%2Fgetting-started%2Fenv%2Fphp%2Fse1%2Fmac&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNGZp9ZO3W152tBeSNIUabQK3LWwVg">our docs</a>.</p>
<hr />
<p>&nbsp;</p>
<ul>
<li>UPDATE: Parallelism will not be available in PHPUnit 3.7</li>
</ul>
<p>Sebastian, the reclusive founder and maintainer of PHPUnit, has changed his mind. He is interested enough in concurrency that <a href="https://github.com/sebastianbergmann/phpunit-selenium/pull/64#issuecomment-3834433">he has generously decided</a> to rewrite it himself.  What this means for you is that PHPUnit&#8217;s internal parallelism code will be much better written, but you will have to wait a little longer. His current plan is to release it before April 2013.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F12%2Fa-brief-history-in-progress-of-running-tests-in-parallel-with-phpunit%2F&amp;title=A%20Brief%20History-In-Progress%20of%20Running%20Tests%20in%20Parallel%20with%20PHPUnit" id="wpa2a_2"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/12/a-brief-history-in-progress-of-running-tests-in-parallel-with-phpunit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Announcing Selenium 2.8.0 support</title>
		<link>http://saucelabs.com/blog/index.php/2011/10/announcing-selenium-2-8-0-support/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/10/announcing-selenium-2-8-0-support/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 18:28:52 +0000</pubDate>
		<dc:creator>Santiago Suarez Ordoñez</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=5336</guid>
		<description><![CDATA[Selenium 2.8.0 is Selenium’s latest release. It includes some important bug fixes as well as great features people have been waiting for: setFileDetector and support for file uploads in RemoteDriver for java Native event support in Firefox 7 Here’s the changelog and the official announcement in Selenium&#8217;s blog for more information. The current default version [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Selenium 2.8.0</strong> is Selenium’s latest release. It includes some important bug fixes as well as great features people have been waiting for:<img class="alignright" title="Selenium Logo" src="http://seleniumhq.org/images/big-logo.png" alt="" width="200" height="181" /></p>
<ul>
<li><a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.html#setFileDetector%28org.openqa.selenium.remote.FileDetector%29">setFileDetector</a> and support for file uploads in RemoteDriver for java</li>
<li>Native event support in Firefox 7</li>
</ul>
<p>Here’s the <a href="http://selenium.googlecode.com/svn/trunk/java/CHANGELOG">changelog</a> and the <a href="http://seleniumhq.wordpress.com/2011/10/06/selenium-2-8-released/">official announcement in Selenium&#8217;s blog</a> for more information.</p>
<p>The current default version for our service is 2.6.0. But once thoroughly tested, we’ll be announcing the move to 2.8.0 as the default version for all of our users’ tests to run. In the meantime, <strong>you can start using this new version right now</strong> by adding the following Desired Capabilities/JSON key-value:</p>
<pre class="brush:js">"selenium-version": "2.8.0"</pre>
<p><strong>If you see any issues</strong> after moving your tests to this new release, <strong>we definitely want to hear about it</strong>. And remember, once we move everyone over, you’ll still be able to test with previous versions using the “<em>selenium-version</em>” capability outlined above, in case you notice any issues with the default version.</p>
<p>For more information about the “<em>selenium-version</em>” flag, you can check our docs on <a href="http://saucelabs.com/docs/ondemand/additional-config#selenium-version">Sauce OnDemand additional configuration</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F10%2Fannouncing-selenium-2-8-0-support%2F&amp;title=Announcing%20Selenium%202.8.0%20support" id="wpa2a_4"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/10/announcing-selenium-2-8-0-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Announcing Selenium 2.7.0 support</title>
		<link>http://saucelabs.com/blog/index.php/2011/09/announcing-selenium-2-7-0-support/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/09/announcing-selenium-2-7-0-support/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 15:30:21 +0000</pubDate>
		<dc:creator>Santiago Suarez Ordoñez</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=5076</guid>
		<description><![CDATA[Selenium 2.7.0 is Selenium&#8217;s latest release. Released just Friday, it includes some important bug fixes to make your tests in the cloud even more reliable than before. Here&#8217;s the official changelog for more information. Once thoroughly tested, we&#8217;ll be announcing the move to 2.7.0 as the default version for all of our users&#8217; tests to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="selenium logo" src="http://seleniumhq.org/images/big-logo.png" alt="" width="200" height="181" /><strong>Selenium 2.7.0</strong> is Selenium&#8217;s latest release. Released just Friday, it includes some important bug fixes to make your tests in the cloud even more reliable than before. Here&#8217;s the <a href="http://selenium.googlecode.com/svn/trunk/java/CHANGELOG">official changelog</a> for more information.</p>
<p>Once thoroughly tested, we&#8217;ll be announcing the move to 2.7.0 as the default version for all of our users&#8217; tests to run. In the meantime, <strong>you can start using this new version right now</strong> by adding the following Desired Capabilities/JSON key-value:</p>
<pre class="brush:js">"selenium-version": "2.7.0"</pre>
<p><strong>If you see any issues</strong> after moving your tests to this new release, <strong>we definitely want to hear about it</strong>. And remember, once we move everyone over, you&#8217;ll still be able to test with previous versions using the &#8220;<em>selenium-version</em>&#8221; capability outlined above, in case you notice any issues with the default version.</p>
<p>For more information about the &#8220;<em>selenium-version</em>&#8221; flag, you can check our docs:<br />
<a href="http://saucelabs.com/docs/sauce-ondemand#selenium-version">http://saucelabs.com/docs/sauce-ondemand#selenium-version</a>.</p>
<p>Happy testing!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F09%2Fannouncing-selenium-2-7-0-support%2F&amp;title=Announcing%20Selenium%202.7.0%20support" id="wpa2a_6"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/09/announcing-selenium-2-7-0-support/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Surprising Worst Browser</title>
		<link>http://saucelabs.com/blog/index.php/2011/08/the-surprising-worst-browser/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/08/the-surprising-worst-browser/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 18:48:45 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=4859</guid>
		<description><![CDATA[We have lots of data Just like any good software company, we track all kinds of data. Last time we shared some of it with you, you loved it, and that data wasn’t even the good stuff. We thought it was, but it dawned on us recently that we’ve been indirectly been tracking something better. [...]]]></description>
			<content:encoded><![CDATA[<h4>We have lots of data</h4>
<p>Just like any good software company, we track all kinds of data. <a href="http://saucelabs.com/blog/index.php/2011/06/we%E2%80%99ve-been-watching-you-and-we-have-graphs/">Last time</a> we shared some of it with you, you loved it, and that data wasn’t even the good stuff. We thought it was, but it dawned on us recently that we’ve been indirectly been tracking something better. And when we realized where to look, we found something unexpected.</p>
<p>In case you haven’t heard, <a href="http://saucelabs.com/?jumpstart=true">Sauce OnDemand</a> is a tool for automating real browsers (<a href="http://saucelabs.com/?jumpstart=true">try it out</a>! it&#8217;s awesome). We have metadata about millions of browser sessions <a href="http://saucelabs.com/customers">our customers</a> have used to test their actual websites. As everyone knows, sometimes your software doesn’t work. Maybe it crashes or maybe you had a bug. Sauce OnDemand is no different &#8211; almost 100% of the time, nothing goes wrong; our reliability in the last few months is at least 99.94%. In fact, as you&#8217;ll see later, we&#8217;re now more reliable than modern browsers. But sometimes there’s an error that we think may have been our fault. When there is, we refund the customer and work to fix it. <em>We also record that there was an error.</em> Does that seem significant enough to be italicized? If it does, you’re smarter than we were.</p>
<p><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/firefox260.jpg"><br />
</a><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/firefox2602.jpg"><img class="size-full wp-image-4892 alignnone" title="firefox260" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/firefox2602.jpg" alt="" width="52" height="50" /></a><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/internet_explorer_logo1.jpg"><img class="alignnone size-full wp-image-4893" title="internet_explorer_logo" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/internet_explorer_logo1.jpg" alt="" width="50" height="50" /></a><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/Safari-logo-high-res.jpg"><img class="alignnone size-full wp-image-4894" title="Safari-logo-high-res" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/Safari-logo-high-res.jpg" alt="" width="50" height="50" /></a><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/google_chrome_logo_NEW.jpg"><img class="alignnone size-full wp-image-4895" title="google_chrome_logo_NEW" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/google_chrome_logo_NEW.jpg" alt="" width="50" height="50" /></a><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/Opera_512x5121.png"><img class="alignnone size-full wp-image-4897" title="Opera_512x512" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/Opera_512x5121.png" alt="" width="50" height="50" /></a></p>
<h4>We know which browsers cause the most errors</h4>
<p>See, sometimes job errors were caused by connectivity, or bugs in our code, or maybe neutrinos from outer space. But some of the time, they were the browser itself crashing. For each error, it would take real investigation to figure out what caused it, and we have thousands of them. But our code and our customers’ code is independent of the browser being tested (which is the whole point of both Sauce OnDemand and Selenium), so if we only look at <em>relative</em> error rates <em>broken down by browser</em>, we can see which browsers are least reliable. Nobody else has this data. This is the *only* statistically significant study of browser reliability on real webpages. <a href="http://www.google.com/search?q=browser+reliability">Check for yourself</a> &#8211; it’s not out there.</p>
<h4>Browser fight!</h4>
<p style="text-align: center;"><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight3.png"><img class="aligncenter size-full wp-image-4899" title="browserfight" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight3.png" alt="" width="610" height="350" /></a></p>
<p style="text-align: center;"><em>Error rates (percent) by browser and version</em>*<em><br />
</em></p>
<p>The numbers in the graph above are misleading for a some of the browsers. Here’s why:</p>
<ul>
<li><strong>We stopped supporting Firefox 3.5 a while ago</strong>. That means all FF3.5 jobs are from a long time ago, before we’d had much time to streamline and errorproof our system. All browsers would have a higher error rate if we only look at jobs from a long time ago.</li>
<li><strong>IE9, FF4, FF5, and Opera 11 are new</strong>. This is the opposite of the FF3.5 issue. All jobs run recently have lower error rates because our service continues to become more reliable as we fix bugs our users discover. These browsers&#8217; jobs were all run recently.</li>
</ul>
<h4>Fair browser fight!</h4>
<p>This is the same graph as above, with the unfairly advantaged or disadvantaged browsers removed</p>
<p style="text-align: center;"><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight_fair1.png"><img class="aligncenter size-full wp-image-4900" title="browserfight_fair" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight_fair1.png" alt="" width="610" height="350" /></a><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight_fair.png"><br />
</a><em>Error rates (percent) by browser and version</em>*<em></em></p>
<h4>Yeah, IE6 sucks</h4>
<p>If you’re tech savvy, most of these results aren’t very surprising.</p>
<ul>
<li>IE6 is one of the worst browsers. Each newer IE is slightly more stable but still not good.</li>
<li>Firefox is solid.</li>
<li>Google Chrome is the big winner overall. They force you to update to their newest version every session, so their error rate is an average across all their versions, but it’s still significantly better than even the newest versions of the other browsers.</li>
<li>Opera is fine.</li>
</ul>
<p>The shocker is Safari story. Safari 3 &#8211; the oldest version of safari &#8211; is extremely reliable. Safari 4 is a good deal above average. And then there’s Safari 5.</p>
<h4>The Safari 5 surprise</h4>
<p>Safari 5, the latest in browser technology from the most valuable company in the world, is by far the worst on the market. Go have another look at that number &#8211; it’s almost twice as bad as second-worst, the oft-maligned IE6. And that comparison is unfair to IE6. See, Safari 5 was released recently, like Opera 11, IE9, and FF5. Those are the browsers whose error rates were unfairly good. Like them, all Safari 5 jobs were run on our newer, ultra-stable OnDemand infrastructure. We should expect it to have an extremely *low* error rate, like they do, but instead its error rate is ten times worse.</p>
<p>At first we thought the high error rate could be the result of the fact that we always run Safari on Windows, while it&#8217;s made by Apple.  That&#8217;s easy to dismiss, because earlier versions of Safari were fine. Then we explored the possibility that the errors were caused by always running Safari 5 in proxy mode (for <a href="http://saucelabs.com/forums/viewtopic.php?id=100">arcane Selenium reasons</a>). So we looked at the average error rate for non-Safari jobs run in proxy mode, and it put things back into perspective.</p>
<h4>Proxy mode browser fight</h4>
<p style="text-align: center;"><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight_proxy.png"><img class="aligncenter size-full wp-image-4901" title="browserfight_proxy" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/browserfight_proxy.png" alt="" width="610" height="350" /></a><em>Error rates (percent) by browser and version</em>*</p>
<p style="text-align: left;">These are the error rates for browsers running in proxy mode (we don&#8217;t have enough data for Opera). Notice the new scale on the Y axis.</p>
<h4>Surprise! The worst browser wasn&#8217;t a surprise after all</h4>
<p style="text-align: left;">As you can see, Firefox actually seems to perform <em>better</em> in proxy mode, so we can&#8217;t say that proxy mode is always worse.  Chrome is unaffected. Safari 5 is still the worst Safari, but it&#8217;s no longer a huge outlier overall. IE7, the best IE in proxy mode, is on par with the worst Firefox, 3.6. IE8 is surprisingly much worse than IE7. And the king of being a bad browser, once again, is IE6. <strong>Hail to the king, baby</strong>.</p>
<p style="text-align: left;"><a href="http://saucelabs.com/blog/wp-content/uploads/2011/08/ash-williams-evil-dead-74400.jpg"><img class="aligncenter size-full wp-image-4902" title="ash-williams-evil-dead-74400" src="http://saucelabs.com/blog/wp-content/uploads/2011/08/ash-williams-evil-dead-74400.jpg" alt="" width="210" height="260" /></a></p>
<p>*<em>Percents are 1 &#8211; lower bound 95% confidence <a href="http://www.evanmiller.org/how-not-to-sort-by-average-rating.html">Wilson score</a> for success rate</em></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F08%2Fthe-surprising-worst-browser%2F&amp;title=The%20Surprising%20Worst%20Browser" id="wpa2a_8"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/08/the-surprising-worst-browser/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Lessons Learned: Migrating from Selenium 1 to Selenium 2</title>
		<link>http://saucelabs.com/blog/index.php/2011/07/migration-lessons/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/07/migration-lessons/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 17:00:55 +0000</pubDate>
		<dc:creator>Roger Hu</dc:creator>
				<category><![CDATA[Featured Posts]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Selenium Knowledge]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[selenium 2]]></category>
		<category><![CDATA[selenium tips]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=4568</guid>
		<description><![CDATA[This guest blog post was written by Roger Hu, Software Engineer at Hearsay Social. At Hearsay Social, we&#8217;ve upgraded our testing environment to use Selenium 2. We made the switch because there was enough evidence to suggest a huge 2-4x performance increase. Having learned a few lessons along the way, we thought it would be [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>This guest blog post was written by Roger Hu, Software Engineer at Hearsay Social.</em></strong></p>
<p>At <a href="http://www.hearsaysocial.com">Hearsay Social</a>, we&#8217;ve upgraded our testing environment to use <a href="http://seleniumhq.wordpress.com/2011/07/08/selenium-2-0/">Selenium 2</a>. We made the switch because there was enough evidence to suggest a huge 2-4x performance increase. Having learned a few lessons along the way, we thought it would be helpful to share what we found, especially for those who are considering making the transition.</p>
<ul>
<li>Since Selenium 2 is redesigned to leverage what works best for the browser, whether it&#8217;s a NPAPI plugin in Firefox or a DLL module for IE, we&#8217;ve discovered a huge performance gain, especially in Internet Explorer (IE) browsers that have much slower JavaScript engines. The new approach seems to allow us to run Selenium more conveniently on Internet Explorer browsers without the hassle of changing the security options because of all the exceptions that were thrown as a result of the older JavaScript-based architecture.</li>
<li>Selenium 2 gets closer to simulating the behavior of a user on a browser.  In Selenium 2, the DOM element that is actually clicked is determined by the X/Y coordinates of the mouse event. Therefore, if you attempt to search for a DOM element that is hidden or obstructed by another element, the top element will always be fired and you might encounter ElementNotVisibleException errors from the Selenium server. You need to keep this issue in mind when rewriting your tests, since Selenium 1 versions may not have had this restriction. (We use the Django web framework and the popular <a href="https://github.com/dcramer/django-debug-toolbar">django-debug-toolbar</a>, which adds a popup overlay in our web application that has to be <a href="http://hustoknow.blogspot.com/2011/05/selenium-2-and-django-toolbar.html">disabled</a> in our application during Selenium tests.)</li>
<li>We&#8217;ve found that the new Selenium 2 WebDriver-based API is easier to train our developers to use. The documentation for Selenium 2 is still somewhat sparse, especially for the updated Python bindings, so digging into the source code (in our case, <a href="http://www.google.com/codesearch#2tHw6m3DZzo/trunk/py/selenium/webdriver/remote/webdriver.py&amp;q=webdriver.py%20package:http://selenium%5C.googlecode%5C.com">remote/webdriver.py</a> and <a href="http://www.google.com/codesearch#2tHw6m3DZzo/trunk/py/selenium/webdriver/remote/webelement.py&amp;q=webelement.py%20package:http://selenium%5C.googlecode%5C.com&amp;type=cs">remote/webelement.py</a> code) is still the best way to learn what API commands are available. While Java developers may have access to <a href="http://seleniumhq.org/docs/03_webdriver.html">WebDriverBackedSelenium</a>class that can use existing Selenium 1 code while leveraging the WebDriver-based API, we didn&#8217;t find any similar support for Python. So we took the plunge and refactored most of our tests.
<p><em>webdriver/remote/webelement.py:</em></p>
<pre style="margin: 5px"> @property
    def tag_name(self):
        """Gets this element's tagName property."""
        return self._execute(Command.GET_ELEMENT_TAG_NAME)['value']

    @property
    def text(self):
        """Gets the text of the element."""
        return self._execute(Command.GET_ELEMENT_TEXT)['value']

    def click(self):
        """Clicks the element."""
        self._execute(Command.CLICK_ELEMENT)

    def submit(self):
        """Submits a form."""
        self._execute(Command.SUBMIT_ELEMENT)

    def clear(self):
        """Clears the text if it's a text entry element."""
        self._execute(Command.CLEAR_ELEMENT)</pre>
</li>
</ul>
<p>On the server-end, it&#8217;s important to study how the client API is sending remote commands by reviewing the <a href="http://code.google.com/p/selenium/wiki/JsonWireProtocol">JsonWireProtocol</a> document posted on the Selenium Wiki, especially since <strong><a href="http://www.saucelabs.com">Sauce Labs</a></strong> provides you with the raw logs to see what commands are actually being issued by the client.</p>
<p><img class="aligncenter size-full wp-image-4589" src="http://saucelabs.com/blog/wp-content/uploads/2011/07/json.png" alt="" width="992" height="405" /></p>
<ul>
<li>While experimenting with Selenium 2, we found it much easier to test out the new WebDriver API by downloading and running the Selenium server locally. This way, your connection won&#8217;t constantly timeout as a result of using your Sauce Labs account, giving you more freedom to experiment with all the various commands. If you need to run browser tests against an external site while using your own machine to drive the browser interactions, you can setup a <a href="http://hustoknow.blogspot.com/2010/10/using-selenium-tests-with-djangopython.html">reverse SSH tunnel </a>and then experiment with Selenium 2 API by setting debugger breakpoints and testing out the API bindings. In the long-term, though, you definitely want to use Sauce Labs for <a href="http://saucelabs.com/ondemand">hosting all the virtual machines in the cloud</a> for running your browser tests!</li>
<li>If you&#8217;re interested in using Firebug to help debug your application, Selenium 2 also provides a way to <a href="http://hustoknow.blogspot.com/2011/05/injecting-firebug-into-remote-firefox.html">inject Firefox profiles</a>. You can create a Firefox profile with this plug-in extension, and Selenium 2 includes an API that will base-64, zip-encode the profile that will be downloaded by the remote host. Note that this approach works best if you&#8217;re running the Selenium server locally, since using it over a Sauce Labs instance only gives you access to view the video.</li>
<li>Selenium 2 continues to be a moving target with its API, so you&#8217;ll want to keep up to date with any <a href="http://seleniumhq.wordpress.com/">release notes</a> posted on the <a href="http://seleniumhq.wordpress.com/">Selenium HQ blog</a>. Most recently, we found that the toggle() and select() commands have not only been deprecated but removed completely from the implementation. If you try to issue these commands, the Selenium server simply doesn&#8217;t recognize the commands and WebDriverExceptions are raised. The best thing to do is look at the Selenium version number. In this particular example, version 2.0.0 (three decimal places) are used to represent the release candidate of the latest Selenium build. You may also instantiate your .jar files with the -debug flag to watch how your client bindings execute API commands to the Selenium server.</li>
</ul>
<pre style="margin: 5px">20:38:02.687 INFO - Java: Sun Microsystems Inc. 20.1-b02
20:38:02.687 INFO - OS: Windows XP 5.1 x86
20:38:02.703 INFO - v2.0.0, with Core v2.0.0. Built from revision 12817</pre>
<ul>
<li>Selenium 1 users will find that is_text_present() and wait_for_condition() commands no longer exist, and are replaced by a more DOM-driven approach of selecting the element first before firing click() events or retrieving attribute values through get_attribute(). You no longer have to have wait_for_condition() for page loads. Instead, you set implicitly_wait() to a certain timeout limit to rely on find_element_by_id() to wait for the presence of DOM elements to appear to between page loads.</li>
<li>Lastly, we&#8217;ve noticed in the Selenium discussion groups that often there are questions about how to deal with concurrent Ajax requests during your tests.  In many test frameworks, there&#8217;s the concept of setup and tear down of the database between each set of tests.  One issue that we encountered is that if your browser is issuing multiple requests, you&#8217;re better off waiting for the Ajax requests to complete in your tear down function since the requests could arrive when the database is an unknown state. If this happens, then your Selenium tests will fail and you&#8217;re going to spend extra time trying to track down these race conditions. If you&#8217;re using jQuery, you can check the ajax.global state to determine whether to proceed between pages (i.e. execute_script(&#8220;return jQuery.active === 0&#8243;)). You&#8217;ll want to keep looping until this condition is satisfied (for an example of implementing your own wait_for_condition() command, click <a href="http://hustoknow.blogspot.com/2011/05/migrating-from-selenium-10-to-selenium.html">here.</a>)</li>
</ul>
<p>Hope you find these tips helpful for migrating over to Selenium 2. Happy testing!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F07%2Fmigration-lessons%2F&amp;title=Lessons%20Learned%3A%20Migrating%20from%20Selenium%201%20to%20Selenium%202" id="wpa2a_10"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/07/migration-lessons/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Bamboo Sauce Release (Version 1.3.1)</title>
		<link>http://saucelabs.com/blog/index.php/2011/06/new-bamboo-sauce-release-version-1-3-1/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/06/new-bamboo-sauce-release-version-1-3-1/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 23:45:39 +0000</pubDate>
		<dc:creator>Jason Smiley</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Sauce Offerings]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=4343</guid>
		<description><![CDATA[Last summer, we introduced the Bamboo Sauce plugin at Atlas Camp, making it push-button simple for Bamboo users to run their Selenium tests on the Sauce OnDemand cloud. This post outlines enhancements to Bamboo Sauce to brings all the advances in Sauce OnDemand to the growing Bamboo community. We&#8217;ve made a few enhancements to the [...]]]></description>
			<content:encoded><![CDATA[<p><em>Last summer, we introduced the Bamboo Sauce plugin at Atlas Camp, making it push-button simple for Bamboo users to run their Selenium tests on the Sauce OnDemand cloud.  This post outlines enhancements to Bamboo Sauce to brings all the advances in Sauce OnDemand to the growing Bamboo community. </em></p>
<p>We&#8217;ve made a few enhancements to the <a href="http://www.atlassian.com/software/bamboo">Atlassian Bamboo</a> Sauce OnDemand plugin over the last couple of weeks.  The <a href="https://plugins.atlassian.com/plugin/details/30134">plugin</a> allows you to set the Selenium configuration (eg. browser/operating system/etc) at the Bamboo build configuration level, making it a painless exercise to run your integration tests against a variety of different browsers using Sauce OnDemand without having to make coding changes.</p>
<p><strong>Selenium 2 Support<br />
</strong>The Bamboo Sauce OnDemand plugin now supports Selenium v1 or Selenium v2.  If Selenium v2 support is selected, the plugin will set some additional environment variables that reference the selected Selenium configuration which can be used as part of your tests, eg.</p>
<pre class="brush:java">String seleniumUrl = System.getenv("SELENIUM_URL");
String browser = System.getenv("SELENIUM_BROWSER");
String version = System.getenv("SELENIUM_VERSION");
String platform = System.getenv("SELENIUM_PLATFORM");
DesiredCapabilities capabilities = new DesiredCapabilities(browser, version, platform);
capabilities.setCapability("name", "Your Selenium 2 Test");
WebDriver driver = new RemoteWebDriver(new URL(seleniumUrl),capabilities);</pre>
<p><strong>Sauce Job Results in Bamboo UI<br />
</strong>The Bamboo Sauce OnDemand plugin now supports embedding the Sauce Job information with the Bamboo user interface.</p>
<p>In order for the Job results to appear in the Bamboo UI, Sauce OnDemand needs to be told what the Bamboo build number is.  The easiest way to do this is to use the selenium-client-factory to set the build number by running the following:</p>
<pre class="brush:java">Selenium selenium = SeleniumFactory.create();
//cast the Selenium instance to SauceOnDemandSelenium
SauceOnDemandSelenium sauce = (SauceOnDemandSelenium) selenium;
//set the build number
sauce.setBuildNumber(System.getenv("BAMBOO_BUILDNUMBER"));</pre>
<p>If you&#8217;re not using the selenium-client-factory, you can configure your tests to tell Sauce OnDemand the Bamboo build number by invoking the <a href="http://saucelabs.com/docs/saucerest">Sauce REST API</a>.</p>
<p><strong>Selenium-Client-Factory Usage Notes</strong><br />
We have also updated the <a href="http://maven.jenkins-ci.org:8081/content/repositories/releases/com/saucelabs/selenium/sauce-ondemand-driver/2.0/sauce-ondemand-driver-2.0-jar-with-dependencies.jar">selenium-client-factory</a> library which makes running your Selenium tests run against either a local Selenium server or Sauce OnDemand a cinch.</p>
<p>Selenium example:</p>
<pre class="brush:java">Selenium selenium = SeleniumFactory.create();</pre>
<p>WebDriver example:</p>
<pre class="brush:java">WebDriver selenium = SeleniumFactory.createWebDriver();</pre>
<p>Instantiating your Selenium tests using the above mechanism will automatically use the configuration items specified on the Bamboo plan.  That is, you won&#8217;t need to explicitly reference the environment variables that Bamboo sets &#8211; they will be used by the factory logic.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F06%2Fnew-bamboo-sauce-release-version-1-3-1%2F&amp;title=New%20Bamboo%20Sauce%20Release%20%28Version%201.3.1%29" id="wpa2a_12"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/06/new-bamboo-sauce-release-version-1-3-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Full-on Cloud Dev with Turnkey Integration Testing</title>
		<link>http://saucelabs.com/blog/index.php/2011/06/full-on-cloud-dev-with-turnkey-integration-testing/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/06/full-on-cloud-dev-with-turnkey-integration-testing/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 16:01:13 +0000</pubDate>
		<dc:creator>John Dunham</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=4320</guid>
		<description><![CDATA[Three key software trends motivated us to form Sauce Labs: The rise of agile practice The domination of open source in the development and deployment process The rise of PaaS Those three flows suggested that mainstream approaches to software were in for major change and we wanted to help with that.  On the rise of [...]]]></description>
			<content:encoded><![CDATA[<p>Three key software trends motivated us to form Sauce Labs:</p>
<ul>
<li>The rise of agile practice</li>
<li>The domination of open source in the development and deployment process</li>
<li>The rise of PaaS</li>
</ul>
<p>Those three flows suggested that mainstream approaches to software were in for major change and we wanted to help with that.  On the rise of PaaS, we asked ourselves “if we move all our dev tools to the cloud, how are users going to test that stuff?&#8221;  &#8221;With machines under their desk?”  “No, we don’t think so” we answered ourselves.</p>
<p>And so today is a red-letter day at Sauce Labs.  We proudly stand beside CloudBees supporting their newly announced  <a href="http://cloudbees.com/platform-ecosystem.cb">CloudBees Ecosystem</a>.  CloudBees shares our vision that manual and automated integration testing must be an integral part of any cloud development system.  We believe in their vision that as the line between development and operations continues to blur, and deployment is in the cloud, the full development process must therefore live in the cloud.</p>
<p>Paraphrasing <a href="http://en.wikipedia.org/wiki/Damon_Runyon">Damon Runyon</a>, the race is not always to the swift, but that’s where the smart money is.  The software teams that deliver new value to customers the fastest are the ones most likely to win.  Embracing a thoughtful balance of automated and manual testing, dev teams take on appropriate levels of risk as they accelerate deploying new features and value to their users.  By inviting Sauce Labs to participate in their Ecosystem, CloudBees showed their keen understanding of this, and their view of the puzzle pieces necessary to make seamless dev-to-deploy in the cloud the game-changer it&#8217;s destined to be.</p>
<p>So, right on, CloudBees.  Congrats on your launch!</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F06%2Ffull-on-cloud-dev-with-turnkey-integration-testing%2F&amp;title=Full-on%20Cloud%20Dev%20with%20Turnkey%20Integration%20Testing" id="wpa2a_14"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/06/full-on-cloud-dev-with-turnkey-integration-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sauce Scout supports JIRA</title>
		<link>http://saucelabs.com/blog/index.php/2011/06/sauce-scout-supports-jira/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/06/sauce-scout-supports-jira/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 20:00:46 +0000</pubDate>
		<dc:creator>The Sauce Labs Team</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=4234</guid>
		<description><![CDATA[At Sauce Labs, we believe a video is worth 10,000 words. You should watch below to learn about our new Sauce Scout + JIRA integration. *with apologies to our friends at Atlassian for the missing &#8220;s&#8221; in the demo]]></description>
			<content:encoded><![CDATA[<p>At Sauce Labs, we believe a video is worth 10,000 words.  You should watch below to learn about our new Sauce Scout + JIRA integration.</p>
<p><iframe width="570" height="465" src="http://www.youtube.com/embed/yeXH8E7ptMk" frameborder="0" allowfullscreen></iframe></p>
<p><small>*with apologies to our friends at Atlassian for the missing &#8220;s&#8221; in the demo</small></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F06%2Fsauce-scout-supports-jira%2F&amp;title=Sauce%20Scout%20supports%20JIRA" id="wpa2a_16"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/06/sauce-scout-supports-jira/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We’ve been watching you (and we have graphs)</title>
		<link>http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 12:46:58 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=4145</guid>
		<description><![CDATA[Lots of teams run tests with Sauce, and we&#8217;ve been collecting data on them. Who doesn&#8217;t like data diving? Not us. We love it. So, like with any data dive, we have started to notice some patterns with the way people run their tests. Here, okcupid-style, are all the things we know about you just [...]]]></description>
			<content:encoded><![CDATA[<p>Lots of teams run tests with Sauce, and we&#8217;ve been collecting data on them. Who doesn&#8217;t like data diving? Not us. We love it. So, like with any data dive, we have started to notice some patterns with the way people run their tests. Here, okcupid-style, are all the things we know about you just from how many minutes you use testing and when. The graphs you&#8217;ll see are minutes used by day for each day in an example customer&#8217;s tenure at Sauce, starting with day 0 as the first day they ran a test with us. We&#8217;ve broken them down by archetype. These are all actual customer data being shown to the world for the first time, but the names have been removed to protect the innocent (which is us (from lawsuits)).</p>
<hr />
<p><strong>The Addict</strong><br />
<a rel="attachment wp-att-4149" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/rampup/"><img class="alignleft size-full wp-image-4149" title="rampup" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/rampup.png" alt="" width="600" height="305" /></a>These are scatter plots that increase over time. They represent on-demand use  by everyone in a company as it either gets adopted by more people in  the company or as more tests get added to the build. The average minutes per day seen in rampups has great range, from 25 per day to 5000. Larger companies tend to fall into this category, as their dev infrastructure slowly  switches over to using us. The ones that run many tests usually have  high degrees of parallelism, from 20 to 50 tests at a time. They  sometimes start out never parallelizing and then one day start running  all their tests in parallel, and when they do that, their usage tends to  increase more sharply in the immediatly following days.   They tend to be companies that aren’t software-as-a-service, like a travel agency, a sports site, a hospital finder, or a business intelligence consulting agency.</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Agile Shop</strong><br />
<a rel="attachment wp-att-4150" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/scatter/"><img class="alignleft size-full wp-image-4150" title="scatter" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/scatter.png" alt="" width="600" height="305" /></a> Yes, I said &#8220;agile,&#8221; and I realize it cost me 20 hipster points. These  are the folks who, after a brief warmup period, start using us random  amounts within a somewhat fixed range. These tend to be on the high  usage side, averaging 1000 to 3000 minutes per day, and with high  parallelism, topping out between 60 and 100 tests in parallel. They increase their use slowly over time, but it’s hard to tell with all the  noise and the high volume. They’re companies that enter the game with a  lot of their own in-house selenium tests that they switch over to using  Sauce, usually a software-as-service model, like an online gaming site  or ecommerce. This category of companies also includes ones that use us as a  platform and sell a service that leverages ours.</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Daily Builder</strong><br />
<a rel="attachment wp-att-4146" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/dailybuild/"><img class="alignleft size-full wp-image-4146" title="dailybuild" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/dailybuild.png" alt="" width="600" height="305" /></a>These  are characterized by flat lines of dots that indicate the same number  of minutes being used each day. The number of minutes jiggles as latency  affects the total nuber of tests, and on some days, possibly when a  build fails and has to be restarted, the line jumps up.  The line  sometimes changes height when the company decides to run more or fewer  tests in its daily build, or to change which browsers they run their  tests in. The total number of minutes used in a dailybuild is usually  not very much &#8211; between 80 and 200, with varied parallelism. Some don’t  parallelize at all, while some get up to 25 or 30 tests in parallel.  They tend to be very plugged-in companies in the tech community, like  social media startups or very famous tech companies who won’t let us mention them by name. In this example, the customer ran one test 140 days before they really adopted us, and I removed it from the graph as an outlier; that&#8217;s why the day axis starts at 140 instead of at 0. This company is on the extreme low end of usage for a daily builder, but is the best example of a very-flat line.</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Zombie</strong><br />
<a rel="attachment wp-att-4153" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/dead/"><img class="alignleft size-full wp-image-4153" title="dead" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/dead.png" alt="" width="566" height="279" /></a>These  are users who signed up and paid for a subscription but never ran any  tests. They pay us anyway. Maybe they plan to adopt us soon! There are not many of these and they don’t have much in common. Their graphs are boring, so we plan to send them all a nice note saying we&#8217;re canceling their subscriptions and they can re-enter their credit card when they&#8217;re ready to provide more entertaining graphs.</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Abandoner</strong><br />
<a rel="attachment wp-att-4154" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/quitter/"><img class="alignleft size-full wp-image-4154" title="quitter" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/quitter.png" alt="" width="600" height="305" /></a>These  are users who ran few minutes for a little while, with no parallelism,  and then left. If you are one of these, you are a scarce resource and we  want to hear from you! <a href="mailto:help@saucelabs.com">Please tell us</a> why you left. We want to fix it.</p>
<p>For this graph I&#8217;ve added a day of 0 minutes where today would be, to make the graph wider. All the other graphs end at today.</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Contractor</strong><br />
<a rel="attachment wp-att-4155" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/contractor/"><img class="alignleft size-full wp-image-4155" title="contractor" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/contractor.png" alt="" width="600" height="305" /></a> These  guys run lots of tests with huge gaps in between testing cycles. Note the vertical gaps in the graph around days 30, 120, 180, and 300. Some  of them are companies that are obviously consultants and some aren’t. We  think they’re using us to test the webpages they’re building for  someone else while they have a contract. There aren’t enough of them to  generalize the number of tests they run or how parallel they get.  They’re usually design agencies.</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Boomerang</strong><br />
<a rel="attachment wp-att-4156" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/gap/"><img class="alignleft size-full wp-image-4156" title="gap" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/gap.png" alt="" width="600" height="305" /></a>These  are guys who used us for a little while, left for many days, and then  came back in force. They were probably people with some weird dev  infrastructure that took work to integrate us. They might have done  an exploratory sprint to see how we worked without integrating us into  anything, then had to drop us for a while before they could invest the time to integrate. If you are one of these, we’re sorry we were hard to adopt. <a href="mailto:help@saucelabs.com">Please tell us</a> what the difficulty was so we can smooth it out!</p>
<p>&nbsp;</p>
<hr />
<p><strong>The Test Czar</strong><br />
<a rel="attachment wp-att-4157" href="http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/czar/"><img class="alignleft size-full wp-image-4157" title="czar" src="http://saucelabs.com/blog/wp-content/uploads/2011/06/czar.png" alt="" width="600" height="305" /></a>These  are characterized by dots that seem to form dotted lines, not scatter  plots. Unlike the daily-build companies, these have sloped lines, not  flat lines. Our best guess is that they also have a daily build, but  have some person or group who manually curates which tests are run in  the build, with the job of keeping build times down. This would explain  why the build seems to spike up and then hold flat for a while before  linearly decreasing over a few days as they prune or tune tests. They  top out at around 200 minutes per day, and they don’t run many tests in  parallel. There are very few of these, and their verticals aren’t  similar; a fashion company, a major university, etc. These appear to be a  fluke of internal management decisions.</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F06%2Fwe%25e2%2580%2599ve-been-watching-you-and-we-have-graphs%2F&amp;title=We%E2%80%99ve%20been%20watching%20you%20%28and%20we%20have%20graphs%29" id="wpa2a_18"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/06/we%e2%80%99ve-been-watching-you-and-we-have-graphs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Test::Right: Browser testing done right</title>
		<link>http://saucelabs.com/blog/index.php/2011/05/testright-browser-testing-done-right/</link>
		<comments>http://saucelabs.com/blog/index.php/2011/05/testright-browser-testing-done-right/#comments</comments>
		<pubDate>Thu, 05 May 2011 16:33:20 +0000</pubDate>
		<dc:creator>Steven Hazel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://saucelabs.com/blog/?p=3721</guid>
		<description><![CDATA[Okay, honesty time: browser testing sucks. It&#8217;s stuck in the stone age. Browser tests are great when they&#8217;re working well, but they&#8217;re way too hard to get right, way too expensive to maintain, and just overall not a lot of fun. That&#8217;s because existing tools lead us to build brittle, sequential tests that can be [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, honesty time: browser testing sucks. It&#8217;s stuck in the stone age. Browser tests are great when they&#8217;re working well, but they&#8217;re way too hard to get right, way too expensive to maintain, and just overall not a lot of fun. That&#8217;s because existing tools lead us to build brittle, sequential tests that can be clobbered by tiny application tweaks. What starts as straightforward test creation ends up with data, actions, and selectors thrown together in a big mess. We paper over the mess with abstractions like Cucumber and Capybara, but we haven&#8217;t addressed the fundamental issues.</p>
<p>We&#8217;re the cavemen of browser tests.</p>
<p>Fundamentally, these are the problems with browser tests as they&#8217;re written today:</p>
<ul>
<li><strong>Getting started is hard.</strong> It&#8217;s important to structure your tests in a way that will work out well long-term, but guidance is scarce.</li>
<li><strong>Browser tests are brittle.</strong> Small changes in the DOM, in application performance, or in other tests often generate a lot of menial labor to repair tests.  A single DOM change in your application can easily cascade into hundreds of broken tests — and cost staff days to fix them.</li>
<li><strong>Browser tests are slow.</strong> The solution is to run many tests in parallel, but current testing frameworks lead us to write tests that don&#8217;t parallelize well.</li>
</ul>
<p>All this makes writing and maintaining tests an expensive, and more importantly <em>unpleasant</em> activity.</p>
<p>We can do better. It&#8217;s time for a new way. As an industry, we know how to do this a lot better than we&#8217;re managing to in most cases.  It&#8217;s time to <strong>accept a standard</strong>, move on, and <em>get things done</em>.</p>
<p><strong><a href="http://github.com/saucelabs/test_right">Test::Right</a> aims to be that standard.</strong></p>
<p>The ultimate goal of Test::Right is to make it <em>impossible</em> to write bad tests. That&#8217;s right, read it again. <em>Impossible</em> to write bad tests. That&#8217;s a serious goal, but we&#8217;re serious about it.</p>
<p><strong>Are we there yet? No.</strong> But we&#8217;re a whole hell of a lot closer than anything popular out there today.</p>
<p>Our philosophy in creating Test::Right is to directly address the problems with browser testing from the start:</p>
<ul>
<li>To make it easy to get started, test authors need an <strong>opinionated framework</strong> that chooses a thoughtful structure for tests based on our extensive experience working with large test suites.</li>
<li>To make browser tests less brittle, we have <strong>decoupled intentions from mechanics</strong>. Stable intentions like &#8220;log in&#8221; and &#8220;check account status&#8221; are disentangled from volatile mechanisms like &#8220;click the DOM element identified by this CSS selector&#8221;.  We isolate the parts of tests that change frequently in a single place instead of scattering and duplicating them throughout tests, making tests robust and maintenance easy.</li>
<li>To make browser test suites run faster, we <strong>parallelize your tests from day one</strong>.  Your builds will always be fast, and because every build checks that your tests run in parallel, you&#8217;ll never develop performance problems that will bite you later.</li>
</ul>
<p>Test::Right is an idea whose time has come, born of dozens of on-site integrations of our service in household-name companies and some not-so-household name places. We as a small team have seen more browser test badness than any sane person should have to, and the tools are at fault.  Test::Right is designed to address the mainstream case we&#8217;ve had the privilege to experience over the past 16 months.</p>
<p>We&#8217;re releasing it as a work in progress, but it already has a ton of useful functionality.  We&#8217;ve put a stake in the ground with a whole slew of opinions that are sure to get a discussion started. And that&#8217;s really where we need you.</p>
<p>We built Test::Right by borrowing concepts from the Page Object model, but went even further by enforcing clean separation of concerns.  With Test::Right, your test cases are defined in terms of actions and properties on widgets. A widget is a piece of functionality present on one or more pages of your application. A single page can have many widgets, and multiple copies of a widget may appear on the same page. Tests are grouped by feature, and tests don&#8217;t have direct access to the underlying Selenium object.  </p>
<ul>
<li><strong>Widgets</strong> bring the Page Object concept into the Ajax age and decouple tests from DOM, making it far easier to adapt to frontend tweaks.  They give your tests an application-specific vocabulary that maps directly to what users do with your app, and let tests make assertions about high-level aspects of your app, instead of low-level DOM state.</li>
<li><strong>Automatic <a href="http://saucelabs.com/blog/index.php/2011/04/how-to-lose-races-and-win-at-selenium/">spin asserts</a></strong> ensure that your assertions work as you expect them to, even with Ajax.</li>
<li><strong>Out-of-the-box parallelization</strong> gives you speed and scalability from day one.</li>
<li><strong>Random test ordering</strong> prevents you from writing bad tests that serially build up state, depend heavily on one another, and can&#8217;t be parallelized.</li>
<li><strong>Data factory</strong> generates isolated test data so that tests don&#8217;t clobber each other.</li>
</ul>
<p>Test::Right is in Ruby because it seemed like a good place to start.  We believe these ideas make as much sense in any other language.  </p>
<p>Whether or not you use Test::Right, we want you to come away from it with ideas and opinions. The browser testing community needs to wake up and start writing good tests, and with Test::Right we&#8217;re going to make that happen.</p>
<p>And I, personally, look forward to hashing out the future of browser automation with you.</p>
<p>Check out the <a href="http://github.com/saucelabs/test_right">Test::Right source code</a> on GitHub to get started.  Let us know what you think, and enjoy!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsaucelabs.com%2Fblog%2Findex.php%2F2011%2F05%2Ftestright-browser-testing-done-right%2F&amp;title=Test%3A%3ARight%3A%20Browser%20testing%20done%20right" id="wpa2a_20"><img src="http://saucelabs.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://saucelabs.com/blog/index.php/2011/05/testright-browser-testing-done-right/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

