activitypub-testing

Automate PHPUnit and Playwright tests for the WordPress ActivityPub plugin.

576|90|Updated Jul 10, 2018
One-click install
npx skills add https://github.com/Automattic/wordpress-activitypub --skill activitypub-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: activitypub-testing
Source: https://github.com/Automattic/wordpress-activitypub/tree/main/.claude/skills/activitypub-testing
Command: npx skills add https://github.com/Automattic/wordpress-activitypub --skill activitypub-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and debugging tests for a complex WordPress plugin can be time-consuming and error-prone. This Skill provides structured guidance to simplify the process, helping you quickly implement, run, and debug tests for ActivityPub features.

Core Features & Use Cases

  • PHPUnit Testing: Guidance on structuring PHP tests, common patterns, and using test groups for efficient execution.
  • Playwright E2E Testing: Examples for writing robust end-to-end tests, including scenarios for federation.
  • Debugging & Coverage: Instructions for isolating tests, generating verbose output, and creating comprehensive coverage reports to ensure code quality.

Quick Start

Run all PHP tests for the ActivityPub plugin to verify functionality.

Frequently Asked Questions about activitypub-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write and run PHPUnit tests for a WordPress plugin?

PHPUnit tests for WordPress plugins follow structured patterns with test groups for efficient execution. This Skill provides guidance on test structure, common patterns, and running PHP tests to verify plugin functionality.

Can I write end-to-end tests for WordPress federation features?

Yes. Playwright E2E testing is supported for ActivityPub federation scenarios. This Skill includes examples for writing robust end-to-end tests that validate federation interactions and complex workflows.

How do I debug tests and generate coverage reports?

Debugging involves isolating specific tests and generating verbose output to identify failures. This Skill provides instructions for creating comprehensive coverage reports to ensure code quality and identify untested code paths.

What's the best way to mock HTTP requests in ActivityPub tests?

HTTP request mocking is built into the test utilities provided by this Skill. Mocking enables you to simulate federation interactions without external dependencies, ensuring tests run reliably and quickly.

Do I need both PHPUnit and Playwright to test ActivityPub features?

No. PHPUnit handles unit and integration tests for PHP logic, while Playwright covers end-to-end scenarios. This Skill covers both; choose based on what you're testing—server-side logic or user-facing workflows.