Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Selenium and
Sauce Labs
Jason Huggins
twitter: @hugs
email: hugs@saucelabs.com
Agenda
• Overview of Selenium
• Selenium IDE, RC, Grid
• Sauce Labs and Sauce OnDemand
• Demo
• Selenium IDE, Sauce OnDema...
The Problem
Automated
Source: - F.O.X.: http://www.flickr.com/photos/kv/499219/
Ajax
Workflows
What is Selenium?
Selenium IDE for Firefox
“Selenese”
10
!"#$%"&'$(%)$*
+%%,-..///01*234)03$#.,+$%$5.23"6$(".789:;8<=:
Example Selenium RC Test - Java
Example Selenium RC Test - C#
Python, Ruby,
Java, C#, or Perl
Test Script
HTTP
Your Awesome
Web App
Selenium RC Server
HTTP HTTP
Selenium Remote Control
Time
Servers
Unit of Work
Time
Servers
Unit of Work
!"#$
%&&'())***+,-#./"+.01)'%0&02)$345)678
Selenium Grid
Sauce Labs
What Sauce Labs Does
• Cloud-hosted Selenium for:
• Speed—run tests in parallel
• Pain-free infrastructure (test infrastru...
!"#$
%&&'())***+,-#./"+.01)'%0&02)$345)678
Sauce OnDemand (just like Grid)
Demo!
How to Avoid
Selenium Poisoning
Intent Action
Action
• open 'www.example.com'
• clickAndWait 'link=Log in'
• type 'User Id', 'hugs@saucelabs.com'
• type 'password', '12...
Intent
• Log in
• Change password
• Modify profile
• Log out
1.Write intent.
2. Map to actions.
Seek higher level
abstractions
Hudson
Ant/NAnt
xUnit
Selenium
Hudson
Ant/NAnt
xUnit
Business Specific Library
Selenium
Page Object Model
Google:“Selenium Page Objects”
Start small
It’ll get big anyway
What to start with?
• Smoke tests
• “Money path”
• New features
Benefits of Short Tests
• Easier to read
• Easier to write
• Easier to debug/maintain
• Easier to parallelize
Selenium 2?
• Native Keyboard & Mouse Events
• Same Origin Policy / XSS / HTTP(S)
• Pop-ups, dialogs
– Basic Authentication
– Self-sig...
• WebDriver Object
• WebElement Objects
Cleaner API
Python, Ruby,
Java, C#, or Perl
Test Script
HTTP
Your Awesome
Web App
Selenium RC Server
HTTP HTTP
Selenium Remote Control
Python, Ruby,
Java, C#, or Perl
Test Script
HTTP
Your Awesome
Web App
Selenium RC Server
HTTP HTTP
Selenium 2
Python, Ruby,
Java, C#, or Perl
Test Script
Your Awesome
Web App
HTTP HTTP
Python, Ruby,
Java, C#, or Perl
Test Script
Your Awesome
Web App
C/C++ HTTP
But... Java... Is... Still... In...There...
Python, Ruby,
Java, C#, or Perl
Test Script
HTTP
Your Awesome
Web App
Selenium...
But... Java... Is... Still... In...There...
Python, Ruby,
Java, C#, or Perl
Test Script
HTTP
Selenium Remote
Server
HTTP H...
Q&A
Selenium and Sauce Labs
Selenium and Sauce Labs
Selenium and Sauce Labs
Upcoming SlideShare
Loading in …5
×

Selenium and Sauce Labs

8,747 views

Published on

An overview of Selenium, including Selenium IDE, Selenium RC, Selenium Grid, and Sauce OnDemand (A cloud-hosted Selenium test infrastructure service). Also covers an overview of upcoming features in Selenium 2, and how to best use Selenium: use of the Page Object patter, and how to use with continuous integration.

