npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vscode-playwright-test-runner

v1.4.0

Published

Simple way to run or debug a single (or multiple) tests from context-menu

Downloads

5

Readme

Playwright Test Runner

Running or debugging a specific test or test-suite by playwright.

VisualStudio Marketplace

Features

Simple way to run or debug a specific test As it is possible in IntelliJ / Webstorm

Run, Debug and Inspect your Playwright from

  • Context-Menu
  • CodeLens
  • Command Palette [ strg(ctrl) + shift + p ]

Supports

  • Run playwright test
  • Debug playwright test
  • Inspect playwrigt test
  • Show Playwright Test Report By json format
  • Genrate Playwright Test Code

Extension Example

Extension Settings

Playwright Test Runner will work out of the box, with a valid Jest config. If you have a custom setup use the following options to configure Playwright Test Runner:

Variable

sample : /workspace/packages/sample/tests/test.spec.js

| Variable | Description | sample | | --- | --- | --- | |${workspaceRoot}|the path of the project opened in vscode.| /workspace | |${packageRoot}|the path of directory with package.json.| /workspace/packages/sample | |${currentFile}|the current file | /workspace/packages/sample/tests/test.spec.js | |${fileBasename}|the current file name with ext.| test.spec.js | |${fileBasenameNoExtension}|the current file name without ext.| test.spec | |${fileExtname}|the current file name with ext.| .js | |${fileDirname}|the current file name with ext.| /workspace/packages/sample/tests |

Extension Settings for playwright

| Command | Description | | --- | --- | | playwrightrunner.playwrightCommand | Define an alternative playwright command (e.g. npx playwright) | | playwrightrunner.playwrightConfigPath | Playwright config path (relative to ${packageRoot} e.g. playwright.config.ts) | | playwrightrunner.playwrightRunOptions | Add CLI Options to the playwright Command (e.g. --headed) https://playwright.dev/docs/test-intro | | playwrightrunner.playwrightRunProject | Specify the project to run Test (e.g. chromium) | | playwrightrunner.playwrightDebugProject | Specify the project to run Debug (e.g. chromium) | | playwrightrunner.playwrightInspectProject | Specify the project to run inspector (e.g. chromium) | | playwrightrunner.playwrightEnvironmentVariables | Add Environment Variables (e.g. NODE_ENV=product) |

Extension Settings for common

| Command | Description | | --- | --- | | playwrightrunner.disableCodeLens | Disable CodeLens feature | | playwrightrunner.codeLensSelector | CodeLens will be shown on files matching this pattern (default **/*.{test,spec}.{js,jsx,ts,tsx}) | | playwrightrunner.projectPath | Absolute path to project directory (e.g. /home/me/project/sub-folder) | | playwrightrunner.changeDirectoryToWorkspaceRoot | Changes directory to workspace root before executing the test |

Shortcuts

click File -> Preferences -> Keyboard Shortcuts -> "{}" (top right) the json config file will open add this:

{
  "key": "alt+1",
  "command": "playwrightrunner.runTest"
},
{
  "key": "alt+2",
  "command": "playwrightrunner.debugTest"
},
{
  "key": "alt+3",
  "command": "playwrightrunner.inspectTest"
},

Want to start contributing features?

Some open topics get you started

Show Playwright Test Report

You can check the reporter (json) output by Playwright.

  • step 1
    create playwright.config
module.exports = {
    reporter:[ ['list'], [ 'json', {  outputFile: 'reports.json' }] ]
}
  • step 2
    Run playwright

  • step 3
    show playwright test report

image

Genearete Playwright Test Code

You can generate Playright test code.

  • step 1
    select "Generate Playwright Test Code" from right menu on explorer.

  • step 2
    please input filename to generate playwright test code.

  • step 3
    open browser and inspect

  • step 4
    close browser and genrate test code.

image