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 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-playwright-framework

v0.0.26

Published

A modular Playwright framework with fixtures, loaders, and demo scaffolding.

Readme

📥 Single‑click Copyable README markdown

simple-playwright-framework

npm version
npm downloads
license
node
playwright
PRs welcome

A lightweight, modular automation framework built on top of Microsoft Playwright.
It helps teams quickly bootstrap scalable UI and API test automation projects with clean architecture, reusable fixtures, and ergonomic onboarding.

Repository: GitHub


✨ Key Features

  • Playwright-powered automation for browsers and APIs
  • Custom fixtures for authentication, storage state, and reusable contexts
  • Scenario loader for environment‑driven test data (JSON or API/DB integration)
  • Provider registry for flexible login flows (username, email, or custom auth)
  • Environment-aware configuration with safe defaults (prod fallback)
  • Reusable helpers for file upload/download, iframe handling, and API clients
  • Modern reporting with Playwright HTML, Allure, and TestRail integration
  • CLI scaffolding to generate demo projects with recommended structure
  • CI/CD ready with parallel safety and isolated test state
  • Extensible design: plug in your own providers, loaders, or reporters

📦 Installation

1. Install Playwright

npm install --save-dev @playwright/test playwright
2. Install the framework
bash
npm install simple-playwright-framework
🚀 Create a Demo Project
Use the CLI to scaffold a ready‑to‑run project:

bash
npx init-demo-project
This generates a demo project with fixtures, config, and sample tests.

▶️ Run Tests
Navigate into the generated project:

bash
cd demo-project
npx playwright test
Run with Playwright UI runner:

bash
npx playwright test --ui
🧪 Example Test
ts
import { test, expect } from '@playwright/test';
import { scenarioLoader } from 'simple-playwright-framework';

test('login works', async ({ page }) => {
  const data = scenarioLoader(__filename).get("validLogin");
  await page.goto(data.baseUrl);
  await page.fill('#username', data.username);
  await page.fill('#password', data.password);
  await page.click('#login');
  await expect(page).toHaveURL(/dashboard/);
});
📂 Project Structure
Example demo project:

Code
demo-project
│
├── tests
│   └── login.spec.ts
│
├── pages
│   └── login.page.ts
│
├── utils
│   └── apiClient.ts
│
├── config
│   └── environments.ts
│
├── auth
│   └── storageState.json
│
└── playwright.config.ts
🌍 Environment Configuration
ts
export const environments = {
  dev: { baseUrl: "https://dev.example.com" },
  qa:  { baseUrl: "https://qa.example.com" },
  prod:{ baseUrl: "https://prod.example.com" }
};
Run against different environments without changing test logic.

📊 Reporting
Supports:

Playwright HTML reports

Allure reports

TestRail integration

Generate Playwright report:

bash
npx playwright show-report
🛠 Challenges & Solutions
Compiled JS confusion → moved output to dist and enforced root‑level exports

Demo projects bypassing fixtures → documented imports from framework only

Scenario injection limits → iterated scenarios in test bodies, reporting adapted

Environment defaults missing → added safe fallback (prod)

Dependency resolution issues → onboarding scripts install required packages

Report formatting limitations → modernized with inline CSS and branded colors

Auth provider rigidity → introduced provider registry for flexible login flows

Parallel safety concerns → kept state test‑scoped, avoided global mutation

Demo project scaffolding risks → added warnings and safe file writes

🤝 Contributing
Contributions are welcome.

Fork the repository

Create a feature branch

Commit your changes

Submit a pull request

Please ensure that code changes include appropriate tests and follow existing coding conventions.

📜 License
MIT License

👤 Author
Developed by Udayakumar  
GitHub: https://github.com/Udayakumarg

Code

---

👉 Just copy everything above into a file named `README.md` in your repo.  
If you’d like, I can also prepare a **shorter npm landing page version** (featur