DEV Community


Posted on

Taking the plunge into Playwright!

I've finally got to a point where we decided to experiment with Playwright. There were some very good reasons for this:

  1. Our old WebDriver tests couldn't really be trusted anymore. This wasn't really a problem specific with WebDriver, it was just unfortunate that this happens when tests aren't run regularly (daily/weekly), maintenance isn't prioritized, and tests were just written poorly from the beginning. Just to note: We support a product where our WebDriver tests are maintained & architected properly and executed on a weekly basis, and things are going swimmingly there. It's only when that cadence is abandoned where things can really really go south.

  2. Running them in CI (even as simple as in a Bitbucket pipeline) was a huge pain, with a ton of custom work. This included containerization of our test code, pushing to ECR, starting an ECS instance, developing highly customized HTML reporting, and highly customized retry mechanisms. It was not the friendliest thing to deal with on a long-term basis.

  3. Writing tests in Ruby is great, but with the limited team size, it seemed that moving to a language that aligned with the dev team has some potential benefits. While expectations are low that the entire dev team would jump into writing e2e tests, I felt that breaking the language barrier was at least the bare minimum.

  4. Finding opportunities for upskilling my team is always a priority. Always valuable to learn things that are on trend and desirable in the market.

I'll share some more thoughts and quick takes in another post. But so far, Playwright has made things very easy to get started. But as always, automation is easy to start, and difficult to master.

Top comments (1)

maxime1992 profile image

At work we've decided I think roughly 6 months ago to switch from Cypress to Playwright, and no regrets whatsoever. Ever more since a few weeks when they've released the watch mode with a UI, it's fantastic.

We've also developed our own tool to mock grpc calls and asserts on them, if anyone is interested the project is here and can be used without Playwright or using our dedicated Playwright helper.

I'm sure you won't regret it as well!