06 October 2020, 09:10 PM
The Last Mile
This talk will start with an overview of the challenges faced in DOM to Database test automation. It will draw on examples from development of Watir (Web Application Testing In Ruby), the oldest open source UI automated testing tool.
When the Watir API was implemented with webdriver’s wire protocol in 2010, it adopted Selenium’s approach of being a “Do What I Say” tool, just with an alternate API and access to a number of additional features. Recognizing the need for testers to be able to use a “Do What I Mean” tool, Watir developers were able to leverage the existing API and abstractions to implement automatic synchronization and additional resiliency for previously flaky test suites. This talk will give examples of why this is important and how it was addressed.
This code was released as Watir 6.0 in 2016, but it was quickly discovered to have solved the problem in a rather inefficient matter. In 2017 and 2018 Watir re-implemented much of the synchronization code to remove as many wire calls as possible while still providing the essential functionality. A particular line of code that made 33 wire calls in 2016 was decreased to only need 3 by 2018. Frameworks in any language can make use of the strategy that Watir adopted to provide performant synchronization, and this talk will show you what you need to do in order to take advantage of it.