Selenium Testing Framework Pt 2: Base Classes

November 17th, 2011 by Jason Smiley

This is part 2 in a 3-part guest blog post series by Jason Smiley, a QA Engineer at Gerson Lehrman Group.

In my last blog post, I showed what testing as a whole would look like, regardless of what we actually need to test. Just to recap, we have tests that check and validate results, actions that are a set of steps to take before having a value we can check, and pages that can be checked or interacted with.

For the sake of this article, let’s assume we will be testing several different websites with different code bases that are partially related. For example, we will have an admin site that can add, edit, and remove content from a different public content site. Assuming we have two different test projects, or one for each site, the first thing we need to do is create a base test, action, and page class that can be used by either test project to reduce the amount of code that needs to be written. These can also reduce any maintenance that needs to be done on updating common functionality.

Later, we can have another set of base classes that extend the shared base classes but are more specific to the project under test. Since there will be shared code, it is a good idea to create a separate project that can be referenced in your test projects. This allows you to change base code sets fairly easily, which can be useful if changing to a different testing framework.

Selenium Base Test Class

First, we’ll talk about a base test class. All tests need a browser, so first we must write a function that will create a browser. The tests will need to connect to the DB to allow for data checking, and it will also need utility functions so you can look at popups or switch between active frames. Let’s create SeleniumTestBase.cs class, which has these functions. In C#, it will look something like this:

public SeleniumTestBase
{
protected IWebDriver myDriver;

public SeleniumTestBase (IWebDriver webDriver)
{
myDriver = webDriver;
}

public DataTable GetData(string connString, string SQL)
{
//Some code which will query a DB for you
}

public IWebDriver StartBrowser(string browserType)
{
//Some code which will launch different types of browsers
}

public void SwitchToWindow(string handle)
{
//Some code which will switch windows for you
}

public void SwitchToFrame(string handle)
{
//Some code which will switch frames for you
}

public void LaunchUrl(string URL)
{
//Some code which will navigate directly to the specified URL.
}

public void Refresh()
{
//Some code to refresh the page you are currently on
}
}

Now, it’s important to note here that many of these functions don’t seem to be that hard to implement. In that case, why create a base class to encapsulate standard functionality already inherent to the Selenium Framework? There are two reasons for this.

One is that you will have less typing to do, which is always nice. The other is that, should you decide to change testing frameworks (from say Selenium 1 to Selenium 2), you will only need to update one class that handles all of the basic interactions. The ways of doing things may change from one framework release to the next. By encapsulating your code, you ensure that your code will always work the same as maintenance is performed since all tests will still call the same functions.

Selenium Action Base Class

Now we’ll move on to actions. Actions will execute the steps that will change the state of the website being tested (such as being signed in). Actions may also need to revert changes done by tests to a database for data cleanup, navigate to different pages, refresh the page, or interact with different frames and windows from the current active environment. Although the interactions between an action class and a page will be test specific, we can start writing the ways an action will interact with a browser or DB. A SeleniumActionBase.cs class will probably look something like this:

public SeleniumActionBase
{
protected IWebDriver myDriver;

public SeleniumActionBase(IWebDriver webDriver)
{
myDriver = webDriver;
}

public DataTable ExecuteSQL(string connString, string SQL = “”, string SPName = “”, string[] Parameters = new string[] {})
{
//Some code which will execute a query or stored proceedure for you
}

public void SwitchToWindow(string handle)
{
//Some code which will switch windows for you
}

public void SwitchToFrame(string handle)
{
//Some code which will switch frames for you
}

public void LaunchUrl(string URL)
{
//Some code which will navigate directly to the specified URL.
}

public void Refresh()
{
//Some code to refresh the page you are currently on
}
}

There are a couple of things I’d like to clarify about the above example when it comes to updating the database during test scripts:

  • If you are going to manually execute SQL to clean up your work after a test, you should be able to do so by using custom SQL or by calling stored procedures directly (hence the optional parameters). In my experience, it is always better to use a stored procedure rather than using your own SQL to update a DB to ensure that you aren’t creating a data issue.
  • You might not be able to actually update a DB directly using SQL due to internal security protocols. Or maybe you won’t even be comfortable doing this as your test code could break the DB. However, executing SQL to clean up your code is going to be much faster and more dependable than doing it through the UI. I’m not saying you should or should not clean up your tests this way, but if you are going to execute SQL to clean up your code, I’d advocate doing it this way.

