activitypub-testing
PHPUnit and Playwright E2E testing patterns for the WordPress ActivityPub plugin.
Introduction
This skill provides a standardized framework for testing the WordPress ActivityPub plugin, focusing on both backend unit testing via PHPUnit and frontend end-to-end testing with Playwright. It is designed for developers working on federated social web features, specifically those implementing ActivityPub protocols, transformers, and handlers. By utilizing this skill, you can ensure consistency across your test suite, reduce debugging time, and maintain high code coverage for complex network-dependent features.
-
Integrates PHPUnit testing structures for WordPress, including WP_UnitTestCase setup, teardown, and functional tests.
-
Provides Playwright boilerplate for E2E testing of the ActivityPub settings page and WebFinger discovery workflows.
-
Includes standardized documentation for test grouping using annotations like @group activitypub and @group federation.
-
Offers guidance on utilizing test data factories to create mock users, posts, and comments within the WordPress environment.
-
Facilitates efficient test execution with custom commands for unit, E2E, and JS-specific test suites.
-
Ensure you have the test environment initialized by following the testing reference path (../../../tests/README.md) provided in the repository.
-
Use the provided debugging patterns, such as combining var_dump or error_log with --verbose and --debug flags to isolate failing tests effectively.
-
Employ the --filter or --stop-on-failure arguments when running npm run env-test to isolate specific logic within large test suites.
-
Prioritize mocking external HTTP requests using the recommended testing utilities to keep tests deterministic and performant.
-
Always verify your local environment setup, especially for Playwright, as browser-based tests require a running WordPress instance and proper database configuration.
Repository Stats
- Stars
- 195
- Forks
- 26
- Open Issues
- 4
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 30, 2026, 09:28 AM