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 at STPCon - Dallas 2011

11,009 views

Published on

Selenium is the most popular open-source tool for acceptance testing dynamic web applications. In Selenium 2.0, the Selenium project merged with the WebDriver project. This session will explain the benefits of Selenium 2.0's technology and go into detail on what is and is not changing. If you like browser test automation, you'll enjoy what's cooking in Selenium 2.0.

Selenium was originally created by Jason Huggins and his team at ThoughtWorks in 2004 as a tool for cross-browser acceptance testing of dynamic web apps -- apps that use JavaScript heavily on the client. Over the years, the Selenium tool family has expanded to include a Firefox record and playback tool (Selenium IDE), a Remote Control server that allows API access from any major programming language, and a grid server that allows tests to run in parallel across many machines.

Despite it's widespread industry adoption, the Selenium project is far from done. Selenium's goal is to drive any browser the same way an end user would (e.g. opening pages, clicking buttons, entering text, etc.) with any programming language on any OS platform. It's an ambitious goal, and with a steady stream of new browsers (Chrome), new platforms (Android, iPhone), and new HTML5 technologies (video, canvas, offline storage) to support, just keeping up is an arduous task.

This session will also cover trends in testing and test automation, and how Selenium fits into the bigger project management picture. Specific guidance will be given on how to determine what should be tested with Selenium and how to deal with the problem of brittle, expensive-to-maintain Selenium tests.

Oh, and robots. The talk will have robots.

Published in: Technology
  • Login to see the comments