Selenium Page Class

The last piece of the puzzle are the actual pages themselves. Pages are essentially just a grouping of page elements you wish to check and interact with. To code this the most efficient way, you should break the idea of a page into two separate classes.

One class, which I will refer to as a page class, is specific to the test project in the sense that it relates to the actual pages you want to test. From a coding perspective, these are the locator strings. Regardless of what framework you are using, you need to be able to find your elements. Typically, this is done by Id, XPath, or CSS, and generally won’t change unless the page you’re testing changes. Since some locator strings could be based on the browser start index, and browser start indexes can either be 1 or 0, the page class will need to know which browser is being used. Based on this, a SeleniumPageBase.cs class would look something like this:

public SeleniumPageBase
{
protected IWebDriver myWebDriver;

public SeleniumPageBase(IWebDriver webDriver)
{
myWebDriver = webDriver;
}

protected int browserIndex
{
get
{
return /*Code to get Browser index*/;
}
}
}

The second page class will handle the actual interactions between the test or action and the page. This is usually done by Selenium itself, however, a Selenium object isn’t always easy to use. A lot of times, you have to wait for the DOM to update the element you want to check, click, or interact with, especially if the page you are testing is using AJAX or Javascript. If an element fails, you might want to add additional error messaging to say what caused the interaction to fail. By using a level of encapsulation, you can better control the use of your Selenium or testing framework code.

Since this class is supposed to handle interactions of specific elements on a page, I will call this class a SeleniumPageElement. It is important to note that a page element class will need to mimic what a IWebElement –– or whatever framework you choose –– can do, as our actions and tests will be interacting with this class. By taking the testing framework’s place, we make it easier to swap out testing frameworks for new ones with little changes in test code.

Here is an example of what a SeleniumPageElement.cs class would look like:

public SeleneniumPageElement
{
public By myBy;
public IWebDriver myDriver;
public int? myIndex;
public SeleneniumPageElement myParent;

public SeleneniumPageElement(By locator, IWebDriver webDriver, SeleneniumPageElement parent = null, int? index = null)
{
myBy = locator;
myDriver = webDriver;
myIndex = index;
myParent = parent;
}

public IWebElement GetNow(string errorMessage = “”)
{
try
{
if(myParent != null)
{
if(myIndex != null)
{
return myParent.GetNow().FindElements(myBy)[MyIndex];
}
return myParent.GetNow().FindElement(myBy);
}

if(myIndex != null)
{
return myDriver.FindElements(myBy)[MyIndex];
}
return myDriver.FindElement(myBy);
}
catch(Exception e)
{
if(errorMessage.Equals(string.Empty) == false)
{
throw new Exception(errorMessage, e);
}
throw e;
}
}
public IWebElement WaitingGet(int seconds = 5, string errorMessage = “”)
{
//Waiting function using above method.
}

public void Click(int seconds = 5, string errorMessage = “”)
{
WaitingGet(seconds, errorMessage).Click();
}

In the last post of this series, I will go over how to connect what I covered in posts 1 and 2 and put it all together in your project.

Footnote: You will also need to write other waiting functions as well as interaction functions * to handle your framework calls. The above functions will handle the structure of the page element class to allow your other functions to handle specific interactions such as clicking or other types of waiting such as WaitUntilVisible(int seconds = 5, string errorMessage = “”) or WaitUntilNotVisible(int seconds = 5, string errorMessage = “”).

Share

Sauce On Rails

November 8th, 2011 by Chris Johnson

This is a guest blog post by Chris Johnson, a web developer, author and technology consultant. 

Cucumber and Selenium are a great way to bring browser testing to your Rails application. Selenium gives you the ability to automate tests that actually use the browser the way a human user might, giving you confidence that your application actually works. But one problem you may run in to is testing multiple browsers.

Sauce Labs comes to the rescue with the ability to let you easily run your tests in the cloud on multiple browsers.

Getting Started

Let’s hook up our rails application, Twitflickup, to work with Sauce Labs. To start, we’ll grab the application’s source code from github.

$ git clone git://github.com/johnsonch/twitflickup.git

With the repository cloned, we’ll want to run $ bundle install to get our basic dependencies installed.

This application requires a Flickr API key, which can be obtained from http://www.flickr.com/services/apps/create/. After getting an API key, we’ll want to copy env.yml.example and rename it env.yml, then replace the API key and secret from Flickr in this file.

Writing a Cucumber Test

Let’s start by adding a Cucumber test around the homepage of Twitflickup by creating the homepage.feature file inside of the features directory.

By opening up the app/models/mashup.rb file, we see that when a new mashup is created, the application searches Twitter for the word “fish,” then searches Flickr for the third word of the tweet.

For our homepage to look correct, we’ll want to make sure there is an image on it and a tweet with the word “fish” in it.

@selenium
Feature: Twitflickup searches twitter and flicker

  Scenario: Search twitter for fish and display tweet
    Given I am on the twitflickup homepage
    Then I should see a tweet with the word "fish" in it

  Scenario: Search flickr for an image
    Given I am on the twitflickup homepage
    Then I should seen an image from Flickr

With our feature file in place, let’s build out the step definition in features/step_definitions/homepage_steps.rb

Given /^I am on the twitflickup homepage$/ do
  page.visit("/")
end

Then /^I should see a tweet with the word "([^"]*)" in it$/ do |search|
  page.should have_content(search)
