[ADR-0014] Choose a testing framework
Switch to Playwright for our one testing framework for e2e tests.
Last updated
Switch to Playwright for our one testing framework for e2e tests.
Last updated
Status: accepted
Deciders: Development team
Technical Story: Harmonize our tests tooling so ideally we use just one framework of writing tests whenever that’s possible.
Currently we rely heavily on Codeception for most of our tests. But we use two different syntaxes. The and . During the WYSIWYG Epic we also wrote some . Ideally we should use one way of writing all of these tests.
Chosen option: Switch to Playwright as our one testing framework for e2e tests.
Good, because easy to start using it (one binary, simple interface)
Good, because are included
Good, because still in
Good, because large documentation, numerous examples and tutorials
Good, because it has a watch mode integrated that allows for easier development
Bad, because by WordPress in favor of Puppeteer, then Playwright
Bad, because some complex cases require a succession of promises, which make them less readable
Good, because it’s faster by default, using concurrent workers
Bad, because since Playwright is fairly new, the support from the community is limited and the documentation is sometimes lacking
Good, because easy to use: install/setup is quick and async/await notation + clear function names (using the for assertions) make the tests easy to write and understand
Good, because still in
Good, because it’s the tool that WordPress will soon use too (and they’re working on a with various utilities that we might be able to use in the future?) (+ )
Good, because it has a useful to easily run and debug tests
from Testing session inTech Department Retreat.
with Playwright
on Playwright migration
: Experiment with Playwright testing framework ()
: Experiment with Cypress testing framework ()