+ All Categories
Home > Technology > Selenium - automated browser-based testing -

Selenium - automated browser-based testing -

Date post: 07-Nov-2014
Author: seiji-komatsu
View: 1,238 times
Download: 3 times
Share this document with a friend
A presentation for Hiruben at atWare, Inc.
Embed Size (px)
Popular Tags:
of 20 /20
Selenium - automated browser-based testing - KOMATSU Seiji (comutt) atWare, Inc. September 21, 2012
  • 1. Selenium- automated browser-based testing - KOMATSU Seiji (comutt) atWare, Inc. September 21, 2012
  • 2. What is Selenium?Automates browserTesting feature(element assertion, etc)Selenium IDEsupported on FirefoxOther browsers aresupported for testing
  • 3. UI TestingLogic testing doesnt cover UIWeb applications UI is browsersIts not easy to testing with browsers
  • 4. With SeleniumTestable with BrowsersTest cases can be written in:Java, C#, Ruby, Python, etcUsing CI,UI becomes testable continuously
  • 5. ArchitectureSelenium 2.0 WebDriver A driver, which is run by a Client Driver Client Driver Test drivers, implemented in some languages (Java, C#, Python, etc)
  • 6. Architecture Drive a browser directly from a client BrowserClient Driver Selenium IDE ( library ) WebDriver plugin
  • 7. Architecture Drive a browser from Selenium Server Selenium Server( java daemon ) Browser Remote Selenium IDE WebDriver WebDriver pluginClient Driver ( library )
  • 8. Selenium IDEFirefox Plugin Available at Downloads Here
  • 9. Get Selenium IDEAll plugins installed at once
  • 10. Got Selenium IDENow you can run Selenium IDE
  • 11. Recording Mode Selenium IDE has a recording modeRecording mode: Recording mode: ON OFF
  • 12. Be CarefulIf recording mode on: All actions recorded automatically May be an accident, if the mode is on by mistakeOtherwise: No actions recorded automatically
  • 13. Lets RecordTo record, turn on the recording modeYou only do browsing,same as when you browse normally
  • 14. DemonstrationTwitter login/tweet/logout test 01. recording 02. fail with missing element 03. x the element 04. captcha error 05. mostly success, except tweeting
  • 15. To JUnit Test CaseIts easy to convert to JUnit Test Case,or other formats.Enable the feature,[Options]-[Options]-[Enable experimental features]To convert,[Options]-[Format]-[What a format you want]
  • 16. GotJUnit Test CaseAs a result:
  • 17. Other WaysCopy directly to clipboard: [Options]-[Clipboard Format]- [What a format you want]Export as a le: [File]-[Export Test Case As...]- [What a format you want]
  • 18. Architecture Comparison Browser Selenium IDEClient Driver ( library ) WebDriver plugin It takes about a minute to run test As I investigated, class loading is a little slow
  • 19. Architecture Comparison Selenium Server ( java daemon ) Browser Remote Selenium IDE WebDriver WebDriver plugin Client Driver ( library )Required that the server is readyIt takes rather a half time than withoutthe server
  • 20. ConclusionUI testing is complex,so the maintenance is not easySuggest that test the critical patterns Login/Logout, and any other very important featuresPowerful to prevent the regression