end

Then /^I should seen an image from Flickr$/ do
  page.has_selector?('#flickr-image img')
end

We now have our tests in place and can run them with the following command.

$ cucumber

After running the feature, we’ll get an output like the following:

Feature: Twitflickup searches twitter and flicker

Scenario: Search twitter for fish and display tweet    # features/homepage.feature:3
  Given I am on the twitflickup homepage               # features/step_definitions/homepage_steps.rb:1
    Then I should see a tweet with the word "fish" in it # features/step_definitions/homepage_steps.rb:5
      expected there to be content "fish" in "Twitflickup\n\nTwitflickup\n\n\n\n\nwho told you to come outside smelling like FISH and eggs ?\n\n@\nbaby_itsREALxX\n\n\n\n\n" (RSpec::Expectations::ExpectationNotMetError)
      ./features/step_definitions/homepage_steps.rb:6:in `/^I should see a tweet with the word "([^"]*)" in it$/'
      features/homepage.feature:5:in `Then I should see a tweet with the word "fish" in it'

Scenario: Search flickr for an image      # features/homepage.feature:7
    Given I am on the twitflickup homepage  # features/step_definitions/homepage_steps.rb:1
        Then I should seen an image from Flickr # features/step_definitions/homepage_steps.rb:9

        Failing Scenarios:
        cucumber features/homepage.feature:3 # Scenario: Search twitter for fish and display tweet

        2 scenarios (1 failed, 1 passed)
        4 steps (1 failed, 3 passed)
        0m10.009s

We are left with a failing test, but there is no way to see what’s going on. Sure, in this case, we can determine relatively easily that the failure is caused by us looking for the word “fish” and the tweet returning “FISH.” But wouldn’t it be nice to see a screen shot of what’s going on too? Luckily for us, we can easily set up our application to use Sauce Labs and take advantage of the ability to playback a test that’s been recorded to visually pinpoint what went wrong.

To run our Cucumber tests with Sauce Labs, we’ll need a Sauce Labs account and Sauce Labs API key. To get an account, sign up at https://saucelabs.com/signup and then grab the API key from the “My Account” page. For the purpose of this project, let’s copy the ondemand.yml.example file, rename it to ondemand.yml, and then replace the API and Username values with those we got from our own account. The ondemand.yml file will let Sauce Labs know who we are, which let’s us view our test runs from their web interface.

With our ondemand.yml file set up, we’ll need to include the Sauce gem in our gemfile. Inside of Gemfile, let’s add the following to the test group:

