# bun-create-playwright

Published articles for bun-create-playwright.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Publishing Playwright HTML reports on GitLab Pages

DevFeed: [Publishing Playwright HTML reports on GitLab Pages](<https://devfeed.tech/articles/publishing-playwright-html-reports-on-gitlab-pages-22422.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/publishing-playwright-html-reports-on.html>)

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

Published: 2026-08-29T23:56:10Z

Content type: tutorial

Language: en

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

Topics: [GitLab](<https://devfeed.tech/topics/gitlab.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [CI/CD Pipeline](<https://devfeed.tech/topics/ci-cd-pipeline.md>), [Publishing](<https://devfeed.tech/topics/publishing.md>)

Tags: [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [ci-cd-pipeline](<https://devfeed.tech/tags/ci-cd-pipeline.md>), [github-pages](<https://devfeed.tech/tags/github-pages.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [gitlab-ci](<https://devfeed.tech/tags/gitlab-ci.md>), [playwright](<https://devfeed.tech/tags/playwright.md>)

### AI overview

This tutorial explains how to add a deploy stage to a GitLab CI/CD pipeline for a Bun-based Playwright project. The stage publishes generated Playwright HTML reports, including screenshots and videos, to GitLab Pages so they can be viewed online.

### Source excerpt

We've added a lot to our demo project, bun--create-playwright. We've explored setting up a Playwright framework using bun, a new package manager bundled into Claude Code. We've added typechecking, and formatting and linting. We've set up a CI/ CD pipeline for our tests using GitLab, one with three stages: Quality: We check that the formatting, linting and typechecking is correct for any changes we attempt to push to the code base. Test: We run the smoke and then the regression tests to make sure that everything still works. Report: We bundle an archive of the Playwright generated HTML report, with screenshots and videos if things fail. For this post, we will add a new stage to this GitLab pipeline: Deploy: Where we will deploy the HTML report to GitLab Pages, so we can view it online. What is GitLab Pages? GitLab Pages is a built-in feature of GitLab that allows you to publish static websites directly from a repository in GitLab. Similar to GitHub Pages, it is commonly used to host project documentation, personal blogs, portfolios, or corporate landing pages for free. From the GitLab Docs / Pages: "To use GitLab Pages, you must create a project in GitLab to upload your website's files to. These projects can be either public, internal, or private. "By default, GitLab deploys your website from a specific folder called public in your repository. You can also set a custom folder to be deployed with Pages. When you create a new project in GitLab, a repository becomes available automatically. "To deploy your site, GitLab uses its built-in tool called GitLab CI/CD to build your site and publish it to the GitLab Pages server. The sequence of scripts that GitLab CI/CD runs to accomplish this task is created from a file named .gitlab-ci.yml, which you can create and modify. A user-defined job with pages: true property in the configuration file makes GitLab aware that you're deploying a GitLab Pages website. "You can either use the GitLab default domain for GitLab Pages websit

## Examining the artifacts job of a Playwright GitLab CI / CD pipeline

DevFeed: [Examining the artifacts job of a Playwright GitLab CI / CD pipeline](<https://devfeed.tech/articles/examining-the-artifacts-job-of-a-playwright-gitlab-ci-cd-pipeline-22416.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/examining-artifacts-job-of-playwright.html>)

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

Published: 2026-08-29T23:19:22Z

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>), [GitLab](<https://devfeed.tech/topics/gitlab.md>), [CI/CD Pipeline](<https://devfeed.tech/topics/ci-cd-pipeline.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [ci-cd-pipeline](<https://devfeed.tech/tags/ci-cd-pipeline.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [screenshots](<https://devfeed.tech/tags/screenshots.md>), [test](<https://devfeed.tech/tags/test.md>), [trace](<https://devfeed.tech/tags/trace.md>), [videos](<https://devfeed.tech/tags/videos.md>)

### AI overview

This tutorial examines how a Playwright GitLab CI/CD pipeline stores and exposes test artifacts. It explains the playwright-report, test-results, and reports/junit folders and describes generated HTML and JUnit reports, screenshots, videos, and trace reports.

### Source excerpt

You may have noticed that in the GitLab CI / CD Pipeline for our Playwright project, in the .gitlab-ci.yml file, after our scripts has run, in the Test stage, there is a subsection called "artifacts" with certain paths to something called "playwright-report", "test-results", and "reports". The Playwright -> Artifacts -> Reports stage playwright: extends: .bun_playwright stage: test timeout: 30 minutes ... ... artifacts: when: always paths: - playwright-report/ - test-results/ - reports/ reports: junit: reports/junit/results.xml expire_in: 30 days https://gitlab.com/tjmaher/bun-create-playwright/-/blob/main/.gitlab-ci.yml Every time Playwright tests run, it generates proof of the test execution: screenshots capturing the state of the UI when a test failed, video recordings of an entire browser session, HTML and JUnit XML test reports, trace reports showing action logs, network requests. These artifacts, when the tests run locally, are placed by the Playwright Test runner in generated folders, playwright-report and test-results, along with a folder called reports/junit. With this post, we will be examining how this artifacts stage of the GitLab CI/ CD pipeline produces downloadable artifacts we can examine. Playwright-Report: A Playwright Test folderThe Playwright Test runner creates a folder called "playwright-report", if it doesn't already exist, and an HTML file called index.html documenting the completed test run. From Playwright.dev / Test Reporters: "Playwright Test comes with a few built-in reporters for different needs and ability to provide custom reporters. [...] All built-in reporters show detailed information about failures, and mostly differ in verbosity for successful runs. [...] HTML reporter produces a self-contained folder that contains report for the test run that can be served as a web page". The HTML Report is the one that automatically opens after you run your tests locally, or if you are using the node package manager: npx playwright show-report

## How Developers Can Test Their Feature Branch Against Various Playwright Configurations Before Creating a Merge Request in GitLab CI/CD

DevFeed: [How Developers Can Test Their Feature Branch Against Various Playwright Configurations Before Creating a Merge Request in GitLab CI/CD](<https://devfeed.tech/articles/how-developers-can-test-their-feature-branch-against-various-playwright-configurations-before-creating-a-merge-request-in-gitlab-ci-cd-22417.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/how-developers-can-test-their-feature.html>)

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

Published: 2026-08-28T20:18:08Z

Content type: tutorial

Language: en

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

Topics: [GitLab](<https://devfeed.tech/topics/gitlab.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [YAML](<https://devfeed.tech/topics/yaml.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [chromium](<https://devfeed.tech/tags/chromium.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [gitlab-ci](<https://devfeed.tech/tags/gitlab-ci.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [tests](<https://devfeed.tech/tags/tests.md>), [yaml](<https://devfeed.tech/tags/yaml.md>)

### AI overview

This tutorial shows how to configure a GitLab CI/CD pipeline so developers can test a feature branch before creating a merge request. It uses spec inputs in a YAML configuration to let users choose the branch, Playwright test suite, and browser, including Chromium, Firefox, WebKit, or all browsers.

### Source excerpt

Developers need the option to test out their feature branch before merging it into main. In the last section, we set up a GitLab CI/CD Pipeline in our bun-create-playwright project to check every GitLab Merge Request. Now, we will be giving developers option to create a new pipeline where they can choose: Which feature branch to test against. Which test suite to execute (LoginPage tests? Secure Area? Or all of them?) Which Playwright browser to use: Chromium, Firefox, WebKit, or all. All these features can be set up using our .gitlab-ci.yaml file! Go to to bun-create-playwright, view the Pipelines section, and select the New Pipeline button. Run a New Bun-Create-Playwright Pipeline If you go to the Run new pipeline page at https://gitlab.com/tjmaher/bun-create-playwright/-/pipelines/new you can see the following default values I've set: https://gitlab.com/tjmaher/bun-create-playwright/-/pipelines/new By default: Branch name is "main", TEST_SUITE is "all", BROWSER is "all". ... But all these values can be set, with the developer choosing the options laid out in the .gitlab-ci.yaml file. Collect User Data With Spec Inputs We are going to be adding to the GitLab Pipeline we built in our last post Setting up a CI/ CD pipeline with GitLab: Quality, Test and Report. First, we are going to add a "spec" section to the header of the YAML file to define the behavior of a pipeline, and within that spec header, we will ask the person who triggered a new pipeline to set user defined inputs for the pipeline. spec: inputs: browser: description: "Browser project to run against." default: "all" options: ["all", "chromium", "firefox", "webkit"] suite: description: "Select full regression suite, or a single spec" default: "all" options: ["all", "login.spec.ts", "secure-area.spec.ts"] This is where we declare the "browser" and "suite" variables that appear when a user creates a new pipeline. We've given them a choice to run their feature branch code against: Browser: All, Chromium, Fir

## Setting up a CI/ CD pipeline with GitLab: Quality, Test and Report

DevFeed: [Setting up a CI/ CD pipeline with GitLab: Quality, Test and Report](<https://devfeed.tech/articles/setting-up-a-ci-cd-pipeline-with-gitlab-quality-test-and-report-22424.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/setting-up-ci-cd-pipeline-with-gitlab.html>)

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

Published: 2026-08-25T02:28:52Z

Content type: tutorial

Language: en

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

Topics: [CI/CD Pipeline](<https://devfeed.tech/topics/ci-cd-pipeline.md>), [GitLab](<https://devfeed.tech/topics/gitlab.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [pull-requests](<https://devfeed.tech/topics/pull-requests.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>)

Tags: [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [ci-cd-pipeline](<https://devfeed.tech/tags/ci-cd-pipeline.md>), [code-reviews](<https://devfeed.tech/tags/code-reviews.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [workflows](<https://devfeed.tech/tags/workflows.md>)

### AI overview

A tutorial on setting up a three-stage GitLab CI/CD pipeline for merge requests. The pipeline runs code-quality checks, smoke and regression tests, and produces a downloadable report, with stages executed sequentially and jobs within each stage running in parallel.

### Source excerpt

So far, we have reviewed how to review code with ES Lint + Prettier and Typecheck, how to set up and run smoke tests, how to run all Playwright + TypeScript tests, and reviewed the HTML report of results. In this post, we are going to set up a three stage GitLab CI/ CD pipeline that will run against every merge request: Quality (lint, typecheck, prettier) --> Test ( smoke + regression ) --> Report ( Downloadable ) I haven't used GitLab since when I worked at ThreatStack back in 2020. ( See my blog entry Getting to Know GitLab and How They Test the UI ) GitLab reads .gitlab-ci.yml from the repository root and turns it into a pipeline, a set of jobs, grouped into stages, running whenever you push a change to a repository. Stages run one after another, and jobs within a stage run in parallel. If one stage fails, the stages after it are skipped. This begs the question: What is GitLab? What is CI/ CD? Or a pipeline? Or a merge request? What is GitLab? GitLab began in 2011 as a side project by Ukrainian programmer Dmytro Zaporozhets, built to help developers work together on code more easily. Over time, it grew into a large open-source DevOps platform. More than just storing code, it handles code reviews, CI/CD (continuous integration and continuous delivery), and package registries. A company called GitLab Inc. was eventually created to turn the project into a commercial product. What makes GitLab different from tools that only host Git repositories (like a basic Git server) is that it bundles the entire software delivery process into one application. This includes: Merge requests - GitLab's term for proposing and reviewing code changes before they're merged into the main codebase (similar to a "pull request" in GitHub) Issue tracking - a built-in system for logging bugs, tasks, and feature requests Pipelines - automated workflows that build, test, and deploy code whenever changes are pushed So instead of stitching together separate tools for version control, testing, an

## 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

## Implementing Page Objects in Playwright

DevFeed: [Implementing Page Objects in Playwright](<https://devfeed.tech/articles/implementing-page-objects-in-playwright-22420.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/implementing-page-objects-in-playwright.html>)

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

Published: 2026-08-16T22:04:38Z

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>), [selectors](<https://devfeed.tech/topics/selectors.md>), [test](<https://devfeed.tech/topics/test.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [code](<https://devfeed.tech/tags/code.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [jest](<https://devfeed.tech/tags/jest.md>), [page-object](<https://devfeed.tech/tags/page-object.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [selectors](<https://devfeed.tech/tags/selectors.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

A tutorial on using Playwright page objects to organize web application tests, centralize selectors, reduce repetition, and simplify maintenance. It compares Playwright Test and Library approaches and demonstrates setting up a login-page object.

### Source excerpt

Picture a login screen, such as The-Internet / Login. On this LoginPage, there is: a heading: Login Page a user name textbox with the label, "Username" a password textbox with the label, "Password" a login button, with the role of a button, and the name of "Login" a flash message that appears if you enter invalid credentials such as "NotAUser" and "NotAPassword". If you successfully log in with "tomsmith" and "SuperSecretPassword!, there is a SecureArea: a heading: "Secure Area" a flash message "You logged into a secure area!" a Logout button. Sure, you could interact with each web element in your test... but what if the username text box locator changes? You would have to update multiple tests every time the element changed. ... Instead, you could place it in a Page Object, something that Playwright handles well! "A page object represents a part of your web application. An e-commerce web application might have a home page, a listings page and a checkout page. Each of them can be represented by page object models. "Page objects simplify authoring by creating a higher-level API which suits your application and simplify maintenance by capturing element selectors in one place and create reusable code to avoid repetition". Using Playwright's Built-In Test Runner? Or Something Else? You may have noticed in https://playwright.dev/docs/pom that there are two different styles of page objects. One for "Test". One for "Library". Test: If you are writing actual Playwright test suites, and Playwright's built in test runner, use the Test section as a guide when creating page objects. Library: If you are integrating Playwright into an existing test framework such as Jest or Cucumber and just want browser automation, instead of having pre-built page fixtures, etc, you can use this format. Setting Up Page Objects Let's review a page object I created for the main login page on my GitLab account for the bun-create-typescript project, tests/pages/LoginPage.ts. The first thing we do is

## How Playwright Frameworks get configured with playwright.config.ts

DevFeed: [How Playwright Frameworks get configured with playwright.config.ts](<https://devfeed.tech/articles/how-playwright-frameworks-get-configured-with-playwright-config-ts-22418.md>)

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

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

Published: 2026-08-15T02:30:20Z

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>), [Testing](<https://devfeed.tech/topics/testing.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [Framework](<https://devfeed.tech/topics/framework.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [config](<https://devfeed.tech/tags/config.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This tutorial examines the playwright.config.ts file generated by `bun create playwright`. It explains default test settings, browser projects for Chromium, Firefox, and WebKit, mobile and branded browser configurations, and how retries differ between local runs and CI/CD pipelines.

### Source excerpt

When we installed bun, a new package manager owned by Anthropic, then ran "bun create playwright", a new automation framework was stood up, along with sample tests, and a Playwright configuration file. In this post, we will be examining the file generated: playwright.config.ts. Personally, I find the pre-generated file very hard to scan... there are so many options and documentation in the comments, it is difficult for me to focus on the code. Let's examine just the code generated below. If you need to see the whole file, you can see it here: https://playwright.dev/docs/test-configuration Playwright.dev / Configuration mentions, "Playwright has many options to configure how your tests are run. You can specify these options in the configuration file". What is Configured By Default? import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './tests', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: 'html', // baseURL: 'http://localhost:3000', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', }, /* Configure projects for major browsers */ projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, { name: 'firefox', use: { ...devices['Desktop Firefox'] }, }, { name: 'webkit', use: { ...devices['Desktop Safari'] }, }, }); I know what you are thinking ... What the heck is process.env.CI ? 2 : 0? This is know as a ternary operator. It is a shorthand for: "If A then B, else C". You can run tests two ways: Locally, on your local machine, or through a CI / CD Pipeline like Jenkins, GitHub Actions, or GitLab. If you are running tests on CI / CD, the process.env.CI would automatically get set. Since A is true, the value of retries would be "2". If you are running tests locally, the process.env.CI would NOT get set. Since A is false, the value "0" would be selected. CI /

## Running Tests with Playwright Test Explorer and Generating Tests with Codegen

DevFeed: [Running Tests with Playwright Test Explorer and Generating Tests with Codegen](<https://devfeed.tech/articles/running-tests-with-playwright-test-explorer-and-generating-tests-with-codegen-22423.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/running-tests-with-playwright-test.html>)

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

Published: 2026-08-11T03:00:47Z

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>), [Testing](<https://devfeed.tech/topics/testing.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [testing](<https://devfeed.tech/tags/testing.md>), [vscode](<https://devfeed.tech/tags/vscode.md>)

### AI overview

A tutorial on using Playwright Test Explorer in VS Code to discover, run, and debug tests across Chromium, Firefox, and WebKit, and on using Playwright's CodeGen to generate test drafts with locators and assertions from browser interactions.

### Source excerpt

Finding the best locator for a web element can be a hassle: Right clicking on an element in Google Chrome. Inspecting the element. Going to Chrome Developer Tools. Try to decide what to do if there isn't a clear test id. Playwright comes with a built in code generator where it can built out a rough draft of a test while you interact with a website. "Playwright will look at your page and figure out the best locator, prioritizing role, text and test id locators. If the generator finds multiple elements matching the locator, it will improve the locator to make it resilient that uniquely identify the target element", according to Playwright.dev / Test Generator. Do you have the Integrated Development Environment (IDE) by Microsoft, VS Code? You can get it at the Visual Studio Marketplace. Playwright Test Explorer Playwright.dev / Getting Started VS Code: https://playwright.dev/docs/getting-started-vscode After installation, you will see a beaker icon in your VS Code left navigation menu. Selecting that, you can see your tests, such as the default ones Playwright automatically adds when it is installed: Here you can see that Test Explorer has discovered the test suite example.spec.ts, along with two tests it created: has title: Verifies that if you go to playwright.dev, that it has a link titled "Get Started". get started link: Verifies at playwright.dev that after clicking on Get Started link, the heading says "Installation". Selecting the green arrow button will open up three browser windows: Chromium, Firefox, and a WebKit browser created by Playwright, mimicking Safari. It will run a total of six tests. But wait! There's more! You can: Run a single test. Run all tests at different levels. Run on multiple browsers. Show a browser. You can also debug your tests: Set breakpoints by clicking on the gutter next to a line number Right clicking the test and select "Debug test". Running your test will pause at your breakpoint, allowing you to step through your code. You can

## Checking code with lint, formatting it with prettier

DevFeed: [Checking code with lint, formatting it with prettier](<https://devfeed.tech/articles/checking-code-with-lint-formatting-it-with-prettier-22415.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/checking-code-with-lint-formatting-it.html>)

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

Published: 2026-08-10T23:23:45Z

Content type: tutorial

Language: en

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

Topics: [ESLint](<https://devfeed.tech/topics/eslint.md>), [Prettier](<https://devfeed.tech/topics/prettier.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [eslint](<https://devfeed.tech/tags/eslint.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [linter](<https://devfeed.tech/tags/linter.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

This tutorial explains how to add ESLint for static analysis and Prettier for consistent code formatting in a Playwright project. It also discusses eslint-plugin-playwright and using eslint-config-prettier to reduce conflicts between ESLint and Prettier.

### Source excerpt

Now that we've installed bun, Anthropic's package manager, scaffolded a Playwright framework and closely examined the results, and added typechecking with TypeScript's compiler, it's time to add ways to check the code with lint, and reformat the code with prettier. We will be using: ESLint, as the static-analysis tool to review the code without running it. Little bits of fluff -- like syntax errors, structural bugs, anti-patterns, and code style violations -- can collect on your code, so it helps to run a linter to help catch it all, such as ESLint. There is also a linter, eslint-plugin-playwright, for Playwright tests. Prettier enforces a consistent code style across your entire codebase. Because ESLint and Prettier can conflict, we will be using Prettier's eslint-config-prettier, which turns off all rules that are unnecessary or might conflict with ESLint. What is a Linter? According to the Wikiwand entry for Lint, "Stephen C. Johnson, a computer scientist at Bell Labs, came up with the term 'lint' in 1978 while debugging the yacc grammar he was writing for C and dealing with portability issues stemming from porting Unix to a 32-bit machine. The term was borrowed from lint, the tiny bits of fiber and fluff shed by clothing, as the command he wrote would act like a lint trap in a clothes dryer, capturing waste fibers while leaving whole fabrics intact. The lint program was released outside of Bell Labs in Unix V7, in 1979. "In his 1978 paper, Johnson explained his reasons for creating a new program to detect errors: '...the general notion of having two programs is a good one' because they concentrate on different things, thereby allowing the programmer to 'concentrate at one stage of the programming process solely on the algorithms, data structures, and correctness of the program, and then later retrofit, with the aid of lint, the desirable properties of universality and portability' " What is ESLint? Website: https://eslint.org/ GitHub: https://github.com/eslint/e

## Add Type Checking and TSConfig to Bun-Create-Playwright

DevFeed: [Add Type Checking and TSConfig to Bun-Create-Playwright](<https://devfeed.tech/articles/add-type-checking-and-tsconfig-to-bun-create-playwright-22414.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/add-type-checking-and-tsconfig-to-bun.html>)

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

Published: 2026-08-08T03:10:43Z

Content type: tutorial

Language: en

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

Topics: [Bun](<https://devfeed.tech/topics/bun.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

This tutorial adds TypeScript type checking and tsconfig configuration to a Bun-Create-Playwright project. It explains why Playwright should be run alongside the TypeScript compiler and demonstrates using tsc --noEmit to check code without emitting output files.

### Source excerpt

Now that we have installed bun, Anthropic's package manager, and scaffolded a Playwright framework and closely examined the results, we are going to explore with our Bun-Create-Playwright project ways to check if our code is correct. The first method we will be exploring is typechecking. Why Typechecking? As the Playwright.dev / Node.js Introduction mentions: "[...] Playwright does not check the types and will run tests even if there are non-critical TypeScript compilation errors. We recommend you run TypeScript compiler alongside Playwright. "[...] Note that Playwright only supports the following tsconfig options: allowJs, baseUrl, paths, references and extends. "[...] By default, Playwright will look up a closest tsconfig for each imported file by going up the directory structure and looking for tsconfig.json or jsconfig.json. This way, you can create a tests/tsconfig.json file that will be used only for your tests and Playwright will pick it up automatically".Before we go further down this road... What is Type Checking? According to Type Checking in TypeScript: A Beginners Guide, every piece of data in TypeScript is given a "type", and this "type" determines what properties the data has, and what methods are available to it. The types can be things like a Number, String, Enum, Boolean, Array, Object, Type assertions, or others. Since all data in TypeScript is given a type, it means that the TypeScript compiler, tsc, can check every property to make sure it is being used correctly. It makes sure that the expected properties exist and that the methods and functions are all compatible. And best of all, you can run these checks in your IDE as you are writing the code! To run typechecking against our code, all we have to do is execute from the Terminal: tsc --noEmit Since we are just kicking the tires of our code to see what happens, we don't need to emit "compiler output files like JavaScript source code, source-maps or declarations. This makes room for another tool

## Scaffold and Run Playwright Tests with Bun

DevFeed: [Scaffold and Run Playwright Tests with Bun](<https://devfeed.tech/articles/what-happens-when-you-scaffold-a-playwright-framework-and-run-installed-tests-using-bun-22425.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/what-happens-when-you-create-playwright.html>)

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

Published: 2026-08-06T17:37:06Z

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>), [Bun](<https://devfeed.tech/topics/bun.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Windows](<https://devfeed.tech/topics/windows.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [test](<https://devfeed.tech/tags/test.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

A tutorial on creating a TypeScript Playwright project with Bun, installing its browsers on Windows, configuring a Bun lockfile and test script, and running the included tests. It notes that Playwright's test runner remains a Node.js program and documents an additional Bun and Playwright installation step for a Windows bug.

### Source excerpt

We covered in the last blog post how to install bun, a new package manager. In this blog post, we will look into using bun to install a new Playwright framework. Create the Playwright Framework Once I installed bun on my Windows PC and was up and running I created a new folder, "bun-create-playwright". I opened up that folder in VS Code, along with a new PowerShell terminal. In that terminal I entered: bun create playwright This activated the interactive Playwright installer that Playwright comes with. I selected I wanted it to create for me a TypeScript project, placing the tests in the default folder, tests, but I decided not to add a GitHub Actions workflow. I wanted to experiment with using GitLab. I chose it to set up and install all the browsers for me... which it did... using NPX, part of Node. Wait a second, when it comes to our Playwright framework, doesn't bun replace node? No. Bun might be a JavaScript runtime, a package manager, and a bundler shipped as a single software tool, but in our case we are simply using it as a package manager in our Playwright framework. Bun works alongside Node.js in the Playwright project. We still use Playwright's test runner, a Node.js program. Bun handles installations and run tasks. Alert: Windows Bug! Initially, that wasn't enough to install Playwright's internal browsers. There is a bug with bun + Playwright Windows where we also need to: bun add --dev @playwright/test bunx playwright install That was enough for the browsers to install. Create the Bun Lock File After the browsers are installed, we need to install bun in our project, to create from the package.json a bun installation. Run in the Terminal: bun install Review the newly created file bun.lock.file in the root directory of the project. Delete the package-lock.json file. Add the test script to the Package.json If you look in the package.json file, you can see that the scripts code block is currently empty. "scripts": {} Inside this code block, we will be addin

## Introducing bun, a new package manager and JavaScript runtime environment

DevFeed: [Introducing bun, a new package manager and JavaScript runtime environment](<https://devfeed.tech/articles/introducing-bun-a-new-package-manager-and-javascript-runtime-environment-22421.md>)

Original publisher: [Read original article](<https://www.tjmaher.com/2026/08/introducing-bun-new-package-manager-and.html>)

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

Published: 2026-08-06T01:58:25Z

Content type: article

Language: en

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

Topics: [Bun](<https://devfeed.tech/topics/bun.md>), [Package manager](<https://devfeed.tech/topics/package-manager.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [bun-create-playwright](<https://devfeed.tech/tags/bun-create-playwright.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [installation](<https://devfeed.tech/tags/installation.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [test-automation](<https://devfeed.tech/tags/test-automation.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

This article examines Bun as a JavaScript package manager and runtime, including its use with Playwright projects. It explains how Bun compares with npm, Yarn, and pnpm, and discusses its integrated tooling and claimed performance advantages.

### Source excerpt

New job? New toolset to explore! In this post I'll be investigating a new JavaScript package manager and runtime environment called bun.sh. You may have noticed on Playwright.Dev's Getting Started / Installation section there are three different ways to install a ui or api test automation framework with the latest version of Playwright: npm init playwright@latest yarn create playwright pnpm create playwright For this blog post I'll be investigating a fourth way, the new toolset they just started using at work, bun.sh. bun create playwright What is npm, yarn, pnpm, and bun? These are called package managers. What is a package? Developing a project, you don't have to figure out how to code everything yourself. You can include in your projects outside libraries, or "packages" of code from from the public JavaScript registry npmjs.com. The problem is that these packages then need to be downloaded, installed, managed, and updated whenever they are updated. JavaScript projects can use a package manager, such as bun, to help this process. When putting together a Playwright automation framework based around JavaScript and TypeScript, Playwright uses the Node.js JavaScript runtime environment, to run its test runner, execute automation scripts, and manage its browser instances.(See Nodejs.org / About ) There is a division of labor: Node.js runs these internal functions like running tests. NPM, Yarn, PNPM, and now Bun handle the packages. Why are there so many package managers? Each has its own specialization. The original NPM is bundled already with Node.js. Yarn is a Facebook toolset that was created when NPM was found to work too slow. PNPM was created to be smaller and therefore faster. And bun was built for quick startup and installation speed, good especially if you have a CI/ CD pipeline that has a LOT of packages to install each time the tests run. NPM, released in 2010, is the Node Package Manager for Node.js, a JavaScript Runtime Environment. According to NodeJS.org