Selenium at Salesforce Scale – South Bay Selenium Meetup Tonight!

February 12th, 2014 by Bill McGee

Tonight’s South Bay Selenium Meetup features a presentation from Greg Wester (@gwestr) titled “Selenium at Salesforce Scale”. Salesforce has an inventory of more than 100,000 Selenium tests and Greg will discuss how they run them at scale, as well as provide practical advice on how to architect test harnesses for success. The meetup begins at 6:30 and will be held at LinkedIn (2025 Stierlin Court, Mountain View, CA – map). Register here – hope to see you tonight!

Front End Ops Conf 2014 Announced

January 29th, 2014 by Bill McGee

FEOC1_200x136Front End Ops Conf 2014, a new conference dedicated to front end operations, opened for business today. The conference is focused on the emerging discipline of front end operations and Sauce Labs is helping to organize and sponsor the event, slated for April 24-25, 2014 at the Terra Gallery in San Francisco. Front End Ops Conf features a great line up of speakers who are fanatical about building organized and high performance client-side code – if you’re not familiar with F-E Ops check out this article from conference co-chair Alex Sexton.

In addition to Alex, speakers include Paul Irish, Sarah Goff-Dupont, Ian Feather, Seth Walker, Rebecca Murphey and our very own Adam Christian, to name a few. Early bird tickets are now on sale and the call for proposals is also open if you have a passion for speaking about test automation, application monitoring and other topics that focus on web app performance and maintainability. Follow Front End Ops Conf at @FEOpsConf.

Online Workshop – Learn How Gilt Groupe Uses Appium to Automate Their Mobile Testing

December 19th, 2013 by Bill McGee

1/14/2014 Update: We’ll be posting a link to the recorded webinar in several days.

We’re teaming up with the Gilt Groupe for our next online workshop! Join us on Tuesday, January 14th, 2014 at 11:00am PST to learn about how Gilt uses Appium to automate their mobile testing. Today, mobile purchases make up more than 40% of Gilt’s sales, and the mobile e-commerce market continues to rage – in the U.S. alone, mobile commerce will grow an estimated 63% to around $34.2 billion, up from $21 billion in 2012.

Find out how Gilt has streamlined testing of this vital part of their business, and what they are doing today on the testing front.

In the workshop, Matt Isaacs, Engineer at Gilt Groupe will cover how mobile testing at Gilt has changed since the early days of Gilt mobile. Then Mike Redman, Director of Sales Engineering at Sauce, will explain how to run your Appium tests on the Sauce cloud. This will be followed by a live Q&A. Register today!

Gilt-Man-smaller

Appium Meetup Slides

December 17th, 2013 by Bill McGee

Missed last week’s Appium meetup? Check out Jonathan’s slides that highlight the history of Appium and its upcoming roadmap!

Keep an eye on the Appium meetup page to hear about upcoming Appium meetups.

Appium Meetup in SF 12/11/13

December 10th, 2013 by Bill McGee

Tomorrow is the second Appium meetup, 12/11/13 at 6:30PM! Once again, Lookout will be hosting the meetup and providing drinks and Sauce will be providing pizza. Our very own Jonathan Lipps, chief architect of Appium, will be giving a talk on the future of Appium and detail upcoming API changes and roadmap. Then Dan Doveralba will be covering tips and tricks for Appium that he’s discovered over the last 6 months.

PLUS, Jonathan will be giving away two Sauce track jackets as prizes (one men’s, one women’s). These are extremely limited edition, you know you want to rock one!

Lookout HQ is located at

1 Front Street, Suite 2700, San Francisco, CA

See you there!

“So You Want to Build a Robot?” – Raquel’s Talk from CascadiaJS

November 22nd, 2013 by Bill McGee

Didn’t make it to CascadiaJS? Check out the video from our very own Raquel‘s talk. Bring on the robots!

Parallel Testing with Python and Selenium on Sauce Online Workshop Recap

November 12th, 2013 by Bill McGee

Last week, we hosted an intro to parallel testing on Sauce with Python and Selenium. You can find the slides here.

We used the following scripts in the workshop:

Sauce helper:

