The Over-Exaggerated Death of Flex and Flash

July 20th, 2010 by Jason Huggins

The war between Adobe’s Flash and Apple’s support for HTML5 continues to heat up. The first set of battles between Apple and Adobe have reached a standstill for the moment. Adobe is pushing Flash for Android (which is awesome, on my new Google Nexus One, by the way). Meanwhile, the Apple-backed SproutCore project makes HTML5 a viable platform for developers to adopt today.

In spite of the Apple marketing machine, we’re betting that Flex and Flash still have their parts to play in the future of the web. After all, how can we just forget about the massive installed base? Flash is now on 98 percent of computers. More importantly, Flex and Flash have comprehensive tool sets that developers still need. Flash is the single browser plug-in that provides consistency for a chaotic and scattered web world. There are things that HTML and Javascript can’t do well, like webcam capture, media-streaming, and full-screen video. And let’s not forget — a huge segment of the web is gaming, which wouldn’t be possible (so far) without Flash. As YouTube recently noted: “While HTML5’s video support enables us to bring most of the content and features of YouTube to computers and other devices that don’t support Flash Player, it does not yet meet all of our needs.” Should we just abandon everything that we’ve known for HTML5 because it is new and exciting?

I’ll admit that even I have drunk the Apple Kool-Aid and see HTML5 for its role in the future of the web. Sauce specializes in cross-browser web app testing and HTML5 is easier to integrate with Selenium. However, the web is bigger than HTML and JavaScript. HTML5 is the future, but we live in the now. Though growing, HTML5 does not yet have the adoption that Flex and Flash have.

It’s this installed base that Sauce Labs is committing to with our announcement of the Sauce Flash-Flex Testing System.

The newest Selenium-based solution, the Sauce Flash-Flex Testing System provides testing of Flex applications on the Flash platform. Other tools in the marketplace can only test Flex applications, but the Sauce Flash-Flex Testing System covers the entire Flash platform. While Flex is a great tool for many developers, the two biggest markets on the web — gaming and advertising — are based on Flash, not Flex.

So, while we’re all excited for HTML5, rumors of Flash’s death are greatly exaggerated. Demand for Flash wont die. To a lot of people, Adobe may seem like yesterday’s news. But since not everyone has an iPad or an iPhone, the answer is still Flash and Flex, even if it’s not the new hotness.

To this strong base of Flex and Flash users: try out our Sauce Flash-Flex Testing System and give us your feedback.

Share

Library for Hudson Sauce OnDemand PlugIn

July 19th, 2010 by Ashley Wilson

By Kohsuke Kawaguchi

As promised in my earlier post, today I’ll talk about the library that does the heavy-lifting for the Hudson Sauce OnDemand plugin. This library is called Sauce REST API, and defines a Java API to access Sauce OnDemand REST API. It’s built by Maven, and deployed to java.net Maven2 repository.

The library is capable of basic CRUD (create, read, update, and delete) operations over SSH tunnels. To use this library, you create a SauceTunnelFactory instance, then use the CRUD methods defined on it.

For example, to set up a tunnel and tear it down, do as follows:

SauceTunnelFactory tunnelFactory = new SauceTunnelFactory();

// create a new tunnel for the intranet host foo.corp.infradna.com
// wait until the tunnel is ready
SauceTunnel t = tunnelFactory.create("foo.corp.infradna.com");
t.waitUntilRunning(30000);
assertTrue(t.isRunning());

// reverse port forwarding so that foo.corp.infradna.com:80
// will come to localhost:80
t.connect(80,"localhost",80);

// do something with the tunnel
...

// destroy the tunnel (and all port forwardings that go with it)
t.destroy();

You can also list the current active tunnels, if you’d like to.
This lists all the tunnels that belong to your account, not just the ones
created by the current process:

for (SauceTunnel t : tunnelFactory.list()) {
    System.out.println(t.getCreationTime()+" "+t.isRunning());
}

In these examples, you see I didn’t pass in the user name and API key explicitly. This is because the library reads the credential from a property file at ~/.sauce-ondemand, which should look like this:

username=kohsuke
key=12345678-abcd-cdef-1234-1234567890ab

This encourages all the applications that use this library to share the same credential source, which is more convenient for users. Of course, if your application wants to control the credential in its own way, you can use a different overloaded version of the SauceTunnelFactory constructor to pass it in explicitly.

The Maven-generated documentation and javadoc are also available.

