Selenium conference 2012 - One Step At A Time

  • 1,587 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,587
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
24
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • - Brief introduction & touch upon agenda.
  • - Thank Camelot, Bernie, Alan, Team & Komal- Image reference http://thenextweb.com/shareables/2012/03/04/geek-love-10-reasons-to-date-a-geek/
  • 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 http://grunty.files.wordpress.com/2010/08/human-evolution-21c.jpg
  • - 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?http://www.gembapantarei.com/2009/04/12_leader_standard_work_questions_to_ask_on_the_ge.html
  • 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 - http://www.sodahead.com/fun/makes-everything-easy-for-dummies-have-you-ever-used-one-of-the-books-from-the-for-dummies-series/question-2162751/?link=ibaf&q=i+know+everything&imgurl=http://images.sodahead.com/polls/002162751/4452224133_I_know_everything_answer_2_xlarge.jpeg
  • http://uncyclopedia.wikia.com/wiki/File:I-dont-care.jpg

Transcript

  • 1. One Step At A Time Anand Ramdeo @testinggeek
  • 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. Power of xUnitDifferent FrameworkBrowsers Java, C#,Python, Ruby etc Step in right direction - but miles to go..
  • 4. Clear is hiddenGuaranteed Username Checks are hidden
  • 5. MaintainableReadable Difficult to Progress
  • 6. DecouplingSeparation of concerns Abstraction Less friction, More development
  • 7. Page insteadof elements
  • 8. One place to find elementsPage Initializes everythingFunctions applicable on elements are exposed by page
  • 9. Intelligent Page Objects
  • 10. What needs to be Done?Test has no knowledge of physical implementation
  • 11. Data to Domain
  • 12. Actor Performs WorkAdd Behaviour to Domain Object Check Results
  • 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. Value Enhancer
  • 15. Anand Ramdeo @testinggeek