E2E testing with Playwright and Docker
Automated testing of the Adyen Sample integrations
Playwright is a modern framework that simplifies the creation and maintenance of web application end-to-end (E2E) testing. The landscape of e2e testing solutions, to be honest, is already rich with tools and frameworks, however Playwright joins the party with some distinctive features (cross-platform, cross-browser, cross-language) and a powerful maintainer (Microsoft).
This blog post presents secrets and practises of using Playwright with Docker with a specific focus on:
- use the official Playwright Docker image (with some extra tips)
- build and run a custom Playwright Docker image
- how to integrate the Playwright Docker image in the CI/CD pipeline
The article shares some of the lesson learnt by implementing E2E testing of the Adyen Sample integrations with Playwright, Docker and GithubActions
Playwright test case
First let’s look at a simple test to understand how it is written and executed.
const { test, expect } = require('@playwright/test'); test('Card', async ({ page, baseURL }) => { // check page title
await…