Published in: Technology
  • My struggles with my dissertation were long gone since the day I contacted Emily for my dissertation help. Great assistance by guys from ⇒⇒⇒WRITE-MY-PAPER.net ⇐⇐⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I’ve personally never heard of companies who can produce a paper for you until word got around among my college groupmates. My professor asked me to write a research paper based on a field I have no idea about. My research skills are also very poor. So, I thought I’d give it a try. I chose a writer who matched my writing style and fulfilled every requirement I proposed. I turned my paper in and I actually got a good grade. I highly recommend ⇒ www.HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • There is a useful site for you that will help you to write a perfect and valuable essay and so on. Check out, please ⇒ www.WritePaper.info ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I’ve personally never heard of companies who can produce a paper for you until word got around among my college groupmates. My professor asked me to write a research paper based on a field I have no idea about. My research skills are also very poor. So, I thought I’d give it a try. I chose a writer who matched my writing style and fulfilled every requirement I proposed. I turned my paper in and I actually got a good grade. I highly recommend ⇒ www.WritePaper.info ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Visit Here to Read PDF Format === http://pdfasgoasasga.qpoe.com/B077ZBKF6Y-dragon-burger-sauce-bichon.html
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Selenium and Sauce Labs

  1. 1. Selenium and Sauce Labs Jason Huggins twitter: @hugs email: hugs@saucelabs.com
  2. 2. Agenda • Overview of Selenium • Selenium IDE, RC, Grid • Sauce Labs and Sauce OnDemand • Demo • Selenium IDE, Sauce OnDemand • Tips and Tricks • Selenium 2 • Q&A
  3. 3. The Problem
  4. 4. Automated Source: - F.O.X.: http://www.flickr.com/photos/kv/499219/
  5. 5. Ajax
  6. 6. Workflows
  7. 7. What is Selenium?
  8. 8. Selenium IDE for Firefox
  9. 9. “Selenese”
  10. 10. 10 !"#$%"&'$(%)$* +%%,-..///01*234)03$#.,+$%$5.23"6$(".789:;8<=:
  11. 11. Example Selenium RC Test - Java
  12. 12. Example Selenium RC Test - C#
  13. 13. Python, Ruby, Java, C#, or Perl Test Script HTTP Your Awesome Web App Selenium RC Server HTTP HTTP Selenium Remote Control
  14. 14. Time Servers Unit of Work
  15. 15. Time Servers Unit of Work
  16. 16. !"#$ %&&'())***+,-#./"+.01)'%0&02)$345)678 Selenium Grid
  17. 17. Sauce Labs
  18. 18. What Sauce Labs Does • Cloud-hosted Selenium for: • Speed—run tests in parallel • Pain-free infrastructure (test infrastructure is notoriously fussy, fiddly due to accelerating Browser numbers and version pace, security patches etc.) • Higher availability, repeatability • Value-added (enhanced, certified) distros: • Sauce RC (Selenium RC (remote control)) • Sauce IDE (Selenium IDE) • Commercial Support for Selenium
  19. 19. !"#$ %&&'())***+,-#./"+.01)'%0&02)$345)678 Sauce OnDemand (just like Grid)
  20. 20. Demo!
  21. 21. How to Avoid Selenium Poisoning
  22. 22. Intent Action
  23. 23. Action • open 'www.example.com' • clickAndWait 'link=Log in' • type 'User Id', 'hugs@saucelabs.com' • type 'password', '12345678' • clickAndWait 'Log In'
  24. 24. Intent • Log in • Change password • Modify profile • Log out
  25. 25. 1.Write intent. 2. Map to actions.
  26. 26. Seek higher level abstractions
  27. 27. Hudson Ant/NAnt xUnit Selenium
  28. 28. Hudson Ant/NAnt xUnit Business Specific Library Selenium
  29. 29. Page Object Model
  30. 30. Google:“Selenium Page Objects”
  31. 31. Start small
  32. 32. It’ll get big anyway
  33. 33. What to start with? • Smoke tests • “Money path” • New features
  34. 34. Benefits of Short Tests • Easier to read • Easier to write • Easier to debug/maintain • Easier to parallelize
  35. 35. Selenium 2?
  36. 36. • Native Keyboard & Mouse Events • Same Origin Policy / XSS / HTTP(S) • Pop-ups, dialogs – Basic Authentication – Self-signed certificates – File upload/download Better Control
  37. 37. • WebDriver Object • WebElement Objects Cleaner API
  38. 38. Python, Ruby, Java, C#, or Perl Test Script HTTP Your Awesome Web App Selenium RC Server HTTP HTTP Selenium Remote Control
  39. 39. Python, Ruby, Java, C#, or Perl Test Script HTTP Your Awesome Web App Selenium RC Server HTTP HTTP Selenium 2
  40. 40. Python, Ruby, Java, C#, or Perl Test Script Your Awesome Web App HTTP HTTP
  41. 41. Python, Ruby, Java, C#, or Perl Test Script Your Awesome Web App C/C++ HTTP
  42. 42. But... Java... Is... Still... In...There... Python, Ruby, Java, C#, or Perl Test Script HTTP Your Awesome Web App Selenium Grid HTTP HTTP
  43. 43. But... Java... Is... Still... In...There... Python, Ruby, Java, C#, or Perl Test Script HTTP Selenium Remote Server HTTP HTTP Ye Ol' Internet (Sauce Labs) ... but now only when you need it.
  44. 44. Q&A

×