This page was machine-translated from Portuguese and may contain mistakes. Read the original

Playwright is an automated testing tool/framework (like Selenium and Cypress) developed by Microsoft (what?!?!?!).
The first release was on January 31, 2020, and although it’s relatively new, it offers many of the features found in other testing tools (if not all of them—and then some). The repository has 48.6k stars (at the time of writing) compared to 42.9k stars for cypress.io.
But then, why should I learn more about Playwright since it’s “just another tool”?
Well, in some experiments I’ve run, the biggest advantage was test execution time.
It’s AMAZING how fast it runs. Compared to Cypress, it took half the time to run a simple login test with default parallelism settings (you can find details of the comparison in this other article—check it out!).
Often, “time” is an issue overlooked by quality and DevOps teams. Engineers tend to get used to a project’s build time. There are many priorities within a company, and generally, as long as “the test is running,” that’s all that matters!
So, I invite you to challenge this notion and at least evaluate the benefits you’ll gain from using Playwright.
3 Other Standout Features
- Parallelism and sharding: runs tests from the same file in parallel. If you have one file with 10 tests, it will run all 10 tests in parallel—unlike other tools that only run files in parallel. The configuration is very simple to set up.
- Session storage: For an EVEN FASTER test execution (yes, that’s possible!), if your tests require logging in multiple times, you can reuse the browser context by logging in just once. This isn’t done via an API call; it’s a simple configuration that allows the test to reuse the previously saved browser context, skipping the login step. Of course, you can disable this feature for one or more tests with just a single line of code.
- Reporters (Test Reports): In addition to coming with a very comprehensive report out of the box—and being able to configure it with just two or three extremely simple lines of code—the report provided by Playwright includes a trace viewer (step traceability) that shows exactly what happened at each event in your test and how the browser responded (after the test ran). This greatly speeds up the time it takes to investigate bugs or test failures.
Conclusion
Of course, many factors must be considered when deciding to use Playwright—I also recommend Angie Jones’s course “Setting a Foundation for Successful Test Automation.”
- If your automation suite already has thousands of tests, migrating everything might not be the best choice; however, for a subset of tests that are flaky or require a lot of maintenance time, it could be a viable alternative.
- If you’re starting a new project, it might be worth considering Playwright; or if you’re going to start a new type of testing (API, accessibility, web performance, etc.) that will also require a lot of code refactoring.
Let me know in the comments: do you think it’s possible to use Playwright in the projects you’re currently working on or will be working on?