A release gate needs a quick browser signal before longer Playwright suites or manual checks start. A UI smoke test supplies that signal by exercising the smallest path that proves the build can load, render the expected page, and complete one user-facing assertion.
A smoke slice can be a dedicated spec file, a tag, or a small project selection in Playwright Test. Using one spec file with the chromium project keeps terminal output focused on the release path instead of the entire regression suite.
The target application should already be reachable from the machine running Playwright. Passing the URL through BASE_URL keeps local fixture, preview, and staging runs separate without editing the spec file, as long as playwright.config.ts maps that variable into use.baseURL.
Steps to run a Playwright UI smoke test:
- Open a terminal at the Playwright project root.
- Set the target URL for the smoke run.
$ export BASE_URL="http://127.0.0.1:4173"
Replace this value with the staging or preview origin for release checks. The Playwright config must read process.env.BASE_URL into use.baseURL or the variable will not change navigation.
- Run the smoke spec in the chromium project with the line reporter.
$ npx playwright test tests/smoke.spec.ts --project=chromium --reporter=line Running 1 test using 1 worker [1/1] [chromium] › tests/smoke.spec.ts:3:5 › @smoke home page shows ready state 1 passed (981ms)
Use the smoke file or tag that your project treats as the release gate. The line reporter keeps terminal output compact while still printing failures.
Related: How to run specific Playwright tests
- Confirm that the output names the smoke spec, the expected browser project, and a final passed count.
Do not promote a build when the smoke run fails or when the output shows a different target file, browser project, or environment than the intended release check.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.