New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

playwright-test-workflow

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playwright-test-workflow

Global test workflow package for Playwright with custom reporters

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Playwright Test Workflow

A global testing workflow package for Playwright that provides:

  • Automated test grouping by serial numbers (TEST#1, TEST#2, etc.)
  • Custom reporters for text and HTML output
  • Separate reports for each test group
  • Template files for consistent testing across projects

Installation

# Install globally
npm install -g playwright-test-workflow

# Or install locally in your project
npm install --save-dev playwright-test-workflow

Quick Start

# Initialize workflow in your project
test-workflow init my-app

# Run tests
npx playwright test

# Check results in test-results/ folder

Features

Custom Reporters

  • Text Reporter: Generates simple text files with pass/fail status
  • HTML Reporter: Creates beautiful HTML reports with styling
  • Group Reports: Separate files for each test group (TEST#1, TEST#2, etc.)

File Structure

your-project/
├── test.md                    # Test planning document
├── playwright.config.js       # Playwright configuration
├── tests/                     # Test files
├── test-results/              # Generated reports
│   ├── TEST#1-results.txt     # Group-specific text report
│   ├── TEST#1-results.html    # Group-specific HTML report
│   ├── TEST#2-results.txt
│   ├── TEST#2-results.html
│   └── test-results.json      # Overall JSON report
└── reporters/                 # Custom reporter files

Usage

1. Initialize Workflow

test-workflow init [project-name]

2. Plan Your Tests

Edit test.md to add your specific test cases:

### TEST#1 - Core Functionality
- [ ] Feature loads successfully
- [ ] Main functionality works as expected

### TEST#2 - User Interface  
- [ ] UI elements display correctly
- [ ] User interactions are responsive

3. Write Tests

Create test files in tests/ directory. The reporters automatically group tests based on keywords.

4. Run Tests

npx playwright test

5. Check Results

  • Individual group reports: test-results/TEST#1-results.txt, test-results/TEST#1-results.html
  • Overall reports: test-results/test-results.json, playwright-report/index.html

Test Grouping Logic

Tests are automatically grouped based on keywords in test names:

  • TEST#1: load, display, show, heading, button, input, result display
  • TEST#2: calculate, sum, negative, zero, large, decimal
  • TEST#3: empty, non-numeric, precision, error, validation
  • TEST#4: responsive, clickable, accept, update, ui, ux

Configuration

You can customize test grouping patterns in your playwright.config.js:

reporter: [
  ['playwright-test-workflow/reporters/text-reporter.js', { 
    outputFile: 'test-results/test-results.txt',
    testGroupPatterns: {
      'TEST#1': ['login', 'auth', 'signup'],
      'TEST#2': ['dashboard', 'navigation', 'menu'],
      // ... custom patterns
    }
  }]
]

Workflow

  • Create Feature → 2. Update test.md → 3. Number Tests → 4. Run Tests → 5. Generate Reports → 6. Update test.md with Results

Perfect for maintaining consistent testing across multiple projects!

Keywords

playwright

FAQs

Package last updated on 18 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts