Skip to main content

No project description provided

Project description

Playwright Project Setup CLI Tool

A Python CLI tool that quickly scaffolds a complete Playwright test automation project with TypeScript, organized structure, and QA best practices.

Features

  • Quick Setup: Creates a full Playwright project in seconds
  • Organized Structure: Separates E2E, frontend, backend tests with POM pattern
  • Multi-browser: Pre-configured for Chromium, Firefox, and WebKit
  • Test Data: Faker.js integration for dynamic test data
  • TypeScript: Full TypeScript support with proper configuration
  • Best Practices: Includes fixtures, utilities, and Page Object Models
  • Custom Location: Use --path to specify where to generate your project
  • Safe Execution: Preview changes with --dry-run or force overwrites with --force

Prerequisites

  • Python 3.7+
  • Node.js 18+
  • npm

Installation & Usage

Option 1: Install via pip (Coming Soon)

pip install qa-gen
qa-gen my-project

Option 2: Clone and Run Locally

# Clone the repository
git clone https://github.com/yourusername/qa_automation_project_setup.git
cd qa_automation_project_setup

# Run the CLI tool
python main.py my-test-project

# With options
python main.py my-test-project --force --dry-run --path /your/target/path

Command Options

python main.py <project-name> [options]

Options:
  --force        Overwrite existing files
  --dry-run      Preview what would be created without making changes
  --clean        Remove generated files from a project
  --path <dir>   Choose custom path to generate the project

Examples

# Create a new project
qa-gen new-playwright-tests

# Use a custom location
qa-gen test-project --path /home/user/projects

# Preview without creating anything
qa-gen project-name --dry-run

# Overwrite an existing project
qa-gen my-existing-project --force

# Clean an existing project
qa-gen outdated-project --path /home/user/old_projects --clean

Generated Project Structure

my-test-project/
├── playwright.config.ts           # Playwright configuration
├── tsconfig.json                  # TypeScript configuration
├── package.json                   # Node.js dependencies
├── .gitignore                     # Git ignore patterns
├── README.md                      # Project documentation
└── tests/
    ├── e2e/                       # End-to-end tests
    ├── front_end/feature_one/     # Frontend UI tests
    ├── back_end/feature_one/      # Backend API tests
    └── support/
        ├── POMs/feature_one/      # Page Object Models
        └── utils/                 # Test utilities
            ├── helpers.ts         # Common functions
            ├── test-data.ts       # Test data with Faker.js
            └── fixtures.ts        # Playwright fixtures

What Gets Installed

The CLI automatically installs the following npm packages:

  • playwright - Browser automation framework
  • @playwright/test - Test runner and assertions
  • typescript - TypeScript support
  • ts-node - Run TS files directly
  • @faker-js/faker - Realistic test data
  • dotenv - Environment variables

Running Tests in Your New Project

cd my-test-project

# Run all tests
npx playwright test

# Run tests in a folder
npx playwright test tests/front_end

# Run with browser UI
npx playwright test --headed

# View the test report
npx playwright show-report

Built with ❤️ to help QA Engineers move faster and write better tests.

README generated with GPT-4.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qa_project_gen-0.1.3.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qa_project_gen-0.1.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file qa_project_gen-0.1.3.tar.gz.

File metadata

  • Download URL: qa_project_gen-0.1.3.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for qa_project_gen-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e7c5bb31bdcf36f3dca812d33a6fc1be2770c9548c1176c9911a3a03048985d2
MD5 9037ee5221cddb2fb60f0bde487fb3fa
BLAKE2b-256 0f87a398bbf492f2c93913bc1f14bb815598362904e4ef818e51d38fc569f7b8

See more details on using hashes here.

File details

Details for the file qa_project_gen-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: qa_project_gen-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for qa_project_gen-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a8956f4264013f6aa3daf64a478acac7f6d6daed3a9c0840dce8d0acf45b505
MD5 53ba2cbf34d137723fbbbc78e15454ab
BLAKE2b-256 3bae171b5a3242e7c462383c248caf7468e368c780c46740b5e352d94e9872d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page