For our February San Francisco Selenium Meetup, Santiago Suarez Ordoñez, Sauce Ninja and Selenium Contributor, dove in to the RemoteWebdriver codebase and emerged with a highly technical talk that covered everything from the DesiredCapabilites object to binding implementations and caveats.
For those unfamiliar, RemoteWebdriver lets you run your Webdriver tests remotely and use Sauce Labs or Selenium Grid to scale your testing. In Santi’s opinion, it’s the best driver out there, and if you have a look at the video below, you’ll get a sense as to why that is. Watch along as he gives a brief overview of what RemoteWebdriver is before going into its architecture design, the JSONWireProtocol, and the pros and cons for using it over other drivers.
Thanks to our friends at Huddler Inc for hosting AND providing ample pizza and beer to keep us happy for the night. To learn more about the San Francisco Selenium Meetup group and attend a future event (we’ve got one tomorrow night!) visit our meetup page. And if you’re interested in presenting at or hosting a meetup, please get in touch!
Having run more than 8 million tests in the Sauce cloud, we’ve learned a thing or two about the common pitfalls folks encounter when writing and running Selenium tests.
To help others not make those same mistakes, we recently started hosting bi-weekly webinars led by Sauce Ninja Santiago Suarez Ordoñez. This week’s webinar covered various Selenium tips, including implicit waits, timeouts, and the reasons to avoid complex locators.
If you’d like to attend an upcoming webinar, register here. Happy testing!
Check out the video from yesterday’s Firewalls and Testing in the Cloud webinar to see how to connect your local and firewalled servers to our cloud using Sauce Connect.
We give live tutorial webinars every two weeks. If you’d like to attend an upcoming session, visit our webinars page.
As part of our new “Test Like A Ninja Webinar Series,” I held an improv webinar last week that covered how to write better Selenium tests. Most of the content came from my own Selenium experience, as well as experience gleaned from working on our own customers’ issues.
Without further ado, here’s the video:
And here are some of the code snippets I talked about:
Implicit waits in Selenium 1:
Ignoring Open and waitForPageToLoad failures, as well as reporting pass/fail status automatically:
Reporting pass/fail status automatically on python for Selenium 2 tests
For our July Selenium meetup, held last Thursday, we wanted to give attendees something a little different to chew on. Thanks to our good friends at Yammer, who co-hosted the event with us, we did so not only with delicious catered Mexican food, but also plenty of Javascript & Selenium testing goodness to go around.
Bob Remeika, senior engineer at Yammer, gave a spirited presentation that left no one questioning his stance on testing (his opening slide – “Test your shit” – really said it all). He gave us an inside look at how Yammer tests using a combination of Jellyfish and Sauce OnDemand, and gave some great advice on knowing what and how to test when you’re just starting out.
We also had Adam Christian, Sauce Labs’ Javascript Aficionado and the creator of Jellyfish, give two talks. The first, a lightning talk titled “Javascript Via Selenium: The Good, The Bad, The Obvious”, covered some of the lesser known things about Javascript testing via Selenium.
The second showed off how you can use Jellyfish, the open source Javascript runner that he announced a few weeks ago, to run your JS unit tests in any environment.
Thanks to Adam, Bob, and Yammer for making this quite the fun and memorable meetup. As always, the San Francisco Selenium Meetup group is free to join & we meet monthly at different venues around the Bay Area to talk all things testing. See you in August!
When it came time for popular eCommerce company Beachmint to launch their first consumer brand JewelMint last year, they knew automated testing would be a key component in their development process. But they weren’t keen on taking on the overhead costs of setting up, running, and maintaining their own testing infrastructure. So they turned to Sauce Labs.
Watch the video below to see how Sauce OnDemand helps the BeachMint development and QA teams consistently ship quality code while finding and fixing bugs quickly and easily using screenshots and videos of every test. As William Belk, Director of Product Development, puts it, “Without the Selenium/Sauce Labs combination, our life would generally suck.”
Last week, our own Santiago Suarez Ordoñez gave a presentation to the San Francisco Selenium Meetup group that convinced us all to say no (for the most part) to XPath and yes to CSS Locators in our Selenium tests.
In his role as official Sauce Ninja and as a prolific poster in the Selenium forums, Santi has helped more users solve locator issues than possibly anyone else in the world. He’s previously written a number of blog posts on ways to improve locator performance. As Sauce CEO John Dunham puts it, “If there was a foursquare mayorship for locators, Santi would have it for a lifetime.”
Drawing from this experience, he gave us these four reasons for using CSS Locators:
1. They’re faster
2. They’re more readable
3. CSS is jQuery’s locating strategy
4. No one else uses XPATH anyways!
I can’t speak for everyone, but Santi sure sold me on point number one when he showed off the performance metric script he wrote a script that tested the speed of XPath vs the speed of CSS Locators. There wasn’t much of a difference in Firefox, Safari, or Chrome, but with IE, the results were undeniable. Take a look:
To underscore this even further, he also recorded a video in Sauce OnDemand that uses one heck of a cute kitten to illustrate just how slow XPath can be. The cat’s paw movements represent the test clicking through the different locators. The first batch of clicks uses CSS Locators and completes in under 30 seconds. The second batch, the XPath one, continues on for another eight minutes. Eight minutes!
During the rest of the presentation, Santi dives into writing both basic and more advanced CSS Locators. He also spends some time talking about when you shouldn’t use CSS Locators (yes, there are a few cases where it is not the right tool for the job). To see the talk in its entirety, check out the recording below. And if you’re thinking of switching over from XPath, but unsure of how to go about it, check out the nifty tool Santi wrote called cssify. It does the handy work of translating your XPaths to CSS automatically.
As you may have heard, we recently released a new, free tool that makes building and running Selenium tests easier than before. Sauce Builder is now available for download, and with it comes the ability to create Selenium tests in your Firefox browser by simply clicking around your application. You can then run those tests in Sauce OnDemand with just a few clicks, no Selenium expertise necessary.
To explain more about Sauce Builder and how automated testing can accelerate your development velocity, we held a webinar with Adam Christian, a Sauce Labs developer and project lead for Sauce Builder.
With Sauce Builder, we’re hoping to simplify and improve the cross-browser testing process for development and QA teams. Specifically, Sauce Builder will allow you to:
Build Selenium tests with zero programming - Simply click through your application and Sauce Builder writes a Selenium scripts that reflect your actions.
Export results in the language of your choice - HTML, JAVA, Groovy, C#, Perl, PHP, Python and Ruby so your tests speak the same language as your application and dev team.
Eliminate bugs faster - Use immediate video playback of your tests in action, and share them with your teammates.
Remove test infrastructure headaches - Sauce Builder makes it a snap to either run tests locally in Firefox or in the cloud with access to all the browser / OS combinations supported in the super scalable Sauce OnDemand service.
In case you missed the awesome Selenium Conference that happened in early April, check out videos from each of the presentations. We’ll be posting a couple at a time, so stay tuned to future posts!
Jason Huggins’ Opening Keynote
Dave Hunt & Andrew Smith: Automating Canvas Applications Despite recent improvements to automated testing tools, there’s still a large gap when it comes to emerging technologies such as HTML5. Recent developments like the canvas element present an interesting dilemma for traditional automated testing as they expose little or no information to debug tools. In order to move forwards, both developers and testers will need to work together. Using Selenium, Java, and JavaScript we will demonstrate writing automated tests for a popular canvas game.
Dima Kovalenko: Selenium and Cucumber Wouldn’t it be nice to have the BA’s write out the acceptance criteria in plain English, and then have those criteria run as tests? Join us for a beginner to intermediate walk through of Cucumber and Selenium. Learn how to write tests that are easy to understand and run. There will be plenty of examples and sample code to get you going in the right direction.
In case you missed our last SF Selenium Meetup, check out video below of the two great presentations on mobile testing. Pete Hodgsen, a software consultant with Thoughtworks, discussed how to use Frank, a new testing framework he’s involved in developing, for automated acceptance testing of native iOS apps. Jason Huggins, creator of Selenium and co-founder of Sauce Labs, followed this by demoing how to test Android and iPhone applications using Selenium 2.
Many thanks to our friends at CoTweet for co-hosting and making this last meetup such a success! If you think your company might be interested in hosting a future meetup, please get in touch. Our next meetup will be in early May at Mozilla (we’re skipping April because of the Selenium Conference happening next week). Stay tuned for more details!