gem "sauce"

The Sauce gem is the Ruby client adapter that allows users to make Selenium tests run in Sauce OnDemand without any test changes. This gem can also be used with RSpec and Test::Unit, but here we’ll stick with Cucumber. The source for the Sauce gem is available at https://github.com/saucelabs/sauce_ruby.

Next we need to tell Cucumber about Sauce Labs, which will be set up in features/support/env.rb. We’ll need to require sauce, sauce/capybara, set up Sauce.config and change Capybara’s default driver to be sauce.

require 'sauce'
require 'sauce/capybara'

Sauce.config do |config|
  config.browser = "iexplore"
config.os = "Windows 2008"
  config.browser_version = "9"
end

Capybara.default_driver = :sauce

The Sauce.config section is where we can change what browser we want to test against. In this example, let’s stick with Internet Explorer on Windows 2008. Now that we have everything in place, we can run our Cucumber tests again. This time we’ll see our output letting us know we are connecting to Sauce OnDemand. By logging into Sauce Labs, we can see the job is executing and we can even click on the job name and watch the test execute in realtime.

Now that we have our tests executing on Sauce Labs, we can login to our account, see our test runs, and take advantage of Sauce’s great playback and screen shot features.

To find out more about using Cucumber and Selenium to test any website along with many other great web development tips, tricks and techniques, be sure to checkout Web Development Recipes from the Pragmatic Programmers.

Chris Johnson is a web developer, author and technology consultant living outside of Madison, Wisconsin. He has been developing websites professionally since 2003 when he got his first paycheck as a freelancer. When he’s not developing or writing, he enjoys tinkering with technology and mechanical things, photography, video games, playing hockey and spending time with his wife and their two dogs.

Twitter: @johnsonch
Website: http://www.johnsonch.com
Blog: http://blog.johnsonch.com

Share

Selenium Testing Framework Pt. 1: Testing Concepts

November 2nd, 2011 by Jason Smiley

This is part 1 of a 3-part guest blog series by Jason Smiley, QA Engineer at Gerson Lehrman Group.

When writing test scripts, you might find yourself trying to solve similar problems over and over again. So why not re-use the same solutions over and over again? The following framework will help you get the most out of your code without needing to do tons of maintenance every time something changes.

Before getting into specifics, lets first talk about what should be implemented when writing test scripts. At GLG, our tests typically go through a set of steps on the website. They also have to interact with elements on the site in order to accomplish these steps. Then there is the actual tests themselves, which review the displayed content on the site. Essentially, we have tests that assert the content on the site, a set of steps we need to take in order to perform these tests (which, for the sake of this blog post, I will describe as actions), and then the pages with elements that we are checking or interacting with.

When drawn as an ERD, we have something like this:

How can we best make use of this structure? We want tests to focus on use cases, actions that focus on what steps to take, and pages that allow us to interact with them. From a development standpoint, this means we have tests containing a list of actions that can be used to obtain the values required to check or change the state of the system under testing. Actions can interact with pages in order to complete these steps and make sure they accomplished their task. Pages can be used by actions or tests to add, edit, clear, or read data. Adding these relationships to the ERD, we get something like this:

 

What does this look like in code? How would we best accomplish this task? Well, that depends on what you are doing. For example, maybe you need to test 5 different types of projects, or maybe you need to test same page differently each time. Either way, as a coding standard, you should always design classes with a specific purpose. Anything that is shared should go into a base class for common functionality.

In the next blog post, I will describe how to set up different base classes for tests, pages, and actions. Then in part three of this blog post series, I will show you how to bring all of this together for testing your local projects.

Share

Free Sauce Hack Day This Thursday

November 1st, 2011 by Ashley Wilson

The Saucers are opening our office doors for our first ever Sauce Hack Day this Thursday, Nov. 3, from 2pm-6pm PST. If you’re a developer or tester working with Selenium, functional testing, continuous integration, javascript testing (really, anything to do with testing), then come on by to Sauce Labs at 500 3rd St, Ste 240 in San Franicsco for a couple hours of chatting, hacking and hanging out.

