# How to Configure Playwright Test to run smoke tests, headed tests, and debug versions through scripts in package.json

DevFeed: [How to Configure Playwright Test to run smoke tests, headed tests, and debug versions through scripts in package.json](<https://devfeed.tech/articles/how-to-configure-playwright-test-to-run-smoke-tests-headed-tests-and-debug-versions-through-scripts-in-package-json-22419.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/how-to-configure-playwright-test-to-run.html>)

Author: T.J. Maher (noreply@blogger.com)

Published: 2026-08-20T02:13:32Z

Content type: tutorial

Language: en

Sources: [T.J. Maher](<https://devfeed.tech/sources/t-j-maher.md>)

Topics: [Playwright](<https://devfeed.tech/topics/playwright.md>), [Script](<https://devfeed.tech/topics/script.md>), [Bun](<https://devfeed.tech/topics/bun.md>), [Smoke Tests](<https://devfeed.tech/topics/smoke-tests.md>), [test](<https://devfeed.tech/topics/test.md>), [Package manager](<https://devfeed.tech/topics/package-manager.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [commands](<https://devfeed.tech/tags/commands.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [install](<https://devfeed.tech/tags/install.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

A tutorial on configuring Playwright Test commands in package.json scripts. It demonstrates shortcuts for headed, traced, Chromium, Firefox, WebKit, smoke, debugging, reporting, linting, formatting, and type-checking workflows, and explains using Bun and bunx to run commands.

## Source excerpt

Earlier, we went over how we could create scripts in the package.json file of our Playwright framework to add typechecking, linting, and formatting your code with prettier. Want to see the entire bun-create-playwright project? It is on tinyurl.com/bun-create-playwright! With this post, we will explore how the built-in test runner for Playwright Test can run headed tests, debug versions of tests, and smoke tests. ... and shortcuts for all of these can be set up in the scripts in your package.json! If you are using "bun" as a package manager, as we are in bun-create-playwright, just type out "bun run", a space and then the shortcut such as: bun run test package.json "scripts": { "test": "playwright test", "test:headed": "playwright test --headed", "test:trace": "playwright test --trace on", "test:chromium": "playwright test --project=chromium", "test:firefox": "playwright test --project=firefox", "test:webkit": "playwright test --project=webkit", "test:smoke": "playwright test --project=chromium --grep '@smoke'", "test:flaky": "playwright test --project=chromium --repeat-each=20", "test:ui": "playwright test --ui", "test:debug": "playwright test --debug", "test:failed": "playwright test --last-failed", "test:login": "playwright test tests/login.spec.ts", "test:secure-area": "playwright test tests/secure-area.spec.ts", "report:list": "playwright test --reporter=list", "report:line": "playwright test --reporter=line", "report:dot": "playwright test --reporter=dot", "report:blob": "playwright test --reporter=blob", "report": "playwright show-report", "codegen": "playwright codegen", "lint": "eslint .", "lint:ci": "eslint . --max-warnings 0", "lint:fix": "eslint . --fix", "format": "prettier --write .", "format:check": "prettier --check .", "format:debug": "prettier --check . --log-level debug", "format:diff": "prettier --list-different", "typecheck": "tsc --noEmit" }, bun-create-playwright / package.json Do you need to really set up shortcuts like these? Certainly not! B