TDD in functional testing with WebDriver

6,757
-1

Published on

Presentation from ConfeT&QA Online conference (February 2012) about techniques and approaches for successful adoption of TDD (Test Driven Development) in functional tests with WebDriver.

Published in: Technology
0 Comments
16 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,757
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
0
Comments
0
Likes
16
Embeds 0
No embeds

No notes for slide

TDD in functional testing with WebDriver

  1. 1. TDD with functional testing using WebDriver Mikalai Alimenkou http://xpinjection.com 14.02.2012
  2. 2. Background• Java Technical Lead/Scrum Master at Zoral Labs• 7+ years in software development• 5+ years of working by Agile methodologies• Expert in Agile engineering practices• Founder and coach at XP Injection (http://xpinjection.com)• Organizer of Selenium Camp, JEEConf, XP Days Ukraine, IT Brunch conferences
  3. 3. When there are no problems nothing should be doneLETS START WITH PROBLEMS!
  4. 4. Endless regression testing
  5. 5. Duplicated efforts on tests WebDriver Test = Test Case
  6. 6. Everybody do manual tests Developers QA engineer Customer
  7. 7. TDD is very simple concept but at the same is very hard to doTDD WITH WEBDRIVER
  8. 8. TDD is simple cycle
  9. 9. Acceptance TDD approach Automated AcceptanceAcceptance Tests criteria Analysis Test Implementation Design Automated Acceptance Acceptance Tests criteria
  10. 10. WTF?!?Write tests before UI is ready? Impossible!!!
  11. 11. WebDriver test components Get Driver Use Driver Provide Data Use Locators
  12. 12. How to provide data? Customer Whole team Acceptance + CriteriaCustomer QA engineer Acceptance Behavior + Tests Samples Whole team Functional Unit Integration Tests Tests Tests
  13. 13. How to use locators? Discuss page Use mockup tools structure in details Developer HTML mockup starts from HTML from web designer
  14. 14. Locators team conventions Controls by ID Form elements by nameLinks by text List of items (semantic classes)
  15. 15. Natural test parts separation To enable reliable stable tests we need to separate all parts as much as possible Reliability Clarity Test Test Data Logic Flexibility Application Maintainability Driver Stability
  16. 16. Team can be balancedCustomer QA engineer QA engineer + Test Test Data Logic Application Driver Developers QA engineer
  17. 17. DEMO TIME!
  18. 18. What about Page Object? search order Index Page Search Page login search filter Main Page open see more Details close Page show me like this
  19. 19. DEMO TIME!
  20. 20. TDD can not only solve current issues but bring you to the next levelBENEFITS AND SUMMARY
  21. 21. Way to success is hard 1. Agree on team rules 2. Break your mind3. Prepare to many issues 4. Relax in TDD environment
  22. 22. It is hard! Whatare the benefits?
  23. 23. Specify how IT MUST WORK,not how IT WORKS
  24. 24. Design with testability in mind No rework Less mistakes Strong guidelines Discussdesign early Good Testable locators design Easier tests
  25. 25. Less technical tests Easy to Clear Readable maintain
  26. 26. Reduce manual checks
  27. 27. Clear Definition of Done@Ignore tests VS iteration test suite
  28. 28. Sharedresponsibility for testing is built
  29. 29. @xpinjection http://xpinjection.commikalai.alimenkou@xpinjection.com

×