E2E testing with Playwright and Docker

Automated testing of the Adyen Sample integrations

Beppe Catanese
Geek Culture

--

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:

  1. use the official Playwright Docker image (with some extra tips)
  2. build and run a custom Playwright Docker image
  3. 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

Photo by naipo.de on Unsplash

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…

--

--

Beppe Catanese
Geek Culture

Developer Relations @ Adyen. Here sharing new trends, dev tools and best practises about APIs.