Play it right and do it all with Playwright and Drupal
This presentation covers how Playwright can be used for Drupal development: during development, end-to-end (E2E) testing and visual regression testing (VRT).
This presentation is aimed at Drupal developers and testers that are exploring testing tools for Drupal, or already using Behat, Cypress, or BackstopJS and weighing a switch or extension. If you are already using Playwright intensively then this presentation may not contain a lot of new information but you are welcome to share your insights.
I explain what Playwright is, how it works and how to run tests on a Drupal site (drive the full user experience across browsers + pixel-level visual checks), how it compares with PHPUnit / Behat / Cypress, and concrete tricks that make tests run in Drupal: authentication before the test suite runs, create test content, clean up test content.
I will explore the benefits of already existing tools like the contrib Automated Testing Kit (ATK).
Of course, **AI** ๐ค will be addressed too โจ โ otherwise nobody will attend the session ๐๐. I cover these questions: can AI do all the testing for you ๐ช? Can an AI agent help write tests ๐ก? Can it interpret the report and file bug tickets ๐? And โ the underrated direction ๐ฎ โ can tests guardrail an AI agent ๐ก๏ธ?
I will prepare various demos and the audience can choose what they like to see: login, content creation, filling out forms, visual regression โ you name it.
The presentation will NOT provide:
-
History and theory of automated testing
-
Testing-tool comparison
-
Feature lists
-
Testing hipster jargon such as flakiness or budgets
-
Advertisement of SAAS solutions
Learning objectives
I explain what Playwright is, how it works and how to run tests on a Drupal site (drive the full user experience across browsers + pixel-level visual checks), how it compares with PHPUnit / Behat / Cypress, and concrete tricks that make tests run in Drupal: authentication before the test suite runs, create test content, clean up test content.