Perhaps you’ve been pondering whether or not to set up your own Selenium Grid. Or maybe your boss has tasked you with overhauling your company’s current testing process in favor of automation. Or maybe you’ve heard a lot about Sauce but just haven’t quite figured out what you would get out of using it.

No matter your motives, this hack day is your chance to get some insights and advice from folks who were once in the same boat as you, and to walk away knowing more than you did. We’ll be on hand to answer questions and chat about topics that might include how to get started using Sauce with Selenium, the pros and cons of switching from Selenium 1 to Selenium 2, the basic “things-to-know” if you want to offload your testing to Sauce Labs, testing best practices, and more.

We’ll provide space for you to work in, food, and plenty of beer, soft drinks and water. We ask that you provide a RSVP to the event, your own laptap and power supply. See you there!

Share

So you want to start a Selenium Meetup Group. Now what?

October 24th, 2011 by Ashley Wilson

The is part one in a two part series on Starting a Selenium Meetup Group.

Organizing Selenium meetups has become my thing. On my first day at Sauce back in April 2010, I was tasked with helping to organize a meetup that was happening two days later. I hadn’t done much event planning nor did I even know what Selenium was (a little embarrassed to admit that now), but I jumped in, proved I (sort of) knew what I was doing and was handed the reigns to Sauce’s monthly Selenium Meetups. 18 San Francisco Selenium meetups later, plus three in New York City, one in Boston, and the inaugural Selenium Conference, I’ve learned a thing or two about organizing events for the Selenium community and would like to share some of that with you.

I’m writing this post because my Selenium meetup history tells me there are Selenium users all over the world who want to meet other testers and developers, geek out about testing, and find out how others are utilizing this awesome tool – they just need an avenue to do so. We saw this in action at the Selenium Conference back in April. Everyone who showed up was committed to open source, wanted to make this project the best it can be and loved getting together to talk about Selenium. But while a big Selenium conference is great, realistically it can only happen once or twice a year. Meetups, on the other hand, can happen much more frequently, in just about any city in the world, with the help of one or two committed organizers.

Which is where you, future Selenium Meetup organizer, come in :-) If you don’t live in San Francisco, New York, Boston, Seattle, London, Toronto, MelbournePhoenix, and soon DC (cities that have an existing meetup group), I hope to arm you with the knowledge and confidence to start one yourself and see it flourish. So, without further ado, let’s dive into the nitty gritty of starting your first Selenium meetup!

1. Ask yourself: How active do you want this meetup group to be?
It’s important to set this expectation early on so you know what you’re signing up for. Will you meet every two weeks? Once a month? Once a quarter? I’ve found once a month to be solid, but I’m also fortunate that organizing these meetups is part of my duties at Sauce.

2. Decide what your first meetup topic will be
For a first event, I’d suggest opening the meetup with “getting to know you” time and then follow that up with either a speaker or a workshop that you (or someone else qualified) will lead. Organizing it in this way gives you time as the organizer to meet attendees, get a feel for their technical level and perhaps ask about future meetup topics. An agenda for the evening might look like this:

7:00pm: Registration, Welcome, pizza (or local favorite) and drinks
7:15pm: Welcome, Announcements
7:30pm: Mingling, networking, etc
8:00pm: Workshop / Presentation
8:30pm: Q&A / Wrap up workshop
9:15pm: Lights Out

If you’re experience is anything like mine, you’ll find you have to shoo people out so the cleaning people can come in to do their job.

3. Find a Speaker
This one can be difficult when you’re first starting out. Assuming you work at a company that uses Selenium, I’d ask your coworkers if anyone would like to present. If you strike out there, I’d go to Linkedin and filter by location and whether they have Selenium in their profile. You can also send a note to the LinkedIn Selenium Group or the Selenium user list on Google groups. If all those options fail, get in touch with me and I’ll do what I can to help you secure a speaker.

4. Pick a date for your first meetup
It’s a good idea to not only pick a date for your first event, but also establish the day of the week to have regular meetups. This will make it easier for attendees to remember and also (hopefully) keep you motivated to continue organizing. In San Francisco, we generally have our meetups on the third or fourth Tuesday of the month. In New York, we do meetups on the third Thursday of the month. I’d avoid doing events on Mondays and Fridays.

