Improving your Playwright code

As part of my day-to-day work, I get to talk to and work with different teams that spend a lot of time writing, running and maintaining end-to-end / full stack tests, and increasingly often, Playwright is their tool of choice. That is understandable, because Playwright is a great tool.

However, I also see many of these teams fall into the same two traps when writing their Playwright tests:

  • They suffer from long and complex E2E tests being overrepresented in their test suite
  • The quality of the code they write leaves plenty of room for improvement

In this workshop, we will address both these traps and improve a Playwright test suite by

  • Performing a code review on the test suite, identifying and discussing potential problems in the code
  • Applying fundamental programming principles and tried and tested automation patterns to improve the readability, maintainability and extensibility of the code
  • Identify and discuss opportunities to break down the E2E tests into more efficient tests with smaller scope
  • Use Playwright features such as API testing and API mocking to write tests that exercise fewer moving system parts and deliver more valuable feedback, faster

Why do we need these skills in a time when AI can write all of our Playwright code for us, you say? I’m glad you asked!

First, we need the skills required to scrutinize the AI-generated code and see if it is fit for purpose. Deliberate practice like this workshop is a very effective way to grow these skills.

Second, as participants will see, successfully breaking down E2E tests is not just about writing our code differently, it also requires a combination of analyzing product architecture, discussing testability and zooming in on what’s important within a specific context, and these are not exactly topics where AI excels.

Intended audience and prerequisite knowledge

This course is aimed at software testers and developers that want to improve their Playwright-based test automation efforts.

Some prior knowledge of both web and API automation, as well as being comfortable writing and running test code with Playwright is beneficial.

This workshop is an excellent follow-up workshop to my introductory Playwright workshop, and I am happy to combine them into a comprehensive course.

Delivery and group size

This workshop is a great fit both for an on site or an online in house training session, as well as a half or full day conference tutorial. I recommend a maximum group size of around 15-20 people.

I can deliver this workshop in all languages supported by Playwright: C#, Java, JavaScript/TypeScript and Python.

Duration

This workshop is a full-day tutorial, but can be brought back to 3-4 hours on request.

Interested?

If you would like to book me to teach this workshop in your organization or at your conference, or if you have any additional questions, please send an email to bas@ontestautomation.com or use the contact form on this page.

For an overview of all training courses and workshops I have on offer, please visit the main training page.