activitypub-testing

Guide PHPUnit and Playwright testing for WordPress ActivityPub plugin features.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill activitypub-testing-microck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: activitypub-testing
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/activitypub-testing
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill activitypub-testing-microck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phpunit, playwright.

What problem does it solve?

Testing ActivityPub plugin features, especially federation and E2E scenarios, can be complex and require specific testing patterns and environment setups. This Skill provides guidance for writing and running PHPUnit and Playwright tests.

Core Features & Use Cases

  • PHPUnit Test Patterns: Structure and implement unit tests for PHP-based ActivityPub components, including transformers and handlers.
  • Playwright E2E Testing: Write end-to-end tests for web features, such as settings page loading and WebFinger discovery.
  • Test Data Management: Utilize test data factories for creating users, posts, and comments to ensure realistic test scenarios.
  • Use Case: When developing a new federation feature for the WordPress ActivityPub plugin, use this skill to guide you in writing both PHPUnit tests for the backend logic and Playwright E2E tests to verify the end-to-end user experience and federation capabilities.

Quick Start

Write a Playwright E2E test to verify that the ActivityPub settings page loads correctly and displays the main heading.

Frequently Asked Questions about activitypub-testing

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

FAQPage Schema
How do I write PHPUnit tests for ActivityPub WordPress plugin features?

PHPUnit tests for ActivityPub cover unit testing of PHP components like transformers and handlers. Structure tests using PHPUnit patterns, utilize test data factories to create realistic users and posts, mock HTTP requests for federation scenarios, and leverage test utilities to ensure reproducible, well-structured tests across environments.

Can I use Playwright to test ActivityPub federation end-to-end?

Yes, Playwright E2E tests verify ActivityPub web features like settings page loading and WebFinger discovery. Write end-to-end tests to confirm user experience and federation capabilities function correctly, ensuring settings render properly and federation endpoints respond as expected.

What's the best way to structure test data for ActivityPub plugin testing?

Test data factories create realistic users, posts, and comments for ActivityPub scenarios. These factories generate consistent test data across test runs, enable mocking of federation interactions, and support both PHPUnit and Playwright tests to ensure reproducible testing environments.

How do I debug failing ActivityPub tests in PHPUnit and Playwright?

ActivityPub testing includes debugging workflows for both PHPUnit and Playwright, with coverage reporting to identify gaps. Use test grouping annotations, examine mocked HTTP requests, and review test utilities to isolate failures and verify federation logic behaves correctly.

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

ActivityPub testing uses both tools for complete coverage: PHPUnit handles backend logic like transformers and handlers, while Playwright tests end-to-end user workflows and federation. Together they ensure backend correctness and real-world federation scenarios work as designed.