5. Look for a (free) venue
Check first with your own company. Meetups are a great recruiting tool and you can use that angle when convincing your boss to host a bunch of geeks. If your own company won’t do, put a note out to the Selenium user list saying that you’re starting this meetup and need a venue. Do a google search for other tech companies in your area and see if you can track down the developer advocate or QA director. Once again, if all these options fall short, send me an email. We’ve got a database of companies using Selenium and I know plenty of them would be thrilled to offer up their space.

Some things to remember about a venue: Open space is better than a conference room. You’ll need to confirm that there is a projector and screen set up for the presenters (with adapters for Mac and PC users!). Also be sure there are plenty of chairs set up. Theatre style tends to work best but if you’re doing a workshop, obviously round table seating is more preferable.

6. Find a sponsor for food and beer
Free food and drinks are essential to meetups so I wouldn’t skimp on this. I usually order pizza from a place close to the venue and have beer delivered from a liquor store. Every once in a while I find a company that provides a venue, food and drinks. When that happens, I get really happy and feel like I’ve hit the jackpot. You will too. (Remember to ask the company that is providing the venue if they’ll also pony up food and drinks. The worst they can say is no). For a group of 50 attendees, plan on it costing about $400 for food, drinks, and tip.

7. Set the group up on Meetup.com and announce your first meetup
It’s time to announce your meetup! When setting up your meetup page, be sure to use Selenium and your city in the headline (e.g. San Francisco Selenium Meetup Group) so it’s easily searchable. Go ahead and announce your first meetup, knowing that at first, it will be a meetup for one. Then tweet and/or blog about it. If you don’t tweet or blog, tell Sauce about it so we can do the tweet to our followers.

8. Have your meetup!
After weeks of organizing, it’s time to have your first meetup! Here are some parting tips:

      • Plan to arrive to your meetup 1 hour in advance to make sure everything is set up to your liking.
      • Come armed with nametags and sharpies.
      • Create a sign in sheet so you know how many people came vs. how many people RSVP’d.
      • Keep everything on time according to the agenda.
      • Smile, mingle, and, most importantly, have fun :-)

The next post will cover best practices for organizing subsequent meetups and growing your group.

Share

Announcing Selenium 2.9.0 support

October 21st, 2011 by Santiago Suarez Ordoñez

Wait! What?! Didn’t you guys just announce Selenium 2.8.0?! Well, the Selenium dev team moves crazy fast and we do our best to keep up.

Selenium 2.9.0 (released yesterday!) comes with several improvements and some bugfixes. Here’s the changelog for more information.

You can start using this new version right now by adding the following Desired Capabilities/JSON key-value:

"selenium-version": "2.9.0"

If you see any issues after moving your tests to this new release, we definitely want to hear about it.

For more information about the current version being used by Sauce, using other Selenium versions and the selenium-version flag you can check our docs on Sauce OnDemand additional configuration.

Share

Announcing Selenium 2.8.0 support

October 20th, 2011 by Santiago Suarez Ordoñez

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’s blog for more information.

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, you can start using this new version right now by adding the following Desired Capabilities/JSON key-value:

"selenium-version": "2.8.0"

If you see any issues after moving your tests to this new release, we definitely want to hear about it. And remember, once we move everyone over, you’ll still be able to test with previous versions using the “selenium-version” capability outlined above, in case you notice any issues with the default version.

For more information about the “selenium-version” flag, you can check our docs on Sauce OnDemand additional configuration.

Share

Top Selenium Tips From The Sauce Codebase

October 13th, 2011 by Ashley Wilson

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!

Share

Massive Reduction of Selenium Costs with Sauce Labs

October 4th, 2011 by Ashley Wilson

This post was originally written for Okta’s blog by QA Lead Denali Lumma. Okta is an identity & access management company for cloud/SaaS applications. It has been reprinted with her permission.