Selenium at STPCon - Dallas 2011

  1. 1. Selenium 2 Jason HugginsCo-creator, The Selenium ProjectCo-founder, CTO, Sauce Labs Inc twitter: @hugs email: hugs@saucelabs.com
  2. 2. Heckle me on Twitter:@hugs
  3. 3. Agenda• Numbers• Selenium 1• Selenium 2• How to avoid Selenium poisoning• The Future of Testing - Part 1• The Future of Testing - Part 2
  4. 4. How do you measure market share?
  5. 5. 3300
  6. 6. 2969
  7. 7. #1!
  8. 8. 51%
  9. 9. Percent of Fortune 150 with Selenium experience Source:
  10. 10. Past the Tipping Point Bran d X Sele nium
  11. 11. What is Selenium? = +
  12. 12. The Problem
  13. 13. Selenium IDE for Firefox
  14. 14. !"#$%"&$(%)$* 16 +%%,-..///01*234)03$#.,+$%$5.23"6$(".789:;8<=:
  15. 15. Selenium Remote Control Selenium RC Server Python, Ruby, Your AwesomeJava, C#, or Perl HTTP HTTP HTTP Web App Test Script
  16. 16. Example Selenium RC Test - Java
  17. 17. Example Selenium RC Test - C#
  18. 18. !"#$Selenium Grid %&&())***+,-#./"+.01)%0&02)$345)678
  19. 19. Servers Time Unit of Work
  20. 20. Servers Time Unit of Work
  21. 21. Sauce Labs
  22. 22. Selenium 2: Why and What
  23. 23. Builder (new!)
  24. 24. The Pareto Principle
  25. 25. AKA (“The Pacman Problem”) Selenium 1 Selenium 2
  26. 26. Solving the last 20%• Native keyboard & mouse events• Same Origin Policy / XSS / HTTP(S)• Pop-ups, dialogs – Basic Authentication – Self-signed certi cates – File upload/download
  27. 27. Mobile
  28. 28. Types of Mobile Testing• Emulator• Real device (tethered to workstation)• Real device in a real location on a real network
  29. 29. Native vs Web
  30. 30. Life before the WebTotal Application Market
  31. 31. Yesterday JS+HTMLTotal Application Market
  32. 32. Today JS+HTML5Total Application Market
  33. 33. Today Selenium lives here! JS+HTML5Total Application Market
  34. 34. Today Selenium lives here! JS+HTML5Total Application Market
  35. 35. Tomorrow Selenium lives here! JS+HTML5Total Application Market
  36. 36. But, wait!
  37. 37. Tomorrow Selenium lives here! JS+HTML5 Selenium lives here, too!Total Application Market
  38. 38. code.google.com/p/nativedriver
  39. 39. “NativeDriver is an implementation of theWebDriver API which drives of the UI of a native application rather than a web application.”
  40. 40. Native app testing!• Android - Usable!• iOS - Usable!• Windows - Experimental!
  41. 41. Cleaner API• WebDriver Object• WebElement Objects
  42. 42. Other Bene ts• Improved architecture• Removing road-blocks, hacks, and workarounds• Scales down (more developer friendly) experience
  43. 43. Selenium Remote Control Selenium RC Server Python, Ruby, Your AwesomeJava, C#, or Perl HTTP HTTP HTTP Web App Test Script
  44. 44. Selenium 2 Selenium RC Server Python, Ruby, Your AwesomeJava, C#, or Perl HTTP HTTP HTTP Web App Test Script
  45. 45. Python, Ruby, Your AwesomeJava, C#, or Perl HTTP HTTP Web App Test Script
  46. 46. Python, Ruby, Your AwesomeJava, C#, or Perl C/C++ HTTP Web App Test Script
  47. 47. Running a server is now optional! Selenium Grid Python, Ruby, Your AwesomeJava, C#, or Perl HTTP HTTP HTTP Web App Test Script
  48. 48. Demo!
  49. 49. How to AvoidSelenium Poisoning
  50. 50. Intent Action
  51. 51. Action• open www.example.com• clickAndWait link=Log in• type User Id, hugs@saucelabs.com• type password, 12345678• clickAndWait Log In
  52. 52. Intent• Log in• Change password• Modify profile• Log out
  53. 53. 1. Write intent.2. Map to actions.
  54. 54. Seek higher level abstractions
  55. 55. JenkinsAnt/NAnt xUnitSelenium
  56. 56. Jenkins Ant/NAnt xUnitBusiness Specific Library Selenium
  57. 57. Page Object Model
  58. 58. Search: “Selenium Page Objects”
  59. 59. Start small
  60. 60. It’ll get big anyway
  61. 61. Problems with Testing (UI)
  62. 62. Brittle!
  63. 63. Expensive!
  64. 64. How to Think about Testing
  65. 65. Risk Time
  66. 66. How to Think about Testing (Part 2)
  67. 67. “The prime goal of the new economy is to undo -- company by company, industry by industry -- the industrial economy.”
  68. 68. “ADD”
  69. 69. “ADD”Analytics Driven Development
  70. 70. Science Fiction?
  71. 71. analytics.blogspot.com/2011/10/introducing-flow-visualization.html
  72. 72. Visitor Flow
  73. 73. Use production analytics to measure(or create!) your test suite
  74. 74. One more thing...
  75. 75. Robots!
  76. 76. bitbeam.org
  77. 77. BitbeamBotThe Selenium-Powered Angry-Birds Playing Functional Testing Robot
  78. 78. What?• A computer-controlled (CNC) robot for testing applications on mobile devices• Open Source components: - Electronics: Arduino - Mechanics: Bitbeam - Lego Technic compatible building toy - Made from Basswood - Designed with 3D tool OpenSCAD - Lasercut at TechShop San Francisco - Software: Python, Selenium
  79. 79. Why?• Selenium is a software-based robot.• Selenium’s mission is to mimic and automate how users interact with an application.• For mobile, this means handling real devices.• BitbeamBot is an experiment to take Selenium out of the screen and into the real world.
  80. 80. No really, why?
  81. 81. The “Clicker”
  82. 82. Motorized Pin Art
  83. 83. pinthing.com
  84. 84. LinksFor More Information:✓http://saucelabs.com✓http://seleniumhq.org✓http://code.google.com/p/selenium✓http://code.google.com/p/se-builder/✓https://addons.mozilla.org/en-US/ refox/addon/se-builder✓http://code.google.com/p/nativedriver✓http://twitter.com/hugs✓http://bitbeam.org✓http://pinthing.com✓http://analytics.blogspot.com/2011/10/introducing- ow-visualization.htmlDemo:✓Android: http://www.youtube.com/watch?v=IUUcEIfkOEY✓Bitbeambot #1: http://www.youtube.com/watch?v=NoOdrf0kt9I✓Bitbeambot #2: http://www.youtube.com/watch?v=x2e73HraePYAndroid Demo Code:✓http://gist.github.com/830011
  85. 85. Thanks! Jason HugginsCo-creator, The Selenium ProjectCo-founder, CTO, Sauce Labs Inc twitter: @hugs email: hugs@saucelabs.com

×