Kohsuke Kawaguchi, the creator of Hudson, wrote the majority of Hudson’s core single-handedly. He is a founder of InfraDNA, which provides products, services, and support for Hudson.

Share

Bromine + Sauce Labs: One Big Happy Integration

July 13th, 2010 by Ashley Wilson

The good people behind Bromine, an open-source QA tool that allows you to easily run and view your Selenium RC tests, recently created a Sauce Labs integration. This means you can now run your Bromine tests with Sauce Labs’ in-the-cloud service, Sauce OnDemand, with the added bonus of having a jobs queue AND video playback. Exciting news for all!

Check out the demo below, and download Bromine here to start using it with Sauce OnDemand today.

Share

Kohsuke Kawaguchi Announces New Hudson PlugIn for Sauce OnDemand

July 6th, 2010 by Ashley Wilson

By Kohsuke Kawaguchi

There has always been some overlap between Hudson users and Selenium users. As a result, the support for Selenium in Hudson, such as the Selenium Grid plugin, has generally been good. But while this Selenium Grid support, for example, does make it easier for you to run cross-platform, cross-browser tests, setting up the right OS/browser combinations, especially in the environment that doesn’t use virtualization, can be tedious.

This is where Sauce OnDemand comes into play. Sauce OnDemand solves this problem by offering browsers running in the cloud. But these browsers need to be able to talk to the web server being tested, which is most likely inside a firewall. Although Sauce OnDemand offers a SSH port forwarding option to handle this, setting up and and then tearing them down (or keeping them going all the time) is time consuming, especially when you are running your tests on a CI server that spans across multiple computers.

I wrote the new “Sauce OnDemand” plugin to fix this problem. With this plugin, Hudson will set up and tear down tunnels automatically for you.

Usage

Once you install a plugin from Hudson’s update center, go to the system configuration and specify your Sauce OnDemand credential:

Then, for each job that uses Sauce OnDemand, tell Hudson to set up SSH tunnels before the build. Hudson will tear them down at the end of the build.

Your projects don’t need anything in their build scripts to do this, which saves a lot of time if you have multiple projects/modules that use Sauce OnDemand. This also avoids the complexity of maintaining a persistent connection, which has its own complications. SSH tunnels on Sauce OnDemand starts very quickly, normally about 10 seconds, so the impact of this to the total build time is minimal.

Host name auto-allocation

Once you start using Sauce OnDemand extensively in Hudson, you’ll notice one problem. Normally you hard-code the host name that browsers connect to (which points to the cloud side of the tunnel and then forwards it back into your intranet to your webapp), but if you do that, you won’t be able to run such tests concurrently on Hudson, since the tunnel setting is global to your account.

In other words, imagine hard-coding your test to send HTTP requests to “example.org”, and you have two active branches of that project in development now. If the builds of those branches happen to run at the same time, their tunnel setup collides!

In the Hudson plugin, I added a mechanism to let Hudson auto-generate a unique host name when it sets up a tunnel. To do this, specify “AUTO” where you normally specify the domain name (“example.org” in the above example). Hudson will generate a random host name and make that host name available as the environment variable named SAUCE_ONDEMAND_HOST.

Your test should then look up this value and pass it to Selenium when you connect to it.

Under the hood

The implementation of this is done in two parts. First I wrote a library that performs SSH tunnel setup and tear down, and then I wrote a Hudson plug-in around it. The former is reusable on its own, and would be useful if you want to take the same idea and apply it elsewhere other than Hudson. My next post will talk more about this library, so stay tuned!

Kohsuke Kawaguchi, the creator of Hudson, wrote the majority of Hudson’s core single-handedly. He is a founder of InfraDNA, which provides products, services, and support for Hudson.

Share

Setting up Cucumber + Webrat + Selenium

June 15th, 2010 by The Sauce Labs Team

There’s quite a bit of information out there on getting these disparate tools to work together, but a great deal of it is out of date. To clear things up a bit, I’ve documented all the gems and modifications necessary to get these pieces of open source software up and running together. As time goes on, I’ll be expanding this blog post with notes about the pitfalls and various platform issues that may be discovered (I’m looking at you, Snow Leopard), but this should get most people up and running right away.

This is all using a clean REE environment via the poorly named but wonderfully written rvm, or Ruby Version Manager.

Gems you’ll need:

gem install actionmailer actionpack activerecord activeresource activesupport builder cgi_multipart_eof_fix cucumber cucumber-rails daemons database_cleaner diff-lcs fastthread gem_plugin gherkin json json_pure mime-types mongrel net-ssh net-ssh-gateway nokogiri rack rack-test rails rake rdoc rest-client rspec rspec-rails Selenium selenium-client sqlite3-ruby term-ansicolor trollop webrat

Some of those are not strictly necessary, but simply nice to have, while others solved some unexpected problems with the bare necessities. I’ll prune this list as feedback comes in from people’s experiences.

Points to watch out for:
Nokogiri: This was easily the worst on my Snow Leopard machine. It relies on the native libxml2, which had problems with 32/64 bit compatibility. No matter what I tried, errors kept coming up. I had to clean everything out with my MacPorts installation and force a universal installation.
Webrat: The Selenium server jar that was included by default caused no end of headaches. I had to manually go in to the directory, remove the default server jar, and download the newest version from the seleniumhq download page.

Once those are set up, you should be able to use Cucumber, Webrat, and Selenium together without too much headache. Then you can refer to our webinar video (which will be posted to the blog later this week) to learn how to use Cucumber to easily run Webrat and Selenium.

Share

Selenium IDE 1.0.7 is released!

May 27th, 2010 by Adam Goucher

Two months after 1.0.6 was released, Selenium IDE 1.0.7 is now available for general release.

If you are using version 1.0.4 or older, you will want to download Selenium IDE 1.0.7 now. For newer version users, the 1.0.7 update will be pushed to you the next time Firefox checks for plugin updates. (You can force this by clicking Tools, Add-ons, Find Updates in Firefox.)

By far the most exciting new feature is the ability to drag-and-drop within the Selenese editor. No longer do you have to cut your command, insert a new row, reinsert it because you forgot whether it goes above or below, then paste. Now you just move the click on the command and move it to where you want it. Same thing for ordering your tests in the suite. A big thanks to Jérémy Hérault for that feature.

Other than that, there was a slight tweak to the plugin API and localization into Swedish.

So a small release in terms of features, but an exciting one.

To see the full release notes and who contributed what, visit the Google Code wiki. Also on the Google Code site is the Issue Tracker for any problems you find. (Just make sure you tag them as ide.)

Share

Announcing the Sauce Labs iPad Selenium Contest Winner

May 4th, 2010 by Jason Huggins

On April 1st, Sauce Labs kicked off a contest, awarding an iPad to “the person proposing the most creative, useful, and ethical use of Selenium for something besides website testing”

Today, we’re happy to annouce Chris McMahon as the winner of the contest. Here’s an excerpt of Chris’ idea:

I live in a small town with very few tech jobs, so I am a dedicated telecommuter. One of the best sources of telecommuting jobs is Craigslist. Unfortunately, Craigslist does not allow a global search, and requires users to search state by state and town by town, which is incredibly tedious…
… So here it is: 30 lines of Ruby/Selenium2.0 to do a global search of Craigslist for telecommuting QA job listings, for every town in every state.

We picked Chris McMahon’s idea because:

  1. It’s a useful and practical idea, and more importantly, it worked! According to Chris: “The script landed me one job and several job interviews in two separate job searches.”
  2. Though it wasn’t a requirement of the contest, what differentiated his idea amongst the many other great submissions was working code and a job offer to go along with the idea. And as they say, “One test is worth a thousand expert opinions”.

However, the other requirement for our contest was the idea also had to be ethical. Here things get a bit controversial. Using “automated means” to script violates Craigslist’s terms of use prohibition to “use automated means,” Craigslist previously enforced in high-visibility cases such as crgslst and craigslittlebuddy. which involved (quasi-innocent to abusive) spamming of honest advertisers.

However in this case, Chris proposes an honorable use case that technically violates the Craigslist TOS.  But telecommuting jobs are by nature city-agnostic.  Since this represents multi-city search use case clearly serves the public-good, we’re confident that a request for “permission” per the Craigslist TOS policy would be approved.

So, Chris, enjoy your new iPad. But as you’re testing it out, please send an email to Craig Newmark and ask for permission to keep using your Selenium script. We wouldn’t be surprised if you already have a Selenium script for that, too. :-)

Here’s a video of the iPad contest winner in action:

In addition to Chris, there were a number of really excellent entries.  The runner-up awards of 1000 cpu test minutes on the Sauce OnDemand service go to Thomas Market and Cecilia for their excellent entries:

