Case Study: Protractor to Playwright Migration
Overview
When Google’s deprecation of the Protractor framework put a client’s automated test suite at risk, QualityLogic didn’t default to the standard rebuild-from-scratch approach the market offered. Instead, our engineering team designed a custom solution that converted the client’s Protractor tests to Playwright automatically, at a 95-98% success rate (the rest handled by hand), preserving hundreds of test cases and 18,000+ lines of test code in a fraction of the time and cost a manual rebuild would have required.
TL;DR
- The problem: a client facing the loss of hundreds of tests and 18,000+ lines of test code after Google deprecated the Protractor framework
- Approach: QualityLogic’s engineering team designed and built a Protractor-to-Playwright conversion tool from scratch
- 95-98% conversion efficiency on the test cases run through the tool (the remainder handled by hand)
- 18,000+ lines of test code converted in 15 hours, work that would’ve taken an estimated 460 hours by hand
- Outcome: hundreds of tests successfully migrated from Protractor to Playwright in a fraction of the time and cost
The Client
The client provides global retail management software, including point-of-sale and store operations technology to specialty retailers across numerous countries. Their platform covers inventory, pricing, employee and customer management, and reporting for retailers running physical and omnichannel operations at scale. Production-level defects risk impacting every store running on their system, worldwide.
Disclosure: We’ve been authorized to share the details of this program but are adhering to our non-disclosure agreement not to identify the client by name.
The Problem
Protractor was an end-to-end testing framework built by Google for AngularJS applications, with built-in support for the asynchronous testing that Angular apps depend on. For years, teams building on Angular used Protractor as the default testing framework.
When Google announced it was deprecating Protractor, this left numerous organizations with Protractor automation suites exposed. Our client had hundreds of test cases and 18,000+ lines of code in Protractor, all of it at risk of going stale as Angular moved forward without a supported test framework behind it.
This move also occurred before the prevalence of AI coding tools, meaning the typical throughput of an experienced test automation engineer was 200-300 lines of code per day, of 4-8 tests. At that pace, a full rebuild would run into hundreds of engineering hours at six figures or more. Google’s own guidance was to simply rebuild tests from scratch in a different framework, which didn’t offer relief to our client.
The Approach
Our team characterized the problem through the lens of innovation, not brute-force. We originally searched the market for migration tools to frameworks like Playwright but, after coming up short, we decided to build our own.
After investing some initial R&D time, we were able to develop tooling that handled Protractor to Playwright conversion automatically at a 95-98% conversion rate, with the remaining inaccuracies resolved by a hands-on engineer ensuring the quality of the final result. Playwright in particular was selected for its strong support of modern UI frameworks like React and Angular, its backing by a dedicated team at Microsoft, and a high-level API that cuts down on test flakiness compared to older frameworks.
The Outcome
QualityLogic utilized this tool to convert the 18,000+ lines of code representing hundreds of tests from Protractor to Playwright in just 15 hours, work that would’ve taken a team of engineers an estimated 460 hours. As a result, the client was able to preserve automated functional tests critical to their test coverage, which also meant retaining years of accumulated test knowledge and avoiding the cost, delay, and risk exposure that a full manual rebuild would have introduced.