Selenium - automated browser-based testing -

1,236 views

Published on

A presentation for Hiruben at atWare, Inc.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,236
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Selenium - automated browser-based testing -

  1. 1. Selenium- automated browser-based testing - KOMATSU Seiji (comutt) atWare, Inc. September 21, 2012
  2. 2. What is Selenium?Automates browserTesting feature(element assertion, etc)Selenium IDEsupported on FirefoxOther browsers aresupported for testing
  3. 3. UI TestingLogic testing doesn’t cover UIWeb application’s UI is browsersIt’s not easy to testing with browsers
  4. 4. With SeleniumTestable with BrowsersTest cases can be written in:Java, C#, Ruby, Python, etcUsing CI,UI becomes testable continuously
  5. 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. 6. Architecture Drive a browser directly from a client BrowserClient Driver Selenium IDE ( library ) WebDriver plugin
  7. 7. Architecture Drive a browser from Selenium Server Selenium Server( java daemon ) Browser Remote Selenium IDE WebDriver WebDriver pluginClient Driver ( library )
  8. 8. Selenium IDEFirefox Plugin Available at Downloads Here
  9. 9. Get Selenium IDEAll plugins installed at once
  10. 10. Got Selenium IDENow you can run Selenium IDE
  11. 11. Recording Mode Selenium IDE has a recording modeRecording mode: Recording mode: ON OFF
  12. 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. 13. Let’s RecordTo record, turn on the recording modeYou only do browsing,same as when you browse normally
  14. 14. DemonstrationTwitter login/tweet/logout test 01. recording 02. fail with missing element 03. fix the element 04. captcha error 05. mostly success, except tweeting
  15. 15. To JUnit Test CaseIt’s 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. 16. GotJUnit Test CaseAs a result:
  17. 17. Other WaysCopy directly to clipboard: [Options]-[Clipboard Format]- [What a format you want]Export as a file: [File]-[Export Test Case As...]- [What a format you want]
  18. 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. 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. 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

×