'''
This library is not supported by Sauce Labs. It merely servers as an
example on send data to the Sauce Labs API.
'''

import requests
import json
import time

# Can be used to time different selenium commands
def timeit(f):

def timed(*args, **kw):

ts = time.time()
result = f(*args, **kw)
te = time.time()

print 'func:%r args:[%r, %r] took: %2.4f sec' % \
(f.__name__, args, kw, te-ts)
return result

return timed
# Set the status of a test to pass or fail status can be passed or failed.
def reportStatus(status, session_id, user_id, access_key):
hdrs = {"Content-Type": "text/json"}
payload = {"passed" : status}
r = requests.put("http://" + user_id + ":" + access_key + "@saucelabs.com/rest/v1/" + user_id + "/jobs/" + session_id, headers=hdrs, data=json.dumps(payload))

def reportCustom(custom_data, session_id, user_id, access_key):
hdrs = {"Content-Type": "text/json"}
payload = {"custom-data" : custom_data}
r = requests.put("http://" + user_id + ":" + access_key + "@saucelabs.com/rest/v1/" + user_id + "/jobs/" + session_id, headers=hdrs, data=json.dumps(payload))

# from selenium.webdriver.firefox.webdriver import WebDriver
# from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium import webdriver
import time, unittest, sys, saucehelper, copy
import wd.parallel

and the test script:

class parallel(unittest.TestCase):
SAUCE_USERNAME = '{YOUR_USER}'
SAUCE_ACCESS_KEY = '{YOUR_KEY}'

def setUp(self):
# self.wd = WebDriver()
# self.wd.implicitly_wait(60)

desired_capabilities = []

browser = copy.copy(webdriver.DesiredCapabilities.CHROME)
browser['platform'] = 'Linux'
browser['name'] = 'Python on Sauce 1/2'
browser['tags'] = "Parallel"
browser['build'] = "9999"
desired_capabilities += [browser]

browser = copy.copy(webdriver.DesiredCapabilities.CHROME)
browser['platform'] = 'Windows XP'
browser['name'] = 'Python on Sauce 2/2'
browser['tags'] = "Parallel"
browser['build'] = "9999"
desired_capabilities += [browser]

self.drivers = wd.parallel.Remote(
desired_capabilities=desired_capabilities,
command_executor="http://" + parallel.SAUCE_USERNAME + ":" + parallel.SAUCE_ACCESS_KEY + "@ondemand.saucelabs.com:80/wd/hub"

)

@wd.parallel.multiply
def test_parallel(self):

self.driver.get("http://www.yahoo.com/")
self.driver.find_element_by_link_text("Finance").click()
self.driver.find_element_by_id("txtQuotes").click()
self.driver.find_element_by_id("txtQuotes").clear()
self.driver.find_element_by_id("txtQuotes").send_keys("aapl")
self.driver.find_element_by_id("btnQuotes").click()

wait = WebDriverWait(self.driver, 30)
condition = EC.text_to_be_present_in_element((By.TAG_NAME, "html"), "Apple Inc. (AAPL)")
wait.until(condition)

print self.driver.session_id

@wd.parallel.multiply
def tearDown(self):

status = sys.exc_info() == (None, None, None)
saucehelper.reportStatus(status, self.driver.session_id, parallel.SAUCE_USERNAME, parallel.SAUCE_ACCESS_KEY)
self.driver.quit()

if __name__ == '__main__':
unittest.main()

Additionally, here are some of the commonly asked questions and answers.

Q: How many tests can be run in parallel?
A: This is determined by the number of VM’s allocated to an account.

Q: Where can I download the python-parallel-wd module?
A: https://github.com/OniOni/python-parallel-wd.git

Q: What recommendations would you make on choosing which tests should be run in parallel?
A: We recommend running all UI tests in parallel across multiple platforms. If the application is publicly facing application owners do not have control over what browsers and devices will be accessing the application.

Q: With selenium.webdriver.support.wait.WebDriverWait(driver, timeout, poll_frequency=0.5, ignored_exceptions=None) how long will it wait?
A: until(method, message=”) Calls the method provided with the driver as an argument until the return value is not False

