Skip to content

Use your MacBook as the playwright server (local browsers) for running tests from Gitpod

Notifications You must be signed in to change notification settings

gitpod-samples/playwright-local-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitpod auto playwright server forwarding

This launches a local playwright server on your MacBook and automatically sets up reverse port forwarding so that the playwright server is accessible from all your Gitpod workspaces.

It monitors for newly created Gitpod workspaces using the gitpod CLI in the background.

Prerequisites

Open a terminal on your MacBook and run following commands. This will install nodejs (if missing) and Gitpod CLI. Homebrew is necessary.

brew install gitpod-io/tap/gitpod bash
! which npm && brew install node

gitpod login --host gitpod.io

After you're logged in to Gitpod. Run this final command:

curl --proto '=https' --tlsv1.2 -sSfL "https://raw.githubusercontent.com/gitpod-samples/playwright-local-server/35875ec/gitpod-autopwf" | /opt/homebrew/bin/bash -s selfinstall

Setup

Add the following line to your gitpod Dockerfile and push to your repository:

ENV PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:9999

This only needs to be done once and by someone who maintains the Gitpod configuration files.

Now all your newly created Gitpod workspaces should use the local playwright server running on your MacBook for playwright test commands.

About

Use your MacBook as the playwright server (local browsers) for running tests from Gitpod

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages