I created a project playwright from scrash with the command:
npm init playwright@latest
I've versioned in git, and I'm trying to run it with in kubernetes in a pod.
export CI=1 npm ci npx playwright test
and I have this output:
root@64c39590357ffbe7d162ee0f-cdnvc:/data/repo# npx playwright test ^[[3~ Running 2 tests using 1 worker 1 [chromium] › example.spec.ts:3:5 › has title Killed
My pod is started with the image
docker pull mcr.microsoft.com/playwright:focal
On my local env, the project works correctly, but I don't understand what's missing. Can you help me?
This thread is trying to answer question "Why is the Playwright test getting killed when run in a Kubernetes pod?"
from inside the container I got
root@64c39590357ffbe7d162ee0f-cdnvc:/# cat /sys/fs/cgroup/cpu/cpuacct.usage 89837602027 root@64c39590357ffbe7d162ee0f-cdnvc:/# cat /sys/fs/cgroup/memory/memory.usage_in_bytes 4943872 root@64c39590357ffbe7d162ee0f-cdnvc:/# cat /sys/fs/cgroup/memory/memory.usage_in_bytes | numfmt --to=iec 5.0M root@64c39590357ffbe7d162ee0f-cdnvc:/# cat /sys/fs/cgroup/cpu/cpuacct.usage | numfmt --to=iec 84G
I strongly recommend you to use a versioned Docker container: https://playwright.dev/docs/docker
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email email@example.com.