TDD with functional testing using WebDriver Mikalai Alimenkou http://xpinjection.com 14.02.2012
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
When there are no problems nothing should be doneLETS START WITH PROBLEMS!
WTF?!?Write tests before UI is ready? Impossible!!!
WebDriver test components Get Driver Use Driver Provide Data Use Locators
How to provide data? Customer Whole team Acceptance + CriteriaCustomer QA engineer Acceptance Behavior + Tests Samples Whole team Functional Unit Integration Tests Tests Tests
How to use locators? Discuss page Use mockup tools structure in details Developer HTML mockup starts from HTML from web designer
Locators team conventions Controls by ID Form elements by nameLinks by text List of items (semantic classes)
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
Team can be balancedCustomer QA engineer QA engineer + Test Test Data Logic Application Driver Developers QA engineer