The Power of Polymorphism: Testing Android And iOS From A Single Test Suite - Craig Schwarzwald

Опубликовано: 27 Июль 2026
на канале: Sauce Labs
440
9

The Power of Polymorphism: Testing Android And iOS From A Single Test Suite - Craig Schwarzwald – Senior Automation Engineer, Vanguard

Abstract
Maintaining end-to-end test suites is always a challenge. Mobile typically multiplies that challenge by forcing companies to maintain multiple suites across different mobile OSs. However, we can utilize Object-Oriented design patterns to enable polymorphism and allow us to run the same test cases on multiple different platforms. In this presentation, Craig Schwarzwald will show you how. The strategy is as follows:

Create interface classes for any/all Appium Page Objects (borrowing a Selenium term in our case representing each mobile screen)
Create common implementations of those interfaces for any/all locators that are the same between the different mobile platforms.
Create platform specific implementations of those interfaces for ONLY the locators that are different across platforms.
Create tests that reference the interfaces (not the implementations).

By following the above rules, we can generate a single test suite that can easily run all our tests across multiple different mobile OS platforms! Come prepared to view code examples of how we can put these Object-Oriented design patterns in place so you can go back to your organization armed with the specifics of how to implement these changes at your company.

Bio
Craig Schwarzwald has more than a decade of professional scripting and automation experience. For the past seven years he has focused on creating and maintaining the Selenium framework used by hundreds of testers, developers, and automation engineers at a large financial organization. Widely regarded as his company’s Selenium expert, Craig holds weekly “office hours” sessions to supply solutions to teams’ most difficult Selenium-based challenges. While on a mobile development team, Craig switched gears to Appium where he was able to take the same selenium skills and develop a mobile framework capable of running the same test cases across both Android and iOS. In his spare time, Craig enjoys bowling, playing softball, and having passionate discussions about Selenium, test automation, and any other Shift Left related topics. Follow Craig on Twitter @AutomationCraig.