How to parameterize and configure your custom Playwright fixtures

How to parameterize and configure your custom Playwright fixtures

Sep 19, 2024

Join Stefan Judis in this Playwright tutorial, where he explains how to make your custom Playwright fixtures configurable using "option fixtures". Stefan briefly explains the fixture concept but then focuses on creating an option fixture configurable on a global, project, and spec file basis.

Example source code: https://github.com/checkly/playwright-examples/tree/main/parameterized-fixtures
Playwright docs: https://playwright.dev/docs/test-parameterize
Checkly Synthetic Monitoring: https://www.checklyhq.com/product/synthetic-monitoring/

0:00 Intro

0:52 The problem — custom fixtures are not configurable

1:59 Custom fixtures explained

2:46 Provide configuration values via environment variables

3:07 Add a custom fixture option

4:13 Override the defined fixture option

5:53 Summary

6:18 Outro

#checkly #playwright #syntheticmonitoring