At Okta we provide enterprise grade identity management from the cloud.  Specifically, Okta delivers single sign-on across all your web applications, centralize user management and control, and integration with Active Directory.  We invest heavily in test automation and validation.  A lot of great testing tools are utilized, including Selenium.  We currently have about 1000 Selenium tests in our production test system.   These tests are deployed and run in the cloud with our trusted partner; Sauce Labs.  Currently, Selenium tests run continuously on check-in across master and release branches against our supported browser/ version/ OS matrix.  This matrix currently includes Firefox 3.6 on Linux, Firefox 7 (latest stable version) on Windows, Internet Explorer 8 on Windows, Internet Explorer 9 on Windows, Google Chrome on Windows, Safari 4 on Windows and Safari 5 on OSX.  (Safari 5 on OSX is run locally until the up and coming Mac VM feature is released by Sauce Labs.) The decision to use Sauce Labs as the Selenium client rather than running tests internally on a roll your own Selenium Grid configuration was methodically considered by our engineering team.

Even before we began to consider working with Sauce Labs, internally a general question would come up every now and again: why bother with Selenium?  The answer was simple: we have no choice. Because of our business focus, we must follow industry best practices with test automation across all levels of the stack including the GUI in order to ensure excellent product software quality.  Yet, there is no escaping that web application test automation with Selenium is expensive.  Engineers at our company report spending anywhere from 10 – 60% of their time writing, reviewing and maintaining Selenium tests.  But the cost of not implementing Selenium testing is beyond high—it’s a game-ender.  Without constant deep and broad test feedback developers are unable to introduce changes safely and responsibly at the constantly accelerating pace achieved by the world’s best software companies—our competitors and your competitors.  But we’ve managed to reduce these costs significantly with Sauce Labs.  What we’ve found through our trial investigation and now full deployment is that Sauce Labs saves us tremendous time, and thus tremendous money.

Read the rest of this post on Okta’s blog

Share

Flying Saucers All ‘Round The World

September 29th, 2011 by Ashley Wilson

Here’s a breakdown of upcoming events we’ll be speaking at, drinking at, hanging out at, etc. If you’re in the area, give us a shout on Twitter and find us to say hello!

  • 10/01: Sauce Developer Adam Christian (Windmill, Jelly.io) has been traversing around Europe for the last few weeks. Soon he’ll make his final stop at JSConf EU in Berlin, Germany, held October 1-2. He won’t be speaking, but he will be around to chat about Sauce over a beer or two (bonus: he said he’s buying). If you’re attending the conference and are involved in testing, get in touch with him!
  • 10/02: Jason Huggins, co-founder of Sauce, will speak at the *free* Jenkins Users Conference this Sunday at the Marines’ Memorial Hotel in San Francisco. Last we heard, nearly 400 people had registered, but if you manage to get in, drop by his talk, Extreme Testing with Jenkins and Selenium. He’ll start with an overview of how Selenium and Jenkins usually connect together and then cover browser testing at the extremes, including how a major U.S. airline uses Selenium and Jenkins to test its website every 20 minutes across dozens of concurrent threads. Sauce is also a sponsor so if you want some goodies, stop by our booth!
  • 10/20: New Yorkers should mark their calendars for the next NYC Selenium Meetup, scheduled for 7pm on October 20 at Yodle. The topic for this free event is mobile testing with Selenium 2.0. I’ll be around to host and meet with folks who are interested in hearing more about Sauce and Selenium. We’ve also got a speaking slot open, so if you’d like to show off how your company is handling mobile testing, please send me an email with a brief abstract.
  • 10/25: Jason will speak at the Software Test Professionals (STP) Conference in Dallas. His talk, Web Testing with Selenium 2.0 – Better, Faster, More Awesome, will explain the benefits of using Selenium 2.0 and cover some of the big differences between Se v.1 and Se v.2. He’ll also cover trends in testing and give guidance on what should and should not be tested with Selenium.
  • 10/27: And Adam Christian is once again hitting the conference circuit with a talk at GTAC titled Browser Automation with NodeJS and Jellyfish. This event is currently closed to new registrants, but if you were able to snag a slot, make sure you tweet about how awesome it is :-)

And that’s what we’ve got so far. Happy testing!

Share