Scaffold Testing
Add Pest v4 + Orchestra Testbench v10 testing to an existing Laravel package
by mwguerra · MIT
The skill
Add Pest v4 + Orchestra Testbench v10 testing to an existing Laravel package
Pest Testing Scaffold Skill
Adds Pest v4 + Orchestra Testbench v10 testing infrastructure to an existing Laravel package that lacks testing.
Usage
When the user wants to add testing to an existing package:
python3 ${SKILL_DIR}/scripts/scaffold_testing.py <vendor/package-name> [options]
Options
--with-coverage- Add code coverage configuration--with-ci- Add GitHub Actions CI workflow--project-root- Specify project root directory
Examples
Basic testing setup
python3 ${SKILL_DIR}/scripts/scaffold_testing.py mwguerra/my-package
With CI
python3 ${SKILL_DIR}/scripts/scaffold_testing.py mwguerra/my-package --with-ci
Full setup
python3 ${SKILL_DIR}/scripts/scaffold_testing.py mwguerra/my-package --with-coverage --with-ci
What Gets Created/Updated
Files Created
- phpunit.xml — PHPUnit configuration with source coverage for
src/ - tests/Pest.php — Pest configuration with TestCase binding
- tests/TestCase.php — Orchestra TestCase with
WithWorkbenchtrait - tests/Unit/ExampleTest.php — Sample tests verifying environment and provider
- tests/Feature/.gitkeep — Feature tests directory
- .github/workflows/tests.yml (if
--with-ci)
composer.json Updates
{
"require-dev": {
"orchestra/testbench": "^10.0",
"pestphp/pest": "^4.0",
"pestphp/pest-plugin-laravel": "^4.0",
"orchestra/pest-plugin-testbench": "^4.0"
}
}
Running Tests
cd packages/vendor/package-name
composer install
./vendor/bin/pest
Use this skill
Connect your agent to the Skill Store MCP server and ask for it by ref: mwguerra/scaffold-testing-76406999858.
Details
- Publisher
- mwguerra
- Category
- Software Development › Testing & QA
- License
- MIT
- Updated
- 2026-04-28
References
More from mwguerra
- Article Writer Write technical articles with web research, runnable companion projects, and translations in auth…
- Author Profile Create author profiles via questionnaire or transcript analysis for consistent article voice
- Companion Project Creator Create complete runnable companion projects for articles - scaffolded projects, not snippets
- Queue Manage article task queue - add, filter, update status, and track multi-language outputs