Selenium: past - present - future


Published on

Past - Present - Future
by Daniel Anjos -

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • I'm Daniel Anjos, a Web Tester in Aqris In this short talk, we will see a little of - what is Selenium - Past (what problems selenium came to solve) - Present (problems of today, problems of selenium) - Future (problems of tomorrow, Selenium 2.0)
  • Selenium is a Open Source suite of tools to automate web app testing across many platforms, Created in 2004 by Jason Huggins Goal: testing tool that can test JavaScript UI features in all browsers on all platforms - Selenium Core is pure DHTML/JavaScript that controls your browser - Selenium IDE is a Firefox add-on that makes it easy to record and playback tests in Firefox. You can even use it generate code to run the tests with Selenium Remote Control - Selenium RC is a client/server system that allows you to control web browsers locally or on other computers, using almost any programming language and testing framework - Selenium GRID runs RC tests on many servers at the same time, cutting down on the time it takes to test multiple browsers or operating systems.
  • Don't worry if you got lost. The basic is: - Selenium core is the javascript that controls your browser (under the hood) - Selenium IDE is the Firefox plugin (image on left) - Selenium RC is a tool to control your browser with a programming language (right) - Selenium GRID is just like RC, but running tests in parallel (at same time)
  • These are some of the companies that adopted Selenium (on some extent) Google and ThoughtWorks also contributes to the OS code improving the tool
  • Let's make a brief overview of the history of Web Frameworks: Before the year 2000, everything was more simple. Simple server-side architecture (Perl, ASP , PHP …) Only 2 main browsers
  • From 2000 – 2003, you have - more Internet browsers (Opera, Safari, Firefox 2004) - DHTML / Javascript to make Rich Client – Interactive Web Pages - Very different javascript support from browsers
  • The problems that Selenium came to solve (2004) for Web Development: - Web 1.0 = Very different support of HTML / Javascript - Multiple OS compatibility - Multiple Browser Compatibility - Testers want to use different languages to automate tests
  • To tackle this problems with Selenium, you can start by using the Selenium IDE to practice, record the test structure, replay and modify it.
  • As you feel confident, you may move to Selenium RC with a programming language As the test base grows, use refactoring to improve test readability. After some time, some problems appear with this approach: - Code inconsistency (Helpers/Selenium) - Duplication - Hard to change / maintain
  • Going forward in time, you can see - Increase of web frameworks - Adoption of Javascript (AJAX) - Development of Rich Internet Applications (RIA) - Development of Rapid Application Development (RAD)
  • Today the web is composed of many different frameworks, with many browsers for many different versions of OS. This is a much more complex scenario
  • So, what changed since 2004? What are the problems we face today? - Web 2.0 - Adoption of AJAX
  • Also, different development methodologies since the Agile Manifesto (2001): - XP, Scrum, Kanban, Lean... - Fast changes
  • Today, there are several strategies to cope with this problems using selenium: - Good automated test structure (Java or any other language) - Page Object Design Pattern For more on page objects, see:!
  • Selenium has its limits, and its problems, as any tool. - Poor interaction with dialogs (alerts) - Basic authentication is enforced in dialogs in modern browsers - Complex AJAX - Handling Browser crashes This problems come from the basic architecture of selenium (Javascript)
  • There are also some new problems that we will have to handle soon: - Rich Internet Applications written in HTML5 / Adobe Flex / Silverlight or JavaFX - Cloud computing (Amazon, Google, …) - New platforms: Mobile, Netbooks, TVs, Video Games,
  • From the version 2.0, WebDriver and Selenium are merging. Webdriver addresses some shortcomings in selenium (by being able to bypass the JS sandbox, for example. And we’ve got a gorgeous API), Selenium addresses some shortcomings in webdriver (such as supporting a broader range of browsers) You should investigate webdriver: * Mult-browser testing (functionality for browsers not well-supported by Selenium 1) * Handling multiple frames, multiple browser windows, popups, and alerts. * Page navigation * Drag-and-drop * AJAX-based UI elements
  • Still, there always will be problems that the tools cannot solve. What should be automated? Bugs / Features / Main Path / Corner cases When to stop automating? How much is enough? Who writes the automated tests, developers or testers? For whom are the automated tests? QA team, Business representative (acceptance)
  • Thank You Any questions?
  • The sources of some of the works included in this talk, and some other good sources too
  • Selenium: past - present - future

    1. 1. Selenium Past - Present - Future Daniel Anjos -
    2. 2. What is Selenium Selenium IDE Selenium RC Selenium GRID Selenium Core
    3. 3. Selenium Architecture
    4. 4. Who uses Selenium
    5. 5. Web Frameworks Timeline
    6. 6. Web Frameworks Timeline
    7. 7. Web Frameworks Timeline
    8. 8. Past Problems
    9. 9. Selenium - Beginning
    10. 10. Selenium - Beginning
    11. 11. Web Frameworks Timeline
    12. 12. Web Frameworks Timeline
    13. 13. Web Frameworks Timeline
    14. 14. Present Problems
    15. 15. Present Problems SCRUM XP
    16. 16. Selenium - Today
    17. 17. Selenium Problems <ul><li>Dialog (alert) interaction </li></ul><ul><li>Basic Authentication </li></ul><ul><li>File upload / download </li></ul><ul><li>Complex AJAX </li></ul><ul><li>Timing problems </li></ul><ul><li>Slow response </li></ul><ul><li>Reporting </li></ul><ul><li>... </li></ul>
    18. 18. Future Problems
    19. 19. Selenium Tomorrow <ul><li>Selenium 2.0 </li></ul><ul><li>(Selenium + WebDriver) </li></ul><ul><li>Drivers: HtmlUnit / Firefox / Internet Explorer / Chrome </li></ul><ul><li>Selenium 2.0a4 </li></ul><ul><li>(May, 2010) </li></ul>
    20. 20. Test Automation Problems <ul><li>- What should be automated </li></ul><ul><li>- Who write automated tests </li></ul><ul><li>- When to stop automating </li></ul><ul><li>- For who are the automated tests </li></ul>
    21. 21. <ul><li>“ Automation is a great idea. To make it a good investment, as well, the secret is to think about testing first and automation second. ” - James Bach </li></ul>
    22. 22. References <ul><li> </li></ul><ul><li>GoogleTechTalks (Youtube) </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> blog :) </li></ul>