Skip to content

Repository files navigation

WP Tester

A CLI tool for testing WordPress plugins and themes using WordPress Playground.

Documentation

npm version License: GPL-2.0

Quick Start

# Install as dev dependency (recommended)
npm install --save-dev @wp-tester/cli

# Setup and run tests
wp-tester setup
wp-tester test

Or run directly without installing:

npx @wp-tester/cli@latest setup

See the Installation Guide for details on when to use each approach.

Features

  • Matrix Testing - Test across multiple PHP and WordPress versions
  • Multiple Test Types - Smoke tests, PHPUnit tests, and custom tests
  • WordPress Playground - Isolated environments with no local setup
  • Flexible Configuration - JSON-based with IDE autocomplete support
  • GitHub Actions Integration - Auto-generate CI workflows with wp-tester config ci

Documentation

Example Configuration

{
  "$schema": "https://raw.githubusercontent.com/bgrgicak/wp-tester/trunk/packages/config/src/schema.json",
  "environments": [
    {
      "name": "PHP 8.2 + WP 6.7",
      "blueprint": {
        "preferredVersions": {
          "php": "8.2",
          "wp": "6.7"
        }
      }
    }
  ],
  "tests": {
    "plugin": "my-plugin",
    "wp": true
  }
}

See Configuration Documentation for more examples.

License

GPL-2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages