php-test-run

Execute PHP tests with co-phpunit, including filtering and coverage reports.

3|1|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/nashgao/mqtt-client --skill php-test-run
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-test-run
Source: https://github.com/nashgao/mqtt-client/tree/main/.claude/skills/php-test-run
Command: npx skills add https://github.com/nashgao/mqtt-client --skill php-test-run

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the execution of PHP tests using co-phpunit, providing comprehensive options for filtering, coverage reporting, and failure handling, ensuring code quality and reliability.

Core Features & Use Cases

  • Flexible Test Execution: Run all tests, specific methods, classes, groups, or directories.
  • Coverage Reporting: Generate HTML, XML, JSON, and text coverage reports.
  • Failure Handling: Configure tests to stop on the first failure or error.
  • Use Case: When developing a new feature, use this Skill to run all unit tests and generate a coverage report to verify that your new code is well-tested and doesn't introduce regressions.

Quick Start

Run all PHP tests using vendor/bin/co-phpunit with testdox and colors enabled.

Frequently Asked Questions about php-test-run

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

FAQPage Schema
How do I run PHP tests with code coverage reporting in a CI pipeline?

You can execute PHP tests with code coverage by running co-phpunit through this Skill, which supports generating HTML, XML, and JSON coverage reports for continuous integration pipelines.

What is the best way to filter PHPUnit test execution to specific classes or directories?

Filtering PHPUnit test execution is handled by providing options to the co-phpunit command, allowing you to target specific test methods, classes, groups, or directories.

Does this Skill support parallel test execution for PHP projects?

Yes, this Skill supports parallel execution of PHP tests using the co-phpunit framework, helping to reduce testing time during local development and CI/CD workflows.

How do I stop PHP unit tests on the first failure or error?

You can configure the test execution to stop on the first failure or error using the robust failure handling mechanisms provided by the co-phpunit framework options.

Can I use co-phpunit with existing PHPUnit configurations?

Yes, this Skill uses co-phpunit to execute tests and supports features like testdox output, making it compatible with existing PHPUnit testing workflows and configurations.