Selenium conference 2012 - One Step At A Time


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • - Brief introduction & touch upon agenda.
  • - Thank Camelot, Bernie, Alan, Team & Komal- Image reference
  • Start simple and small steps towards improvements based on our current knowledge.Improvements and increased knowledge will expose new limitationsEvolution is in respond to changeSet expectation – will start from IDE and move to a decent framework by taking one step at a time.Image from
  • - Problem statement
  • Selenium IDERecord & PlaybackInstant gratificationBut important to understand it’s limitations and move on.
  • Export processExplain Script / benefits and ease of exporting scriptxUnit – how it’s used by WebDriverLimitations
  • Slightly modified and improved scriptCan perform thorough checks such as DB checks, network checks etcGenerate unique names
  • Explain tight coupling & it’s problems in the existing script.Coupling makes everything complicated as everything depends on everything
  • Benefits of decouplingIndividual parts are easier to manage and changeFaster development – changes are containedAbstraction – manage complexityStep towards more readable, maintainable test
  • Decouple physical world - Page ObjectsChanges in IDs will not affect the test now
  • Test still aware of page and so real implementation.Abstraction not at right level – registration is pretty much exposed and will be copy pasted Explain annotations & factory method
  • Intelligent page object - Registration logic is now moved to the page objectProblemsTest is aware of the appTest should be at the conceptual levelDependencies should be avoided from both directions.
  • - Discrete functionality or a piece of work which user can perform.User completes registrationIf there is any change in how user is registered on site – test will still remain the same.What if we decide to add more fields for user?
  • Be aware of data and convert it into domain when make sense.Benefits of domain objectExplain problems
  • Final test scriptClose to businessChanges and how they will be contained @ specific places and how test will remain intact.
  • Conceptual model of app, work and interfaceBig picture – what problem app is solving, who are the actors – help in modelling and refactoring
  • Questions to askHow tests are looking? Are they abstracted at the right level?What is page changes?What if feature consume or display more data then before?What if checks are enhanced / introduced?What if presentation changes?
  • ProgressTests which were aware of low level details on the page & registration process toHigher level tests which are aware of business domainWork and Checks are abstractedI know everything – sign of a bad code.Image from -
  • Selenium conference 2012 - One Step At A Time

    1. 1. One Step At A Time Anand Ramdeo @testinggeek
    2. 2. Firefox Plugin Sequential easy to install execution Record & Not easy to Playback data drive Easy execution No Basic Programming constructs Help @ Hand Can not go beyond pages Export asWebDriver Script Crawling is fun but weExcellent First Step don’t crawl anymore
    3. 3. Power of xUnitDifferent FrameworkBrowsers Java, C#,Python, Ruby etc Step in right direction - but miles to go..
    4. 4. Clear is hiddenGuaranteed Username Checks are hidden
    5. 5. MaintainableReadable Difficult to Progress
    6. 6. DecouplingSeparation of concerns Abstraction Less friction, More development
    7. 7. Page insteadof elements
    8. 8. One place to find elementsPage Initializes everythingFunctions applicable on elements are exposed by page
    9. 9. Intelligent Page Objects
    10. 10. What needs to be Done?Test has no knowledge of physical implementation
    11. 11. Data to Domain
    12. 12. Actor Performs WorkAdd Behaviour to Domain Object Check Results
    13. 13. App solves Test proves the problem That problem is solved Problem Test proves App allows Solved by performing that actor canactors to work work perform work On some interface
    14. 14. Value Enhancer
    15. 15. Anand Ramdeo @testinggeek
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.