npx playwright test
or
yarn test
npx playwright merge-reports --reporter html ./blob-report
npx playwright show-report
rm docker-compose.yml
chmod +x ./compose.sh
./compose.sh 6
docker compose up --build
npx playwright merge-reports --reporter html ./blob-report
npx playwright show-report
We would set up a k8 deployment to deploy a standalone chrome service, in order to scale to desired replica steps
kubectl create namespace "grid"
kubectl config set-context --current --namespace=grid
kubectl apply -f k8s/node-deployment.yaml
kubectl port-forward service/selenium-hub 4444:4444
http://localhost:4444/wd/hub/status
SELENIUM_REMOTE_URL=http://localhost:4444 yarn test --project=chromium
npx playwright merge-reports --reporter html ./blob-report
npx playwright show-report
kubectl delete namespaces grid
The K8s folder will have another set of yaml files which assists in seting up a hub and node, but there is a bug which restricts the node from registering into the hub, it is not a k8 thing though, i tried with docker hub and node going by the official playwrigt docs and that did not work as well. One possible reason may be that i am running on arm
.
I have also added a values.yaml
file to run selenium-grid
with helm
https://github.com/SeleniumHQ/docker-selenium/tree/trunk/charts/selenium-grid
. Though it sets up properly with helm and nodes register to hubs, playwright was not able to connect to a session. Will be worth looking into sometime.