
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
@podman-desktop/tests-playwright
Advanced tools
Playwright-based testing libraries for Podman Desktop and its extensions
This document contains information on how to use the E2E testing framework of Podman Desktop on different scenarios. This is particularly useful if you want to execute the tests from a Podman Desktop extension or you want to develop your own.
Prerequisites:
nvm)npm install -g pnpm@10 or you can get it herePodman Desktop E2E tests use the Playwright testing framework libraries to develop the tests and POM (page object model) for the Podman Desktop application. The test runner also relies on playwright code.
At this moment the electron support is marked as experimental.
In order to be able to reuse and share the core e2e tests libraries and definitions we created @podman-desktop/tests-playwright npm package.
The project uses devDependency to @playwright/test for access to playwright function, assertions, etc., and also to an electron package, which brings the ability to run Podman Desktop application (which is electron based) when running e2e tests.
We distinguish between two operational modes to run the tests with: development and production. In both cases, we need to have access to Electron binary which is used to launch the Podman Desktop application. Above functionality is handled by @podman-desktop/tests-playwright Runner class (podman-desktop-runner.ts). The runner is then shipped as a Playwright fixture and takes care of all the setup for E2E tests.
Multiple scenarios may occur:
podman-desktop repository in DEVELOPMENT mode: We do not need to set any paths to electron binary, Runner uses default configuration and grabs electron from /node_modules/.bin/electron which is installed via electron dependency postinstall script during pnpm install.podman-desktop repository in PRODUCTION mode: We need to set PODMAN_DESKTOP_BINARY environment variable when running the tests from podman-desktop repository with the previously built or downloaded Podman Desktop electron app. Simply point to a podman-desktop binary or executable.PODMAN_DESKTOP_ARGS and point to the previously built podman-desktop repository. We are using electron binary from podman-desktop repository the same way as in point 1.PODMAN_DESKTOP_BINARY environment variable and point to a downloaded/built Podman Desktop application which is also main electron binary that is used.This approach is beneficial in the way that we do not need to have the electron package set as a dependency in external repositories.
If you set PODMAN_DESKTOP_BINARY and PODMAN_DESKTOP_ARGS at the same time, the runner will throw an error since you cannot really run tests in both mode at the same time.
You can get testing-enabled Podman Desktop binaries and installation files from testing-prereleases repository.
This section explains how to develop your own E2E tests in the Podman Desktop repository.
Steps:
podman-desktop)pnpm installpnpm test:e2e:buildtests/playwright folderpnpm test:e2e in order to run them./tests/playwright/output (this directory can be modified in the playwright.config.ts file)This section explains how to add the npm package to a repository external to podman-desktop.
Steps:
podman-desktop)pnpm installpnpm test:e2e:buildexport PODMAN_DESKTOP_ARGS="/path/to/podman-desktop" (the current directory) [¹][⁶]package.json file to have the following contents:devDependencies:
"@podman-desktop/tests-playwright": "next",[²]"@playwright/test": "^1.48.1" (or the current latest)scripts:
"test:e2e:setup": "xvfb-maybe --auto-servernum --server-args='-screen 0 1280x960x24' --" [³]"test:e2e": "cross-env npm run test:e2e:setup npx playwright test tests/src"pnpm install, which should extract the contents of the previously built Podman Desktop into the node_modules folder in your repository@podman-desktop/tests-playwright from step 3 (optional)pnpm test:e2e [⁵]pnpm compile:current, which will produce a podman-desktop executable under /dist/linux-unpackedexport PODMAN_DESKTOP_BINARY="/path/to/the/podman-desktop/executable" [⁶][¹] Remember that environment variables defined this way only work on the terminal they were defined and only for as long as the terminal is active.
[²] Using the value next works for running tests locally, but for remote executions, specify the latest version of the @podman-desktop/tests-playwright package. Check the “Versions” tab here to find the latest version. This version will be written into the pnpm-lock.yaml file; to ensure you use the latest version in the future, force an update with pnpm add -D @podman-desktop/tests-playwright@next (use the -w flag in monorepos to install at the workspace root).
[³] If your project does not already have the xvfb-maybe dependency, you'll need to add it as well.
[⁴] To verify that the PD binary is correctly being passed to the extension tests, you can check at the beginning of the running tests trace if the path is correct here: executablePath: /expected/path/to/podman-desktop/binary
[⁵] Currently in linux, running the tests with pnpm test:e2e does not open Podman Desktop (PD starts minimized in the tray). To see the tests running, execute the binary once you've executed pnpm test:e2e
[⁶] Alternatively to exporting the envvar, you can add it directly to the execution of the tests like this:
PODMAN_DESKTOP_ARGS="/path/to/podman-desktop" pnpm test:e2ePODMAN_DESKTOP_BINARY="/path/to/the/podman-desktop/executable" pnpm test:e2eThis section references how to use @podman-desktop/tests-playwright generated archive file for local development
podman-desktop)tests/playwright folder and install its local dependencies by executing pnpm installtests/playwright)pnpm run package which also builds the code. This will produce a .tgzarchiveexport PODMAN_DESKTOP_ARGS="path/to/podman-desktop" (not the current directory, two folders up)package.json file to have the following contents under devDependencies:
"@podman-desktop/tests-playwright": "file:../podman-desktop/tests/playwright/podman-desktop-1.20.0-next.tgz"pnpm install, which should extract the contents of the previously built Podman Desktop package into the node_modules folder in your repository@podman-desktop/tests-playwright should be available in your project. If the process was successful, you should be able to find the classes you added in the index.d.ts file under node_modules/@podman-desktop/tests-playwright/distnode_modules to force new installationFAQs
Playwright-based testing libraries for Podman Desktop and its extensions
The npm package @podman-desktop/tests-playwright receives a total of 12,301 weekly downloads. As such, @podman-desktop/tests-playwright popularity was classified as popular.
We found that @podman-desktop/tests-playwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.