29-01-2011Selenium Learning Ruturaj 1.01
2Selenium Learning Ruturaj 1.029-01-2011Knowledge is free, it’s the experience which make’s it priceless - Ruturaj
3Selenium Learning Ruturaj 1.029-01-2011
4Selenium Learning Ruturaj 1.029-01-2011
Selenium @ Work“Smarter ways of doing  Selenium Automation”Ruturajhttp://ruturajd.blogspot.comMake Technology available for masses, to bottom of pyramid, you will see how life will change after this !
ObjectiveTake away Thought’s from talkFunctional Test automation views, expectations and preparation. Understanding Selenium offering.Pointers towards basic  for  Test automation for tester to start automation.Learning what not to do in Test automation. Selenium RC Automation Framework what’s  generic what’s specific.6Selenium Learning Ruturaj 1.029-01-2011
Context Driven LearningDisclaimer – These are my views based on my experience, hence think of background(Context) before using them directly.Context DrivenSelenium LearningOne Size Doesn’t Fit All.7Selenium Learning Ruturaj 1.029-01-2011
Functional Test AutomationBackground ,views ,Thought process, Expectation
Automation from different PerspectiveProduct Managers/Test Manager Perspective.Automation must for ‘Early cycle Testing ‘ in Agile/Iterative development.Accuracy of verification in Automated ‘test cases’ is important as They would be fully replaced by “automated test script”. Can’t afford if tester/automation engineers makes ‘any mistake’.9Selenium Learning Ruturaj 1.029-01-2011
Tester’s perspective – Bugs in Testers approach for technologyLazy, ‘why should I Change’ Approach.Tester’s are less adaptive to technologies(less agile*).After Realizing mistake, feeling of ‘missed the bus of opportunity’.Black Box Testing  –  a mystery for me.Big time missing = = Technical tester.10Selenium Learning Ruturaj 1.029-01-2011
Tester’s perspective – what can be done better(Ideally !) Gel Well with Developers until you learn technology, if not at least learn Technology on your own.Understand What people do when they automate(that’s Montessori). How to automate(as per me) is PH. D  .Learn basics of Web technology – HTML, java script, how browser works, what goes underline when we click something ?11Selenium Learning Ruturaj 1.029-01-2011
Defining What to automate, what not to, when to automate.Automation Test Strategy / Automation Plan – only if its updated as per execution cycle.Selenium is one of the better tool I come across to automate web application(flow in website’s). Gradual approach to automation, do it in bits and pieces, do it perfect, gradually build it up.Experienced Tester must do automation or something in Non functional Requirement Testing (E.g. Security testing, Usability, Performance, …)12Selenium Learning Ruturaj 1.029-01-2011
Selenium for Functional Test Automation(Web Apps)
Selenium Learning Pyramid14Selenium Learning Ruturaj 1.029-01-2011
What you can automate using Selenium (Learning 0.1.0)Selenium - functional testing tool for web based application.Multi Browser support.
 Support to write test cases in many OO languages(java, C#, Perl, Python, Ruby).
Simple API/functions for interaction with HTML Elements.
 Easy to use Selenium IDE(recorder) for those  who want to start automation, just for Start. 15Selenium Learning Ruturaj 1.029-01-2011
Selenium Offering – what do we have to consume ;)Selenium Core Selenese languages(looks very similar to html).
 Selenium is bundled with  all further offering like IDE, RC, Grid.Selenium IDE (Recorderfor Firefox).Selenium RC  (allow you to run test written in programming language to run from anywhere.)Selenium Grid (Multiple RC server running on same/different machine for parallel test run.)16Selenium Learning Ruturaj 1.029-01-2011
