• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Selenium
 

Selenium

on

  • 17,274 views

 

Statistics

Views

Total Views
17,274
Views on SlideShare
17,124
Embed Views
150

Actions

Likes
9
Downloads
1,043
Comments
3

6 Embeds 150

http://seleniumtool.blogspot.com 107
http://dev.acamh.io1dev.com 21
http://www.slideshare.net 16
http://seleniumtool.blogspot.in 4
http://www.seleniumtool.blogspot.com 1
http://seleniumtool.blogspot.co.uk 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • very good prsentation
    Are you sure you want to
    Your message goes here
    Processing…
  • great presentation
    Are you sure you want to
    Your message goes here
    Processing…
  • sd
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Selenium Selenium Presentation Transcript

    • Automated Web Testing with Selenium
        • Deepak Mittal
        • Dec 15, 2007
    • Agenda
      • Introduction to Selenium
      • Quick Demo
      • Different ways of using Selenium
      • Best practices with using Selenium
      • Questions & Feedback
    • Quick Poll
      • Do you do Web Testing?
      • Do you do automated Web Testing?
      • Do you need to support & test your web-app on multiple browsers?
      • Which automated web-testing frameworks do you use?
    • What is Selenium?
      • A JavaScript based
      • Open Source
      • Web testing tool
      • That supports testing Web 2.0 applications
      • On multiple browsers
      • And multiple Operating Systems
    • What is Selenium
      • Acceptance Testing tool for web-apps
      • Tests run directly in browser
      • Implemented entirely using browser technologies -
          • JavaScript
          • DHTML
          • Frames
    • Origins of Selenium
      • Developed by ThoughtWorks to test new time and expenses system
      • Selenium is the key mineral to protect body from mercury toxicity
      • http://www.openqa.org/selenium
    • Selenium Modes
      • Test Runner Mode
          • test cases in HTML tables
      • Record-Playback mode (Selenium IDE)‏
      • Selenium Remote Control (RC) Mode
          • test-cases in your language of choice
    • Selenium Modes
      • Test Runner Mode
          • test cases in HTML tables
      • Record-Playback mode (Selenium IDE)‏
      • Selenium Remote Control (RC) Mode
          • test-cases in your language of choice
    • Test Runner Mode
    • Selenium HTML Tests
      • Selenium tests are HTML files
      • Selenium interacts with the DOM served to browser
      • Selenium is agnostic of server side technology
      • Selenium HTML language is called Selenese
    • Selenese
      • Selenium declarative DSL : Selenese
      • Selenium understands two types of HTML files (which have simple HTML tables):
            • Tests
            • Test Suites
      • Every test is contained within a test suite
      • Point TestRunner.html at the test suite to run it
    • Format of a Selenium Test
      • HTML Table with 3 columns
            • First Column: Selenium command
            • Second Column: Target of command
            • Third Column: Optional parameter
    • Selenium Concepts
      • Element Locators : specify HTML elements
      • Patterns : for pattern matching values
      • Action : manipulate app state
      • Accessors : store results in variables
      • Assertion : verify that the app is in a certain state
    • Test Runner Demo
      • See Demo suite
      • Look at tests bundled with Selenium
      • Running selenium test in slow and fast mode
    • Problems with HTML Tests
      • Selenium is sensitive to the format of the table
      • No separation of concern
      • Duplication is a major issue
      • Tests need to be deployed with AUT (Application under Test)‏
    • Selenium Modes
      • Test Runner Mode
          • test cases in HTML tables
      • Record-Playback mode (Selenium IDE)‏
      • Selenium Remote Control (RC) Mode
          • test-cases in your language of choice
    • Selenium IDE
      • Very useful tool for beginners
      • Firefox extension which allows record/play testing paradigm
      • Automates commands, but asserts must be entered by hand
      • Creates the simplest possible Locator
      • Based on Selenese
    • Selenium IDE Demo
      • Look at firefox extension
      • Look at various possible commands
      • Record a test on AUT and play-back
      • Save the test at HTML file
      • Export the test as Java / Ruby
    • Selenium Modes
      • Test Runner Mode
          • test cases in HTML tables
      • Record-Playback mode (Selenium IDE)‏
      • Selenium Remote Control (RC) Mode
          • test-cases in your language of choice
    • Selenium RC Mode
    • Selenium RC Mode Demo
      • Run selenium server
      • Look at sample tests
    • Maintaining Selenium Tests
      • Test code is just like production code
      • Needs re-factoring, abstraction
      • API for the application
      • Can build tests from API building blocks
      • Try to maintain meaning – in test names, variable names, comments, and suite organization
    • Selenium with Continuous Integration
      • Run Selenium tests as part of the build
      • Can generate HTML reports, published to entire team
      • Helps catch bugs ASAP
    • Ajax Support
      • Selenium supports testing Web 2.0 applications
      • Monitor the DOM for completion of Async calls
      • waitForCondition(script, timeout)‏
    • Useful Selenium Tools
      • Chris Pederick's Web Developer toolbar
      • XPather
      • Firebug
      • Xpath Checker
    • Selenium Best Practices
      • Use Ids wherever possible (xpaths make the tests brittle)‏
      • Use data-driven tests. Use a JSP/PHP page to generate tests
      • In order to generate unique Ids, use timestamp
      • Use the right level of granularity
    • What have we not covered?
      • Continuous Integration set-ups
      • Creating screencasts using Selenium
      • Testing of Ajax applications
      • Selenium Commands in detail
      • User Extensions
      • Using Python/Ruby/C# ...
    • Selenium Limitations
      • Slow when testing all the edge cases
      • Slow for testing fine-grained features – set-up and tear-down are called for each test
    • Selenium Strengths
      • For testing Ajax applications
      • Multiple browsers
      • Test full-stack
    • Interesting Possibilities
      • Delivering Selenium Screencast as Documentation to end-users
      • Creating a report with screenshots
      • A Server having VMWare images of various OS/browser and each submitting a report back
    • Summary
      • Selenium is a testing framework for Web Applications
      • Drivers allow web testing in language of choice
      • Test scripts are code: need maintenance, re-factoring
    • Summary
      • Can be used on Developer machines
      • Most valuable when used with CI set-up
      • Can be used to make screen casts
      • Tests run on real browser – most people use it to test their JavaScript works predictably on all browsers
    • Summary
      • Can be used for unit-testing, regression testing, smoke-testing, integration and acceptance testing
    • References / Attribution
      • Neal Ford's presentation on Selenium
      • Selenium site
        • This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License http://creativecommons.org/licenses/by-nc-sa/3.0/
    • Feedback
        • [email_address]