Python Example
wait = WebDriverWait(self.driver, 30)
condition = EC.text_to_be_present_in_element((By.TAG_NAME, “html”), “Finance”)
wait.until(condition)

Stay tuned for more workshops, and let us know if there are topics you want us to cover!

Robot Hackathon Tonight! Build Your Own Mobile Testing Robot and Other November Happenings

November 6th, 2013 by Bill McGee

Now that you’ve gained an hour of sleep how are you going to get the most out of that new-found time? We can think of several slick events happening this month and there’s still plenty of time to join in. Tonight is Sauce’s 2nd mobile testing robot hackathon. Come build your own Tapster robot and learn how to use it to test your iOS or Android mobile apps. The hackathon will be held at GitHub/SF from 5:30 to 11:30 and there are still tickets available for builders and spectators.

Then on Thursday, November 7th there’s the first-ever Appium San Francisco meetup at Lookout HQ in SF. Dan Cuellar, original author of Appium and Lead Software Engineer for the Test team at Zoosk, will give a quick intro, history, and glimpse into what’s coming next for Appium, and then present how to use it to automate Mac OS X applications. Felix Rodriguez and Dan Patey from Bleacher Report will then present how to integrate native app testing for iOS and Android devices into current test suites using CucumberSauceium. Did we mention pizza and drinks? The meetup will run from 6:30 to 8:00.

Switch into glide and take a jaunt down highway 101 next week to check out AnDevCon 2013, the “largest dedicated Android conference in the universe!” The conference runs November 12-15 and Sauce will be demo’ing Appium and Tapster in booth 305 on Thursday the 14th and Friday the 15th. Might be a bottle of hot sauce in it for you!

Later in the month is the San Francisco Selenium meetup at Facebook in Menlo Park. Held on Tuesday, November 19th, the topic will be “Scaling Selenium at FB”. Can’t put it any better than this: “Facebook’s billion users have no idea the site gets released twice a day with no user impact. Achieving this put high demands on automated testing, and Selenium is a key part of making it all possible.” Come listen and learn how Facebook scaled Selenium to their size, FB’s new open-source PHP Selenium API, and how the company is making it easier for their engineers to write and debug Selenium tests

Register for our Parallel Testing Online Workshop

October 17th, 2013 by Bill McGee

Selenium testing

For our next online workshop, “Parallel Testing in Python with Selenium and Sauce“, on November 5th, 11AM PST, we’ll run through how to run tests in parallel on Sauce. Get expert advice and guidance on how to run your test suite faster by running more tests in parallel.

In the workshop, Michael Redman, Director of Sales Engineering at Sauce, will cover how to get Selenium scripts running in parallel in the cloud. We will base the parallel script to execute on python-parallel-wd module and will discuss the value of parallel script execution. This will be followed by a live Q&A session.

Register here.

See you there!

Come Visit Sauce at Apps World 2013

October 11th, 2013 by Bill McGee

Want a great reason to visit London later this month? Our very own Santiago Suarez Ordoñez, Senior Infrastructure Developer, will be sitting on an Apps World 2013 panel on October 23rd titled “Best practices in managing QA testing for the multi-device nightmare”. Apps World 2013 is Europe’s largest multi-platform app event and takes place at Earls Court 2 in central London on the 23rd and 24th of this month.

The panel will be moderated by Martin Wrigley, Executive Director, App Quality Alliance (AQuA) and Santi will be alongside Matthew Brown (Test Manager, Apptivation), Philipp Benkler (Founder & CEO, Testbirds) Paul Rutter (Test Manager – Mobile Platforms, BBC) and Becky Wetherill (Product Director, Borland) – a royal QA roster!

Topics to be discussed include determining how many devices to test, whether or not emulators can be effective as a substitute to testing on actual devices, the balance  of functional, compatibility & performance testing requirements across devices, issue resolution strategies post launch and more.

Once you’ve tucked the panel under your belt (and all of the juicy take-aways), please be sure to take a quick jaunt to stand 217 and say hello to Saucers! We’ll be demo’ing Appium, an open source test automation framework that aims to turn multi-device QA testing from nightmare to a dream. Did we mention there will also be a spiffing robot too?

So hop on the tube and come join the Saucers at Apps World 2013. Cheerio!