Thomas Market:  In the modern age, computers have solved many of mankind’s problems by automating tasks that are prone to human error. Many of the remaining unsolved problems in several fields, including mathematics, science, and medicine, can be closely approximated through intensive computation. In particular, problems that involve a complete search of a well-defined solution space, such as protein folding, are well suited to computational methods. With the recent Javascript performance optimizations in several browsers, I propose implementing a client-side web application that can search for solutions and run simulations for many outstanding problems, such as identifying optimal protein structures, modeling the threats of near-Earth asteroids, and exploring the effects of climate change. We can then leverage Selenium to run these distributed browser instances in parallel to maximize computational throughput.

Cecilia: I could use the Sauce OnDemand services to become a Computational Cluster on Demand service. There are many people using the MapReduce approach to process large data sets.

Congratulations Cecilia and Thomas!  Go ahead and create your account on saucelabs.com then email us at help[at—sign]saucelabs.com and we’ll populate your account with 1000 test minutes.

Share

Are Desktop Applications Dying?

May 4th, 2010 by Jason Huggins

ZDNet Blogger John Carrol posted a blog last week titled “Everybody hates browser applications” that has started a lively discussion. I feel that “everybody” certainly does not hate browser applications. In fact, I feel just the opposite. That is, despite the resistance, desktop applications are dying.

Browser applications are ‘good enough’ compared to their desktop equivalents and are getting better all the time. And even then, it doesn’t matter if everyone hates browser applications, they’re going to be using browser applications anyway because they’re easier for developers to write and distribute. Everyone’s a critic, but it’s the developers who dictate which technology gets used to create apps.

Example #1 how browser applications are ‘good enough’ compared to their desktop equivalents

At the recent JSConf I attended, I saw a demo of the new iPad support in SproutCore (the JavaScript framework that Apple uses for its MobileMe online web applications.) The iPad team worked with the SproutCore team to provide native hardware acceleration to the JavaScript layer and made the web applications just as fast and native looking as their native siblings written in Objective-C.

Example #2 how browser applications are ‘good enough’ compared to their desktop equivalents

One of the more famous iPad apps is the NPR app, a native Objective-C iPad that launched at the same time as the iPad. At JSConf, a JavaScript-only SproutCore version of the NPR app was written in a few days, and actually was faster than the native equivalent. The JavaScript/web version was ‘better’ than the native version.”

So consider this – as a web-developer looking to get into the mobile marketplace, wouldn’t you rather leverage your existing skill set (HTML, CSS, and JavaScript) than learn a completely new technology set (Objective-C for iPad and iPhone)?

Share

“Selenium: It’s Not Just for Testing Anymore” iPad contest

April 1st, 2010 by John Dunham

With the advent of an API-accessed Selenium-in-the-cloud service like Sauce OnDemand, using Selenium has become so easy and cost-effective that whole new applications for it become feasible and reasonable to consider. Just as robots can vacuum your living room, Selenium’s robotically-controlled browsers served up by Sauce OnDemand can be tasked to take care of your everyday routine browser tasks. Here are a few examples to stimulate your thinking:

  • set a cron job to kick-off a Selenium script to log into your Southwest Airlines account 23 hours and 59 minutes before flight time to check-in for preferred seating
  • set a cron job to kick-off a Selenium script to log into your eBay account, navigate to an auction of interest, and 30-seconds before the auction is over, check the minimum bid increment, and bid that amount over the current price for the object of your desire
  • buy tickets for the upcoming and sure-to-be-sold-out Phish concert seconds after they go on sale
  • send email to your boss from your gmail account while you’re out surfing

Okay, some of those are a bit over the top, but we’re sure our readers can come up with far better (and more savory) ideas. We’re so sure in fact, that we’ve just ordered a brand new 64-GB iPad with case that we’re going to give away to the person proposing the most creative, useful, and ethical use of Selenium for something besides website testing. Make your suggestions in the comments. The contest ends at 2100 PDT on April 15th. Decision of the Sauce judging is final, and the winner will be announced in a subsequent post.

And no, this is not a prank :-).

Share

Top 10 Reasons to Use Selenium

December 21st, 2009 by John Dunham

Last week we hosted the December edition of the San Francisco Selenium Meetup. Chosen topic of the evening was “Selenium-related lightning talks” with some delightful results. Amit Kumar of Betable presents “Top 10 Reasons to Use Selenium.” Enjoy!

Share