Simple Selenium Core Action17Selenium Learning Ruturaj 1.029-01-2011
Selenium Core ReferencesWhat not to do with while starting with Selenium Core.Trying to automate website which is not following Same origin policy.http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ18Selenium Learning Ruturaj 1.029-01-2011
Selenium IDE- Recorder for FirefoxFirefox  plug-in for easy record and playback of tests.Intelligent field selection will use IDs, names, or XPath as neededHelpful for simple HTML script development and execution(provides auto complete for common Selenium commands, debugging test execution , addition of custom extension) Save tests as HTML scripts, or any other language script.Option to automatically assert the title of every page19Selenium Learning Ruturaj 1.029-01-2011
20Selenium Learning Ruturaj 1.029-01-2011
Selenium IDE- LimitationsRecord and playback of IDE tests is possible only on fire fox browser.Selenium IDE can execute script created in Selenese (HTML like) only.It’s difficult to use Selenium IDE for checking complex test cases involving dynamic contents.No direct support for condition statements, iteration, error handling, particularly unexpected errors, test case grouping,Execution report not customizable to more extent.21Selenium Learning Ruturaj 1.029-01-2011
Where/When to use IDE then ?Selenium IDE is best suited for simple happy path verification with least time to test script development.To make Tester’s life easier - faster sanity check, regression verification provided test script you have recorded have enough valid verification’s. In Agile team for quick and dirty automation(to start with..).22Selenium Learning Ruturaj 1.029-01-2011
SeleniumRemoteControlA proxy server written in java, which automatically launches and kills browsers.Allows to write test code in your favorite languageJavaPython C# (.NET )RubyPerlMulti browser support by providing browser mode as *iehta, *firefox or *chrome in selenium object initialization. Selenium RC supports HTTP and HTTPS based sites.23Selenium Learning Ruturaj 1.029-01-2011
Selenium RC Through my eye’s(Architecture)24Selenium Learning Ruturaj 1.029-01-2011
Selenium RC SetupDownload the latest version of Selenium RC jar.Selenium RC gives freedom to run test/suites from your own machine by starting Selenium server on your machine.Start Selenium Server(open command prompt, go to directory where selenium-server.jar exist, type in below command.java -jar selenium-server.jar25Selenium Learning Ruturaj 1.029-01-2011
Selenium RC setup 2Download the selenium-client driver, add the jar to your automation project’s library folder.Your automation project should have a base class where selenium object is to be initiated.Eg. There are various ways in which you can get selenium object initialized, but its nice to do in common place.selenium = new DefaultSelenium(“localhost”, “4444″, “*firefox”, “http://www.google.com/”);26Selenium Learning Ruturaj 1.029-01-2011
Choosing right ingredients27Selenium Learning Ruturaj 1.029-01-2011
Language for Selenium automation, Owners of Script maintenanceThumb rule – Use same language as that of application development language.Also Keep in mind skill set possessed by team whose going to work on it(QA’s – Test Developers).Define owners for test script maintenance, in shorter teams,  developer’s owns  acceptance test script, QA’s own regression suites.28Selenium Learning Ruturaj 1.029-01-2011
Problems I faced using Selenium	When there were Ajax request/responses everywhere on page, writing custom waitFor method was painful.Few API doesn’t work on specific version of IE/FFX.Slowness of IE test execution due to wrong usages of locators.Working on element involving recursive java script calls on ‘onClick’ event.29Selenium Learning Ruturaj 1.029-01-2011

Smarter ways to do selenium automation @ work, Selenium, automation

  • 1.
  • 2.
    2Selenium Learning Ruturaj1.029-01-2011Knowledge is free, it’s the experience which make’s it priceless - Ruturaj
  • 3.
  • 4.
  • 5.
    Selenium @ Work“Smarterways of doing Selenium Automation”Ruturajhttp://ruturajd.blogspot.comMake Technology available for masses, to bottom of pyramid, you will see how life will change after this !
  • 6.
    ObjectiveTake away Thought’sfrom talkFunctional Test automation views, expectations and preparation. Understanding Selenium offering.Pointers towards basic for Test automation for tester to start automation.Learning what not to do in Test automation. Selenium RC Automation Framework what’s generic what’s specific.6Selenium Learning Ruturaj 1.029-01-2011
  • 7.
    Context Driven LearningDisclaimer– These are my views based on my experience, hence think of background(Context) before using them directly.Context DrivenSelenium LearningOne Size Doesn’t Fit All.7Selenium Learning Ruturaj 1.029-01-2011
  • 8.
    Functional Test AutomationBackground,views ,Thought process, Expectation
  • 9.
    Automation from differentPerspectiveProduct Managers/Test Manager Perspective.Automation must for ‘Early cycle Testing ‘ in Agile/Iterative development.Accuracy of verification in Automated ‘test cases’ is important as They would be fully replaced by “automated test script”. Can’t afford if tester/automation engineers makes ‘any mistake’.9Selenium Learning Ruturaj 1.029-01-2011
  • 10.
    Tester’s perspective –Bugs in Testers approach for technologyLazy, ‘why should I Change’ Approach.Tester’s are less adaptive to technologies(less agile*).After Realizing mistake, feeling of ‘missed the bus of opportunity’.Black Box Testing – a mystery for me.Big time missing = = Technical tester.10Selenium Learning Ruturaj 1.029-01-2011
  • 11.
    Tester’s perspective –what can be done better(Ideally !) Gel Well with Developers until you learn technology, if not at least learn Technology on your own.Understand What people do when they automate(that’s Montessori). How to automate(as per me) is PH. D .Learn basics of Web technology – HTML, java script, how browser works, what goes underline when we click something ?11Selenium Learning Ruturaj 1.029-01-2011
  • 12.
    Defining What toautomate, what not to, when to automate.Automation Test Strategy / Automation Plan – only if its updated as per execution cycle.Selenium is one of the better tool I come across to automate web application(flow in website’s). Gradual approach to automation, do it in bits and pieces, do it perfect, gradually build it up.Experienced Tester must do automation or something in Non functional Requirement Testing (E.g. Security testing, Usability, Performance, …)12Selenium Learning Ruturaj 1.029-01-2011
  • 13.
    Selenium for FunctionalTest Automation(Web Apps)
  • 14.
    Selenium Learning Pyramid14SeleniumLearning Ruturaj 1.029-01-2011
  • 15.
    What you canautomate using Selenium (Learning 0.1.0)Selenium - functional testing tool for web based application.Multi Browser support.
  • 16.
    Support towrite test cases in many OO languages(java, C#, Perl, Python, Ruby).
  • 17.
    Simple API/functions forinteraction with HTML Elements.
  • 18.
    Easy touse Selenium IDE(recorder) for those who want to start automation, just for Start. 15Selenium Learning Ruturaj 1.029-01-2011
  • 19.
    Selenium Offering –what do we have to consume ;)Selenium Core Selenese languages(looks very similar to html).
  • 20.
    Selenium isbundled with all further offering like IDE, RC, Grid.Selenium IDE (Recorderfor Firefox).Selenium RC (allow you to run test written in programming language to run from anywhere.)Selenium Grid (Multiple RC server running on same/different machine for parallel test run.)16Selenium Learning Ruturaj 1.029-01-2011
  • 21.
    Simple Selenium CoreAction17Selenium Learning Ruturaj 1.029-01-2011
  • 22.
    Selenium Core ReferencesWhatnot to do with while starting with Selenium Core.Trying to automate website which is not following Same origin policy.http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ18Selenium Learning Ruturaj 1.029-01-2011
  • 23.
    Selenium IDE- Recorderfor FirefoxFirefox plug-in for easy record and playback of tests.Intelligent field selection will use IDs, names, or XPath as neededHelpful for simple HTML script development and execution(provides auto complete for common Selenium commands, debugging test execution , addition of custom extension) Save tests as HTML scripts, or any other language script.Option to automatically assert the title of every page19Selenium Learning Ruturaj 1.029-01-2011
  • 24.
  • 25.
    Selenium IDE- LimitationsRecordand playback of IDE tests is possible only on fire fox browser.Selenium IDE can execute script created in Selenese (HTML like) only.It’s difficult to use Selenium IDE for checking complex test cases involving dynamic contents.No direct support for condition statements, iteration, error handling, particularly unexpected errors, test case grouping,Execution report not customizable to more extent.21Selenium Learning Ruturaj 1.029-01-2011
  • 26.
    Where/When to useIDE then ?Selenium IDE is best suited for simple happy path verification with least time to test script development.To make Tester’s life easier - faster sanity check, regression verification provided test script you have recorded have enough valid verification’s. In Agile team for quick and dirty automation(to start with..).22Selenium Learning Ruturaj 1.029-01-2011
  • 27.
    SeleniumRemoteControlA proxy serverwritten in java, which automatically launches and kills browsers.Allows to write test code in your favorite languageJavaPython C# (.NET )RubyPerlMulti browser support by providing browser mode as *iehta, *firefox or *chrome in selenium object initialization. Selenium RC supports HTTP and HTTPS based sites.23Selenium Learning Ruturaj 1.029-01-2011
  • 28.
    Selenium RC Throughmy eye’s(Architecture)24Selenium Learning Ruturaj 1.029-01-2011
  • 29.
    Selenium RC SetupDownloadthe latest version of Selenium RC jar.Selenium RC gives freedom to run test/suites from your own machine by starting Selenium server on your machine.Start Selenium Server(open command prompt, go to directory where selenium-server.jar exist, type in below command.java -jar selenium-server.jar25Selenium Learning Ruturaj 1.029-01-2011
  • 30.
    Selenium RC setup2Download the selenium-client driver, add the jar to your automation project’s library folder.Your automation project should have a base class where selenium object is to be initiated.Eg. There are various ways in which you can get selenium object initialized, but its nice to do in common place.selenium = new DefaultSelenium(“localhost”, “4444″, “*firefox”, “http://www.google.com/”);26Selenium Learning Ruturaj 1.029-01-2011
  • 31.
    Choosing right ingredients27SeleniumLearning Ruturaj 1.029-01-2011
  • 32.
    Language for Seleniumautomation, Owners of Script maintenanceThumb rule – Use same language as that of application development language.Also Keep in mind skill set possessed by team whose going to work on it(QA’s – Test Developers).Define owners for test script maintenance, in shorter teams, developer’s owns acceptance test script, QA’s own regression suites.28Selenium Learning Ruturaj 1.029-01-2011
  • 33.
    Problems I facedusing Selenium When there were Ajax request/responses everywhere on page, writing custom waitFor method was painful.Few API doesn’t work on specific version of IE/FFX.Slowness of IE test execution due to wrong usages of locators.Working on element involving recursive java script calls on ‘onClick’ event.29Selenium Learning Ruturaj 1.029-01-2011

Editor's Notes

  • #3 Knowledge is free, it’s the experience which is priceless !I am here to share with you facts/experience of mine discovering Selenium Test Automation.
  • #4 My inspiration, reason why I am here.
  • #5 Introduction about myselfRuturaj – explored 6 yrs of Technical testing , worked on Agile models using XP/Scrum.Worked on Product testing like embedded, E-commerce, SAAS based ERP applications. Picture represent different stages of my life, current one being top left.
  • #6 I wish to reduce pain of every one who wish to learn functional test automation, hence Selenium automation in better way.
  • #7 Here to share facts – answer to question – ‘What’ is automation, ‘How’ to automate.FTA = Views , expectation from different roles in project.Selenium offering = Core, IDE, RC.Basics of Test automation.Learning from classic mistakes of test automation.Blue print of Selenium RC Test Automation framework.
  • #8 Selenium automation is self exploration activity,There are no exact standards,Hence thoughts expressed here are just one of the better ways of doing things.
  • #9 FTA in our context - In Short Automating functionality provided by Web application.I am trying to define ‘What’ it means when we do functional Test automation, so defining ‘What’.B – Agile/iterative/faster software development, hence tester role is far more critical in verifying software works.Multitasking – communication bridge, software police, Test coder, domain expert in team.Why Automation – quick, accurate, precise feedback for software development.
  • #10 A - Fastest feedback for Agile development.B – If test verifications are not dynamic, they are of lesser use for feedback for development.C – Wrong Philosophy = ‘Test code written should have minimal bugs(practically zero)’
  • #11 L Change is persistent nothing else !Its never too late for anything good, positive, changeable.Soul Tester is negative which is fine(Its in genes !), but They are not agile*. They are aware of technology, but they are not ‘on’ to it !BBT - Applying cream from outside to cure internal disease.BTM –Logical tester with in depth Technical skills.
  • #13 Automation Test Strategy / Automation Plan – only if its updated as per execution cycle.
  • #14 Selenium for functional or system testing of web applications. These tests are also sometimes called acceptance, customer, or integration tests.Selenium is not meant for unit testing
  • #18 Issues with Selenium Core
  • #20 Selenium IDEWalk through testsDebug and set breakpointsSave test in .java, .py filesSupport for Selenium user-extensions.js file
  • #22 Selenium IDEWalk through testsDebug and set breakpointsSave test in .java, .py filesSupport for Selenium user-extensions.js file
  • #24 Selenium IDEWalk through testsDebug and set breakpointsSave test in .java, .py filesSupport for Selenium user-extensions.js file