Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpunit Detailed Printer Laravel Package

limedeck/phpunit-detailed-printer

Pretty, information-rich PHPUnit output for CLI runs. Shows tests grouped by suite/class with timing, memory, and clearer failure details so you can spot slow tests and debug faster than with the default printer. Works as a drop-in custom printer.

Deep Wiki
Context7

Getting Started

Install via Composer: composer require --dev limedeck/phpunit-detailed-printer. Then configure PHPUnit to use the printer in phpunit.xml by adding <printer class="LimeDeck\PHPUnit\Printer" /> inside <phpunit><printer> tags. Run your tests—e.g., ./vendor/bin/phpunit—and you’ll immediately see richer output with test names, pass/fail status, and visual markers (✅, ❌, ⚠️, ⏭️) without modifying any test code.

Implementation Patterns

  • Local Development: Ideal forday-to-day TDD workflows where fast feedback on individual test results matters more than compact output. Enables quick scanning of test runs, especially in larger suites.
  • CI Integration: Use in CI pipelines (e.g., GitHub Actions, GitLab CI) where logs must be human-readable—avoid truncated output by piping or saving logs to files and reviewing them with context.
  • Hybrid Output: Combine with other reporters (e.g., JUnit) for machine-consumption (e.g., via <logfile type="junit">), using detailed-printer for visual diagnostics and JUnit for reporting dashboards.
  • Environment Switching: Maintain separate phpunit.xml.dist (default printer) and phpunit.local.xml (with detailed-printer) for team consistency vs. local preference.

Gotchas and Tips

  • Last Release (2020): Verify compatibility with your PHPUnit version—primarily tested for PHPUnit ≤9. For PHPUnit 10+, ensure the class alias or namespace hasn’t changed (may need minor patching or fallback to phpunit/phpunit built-in --testdox).
  • CI Logging Quirk: If using headless CI with suppressed ANSI, ensure your pipeline doesn’t strip colors/styling—enable --force-ansi or use phpunit-detailed-printer only in non-CI local setups unless log readability is critical.
  • Extensibility Gap: Printer is monolithic—custom formatting or field additions require forking and modifying Printer.php. For minor tweaks (e.g., adding test duration), consider overriding output via custom logging listeners instead.
  • Debugging Failures: Failure messages include traceback fragments, but not full stack traces—enable PHPUnit’s phpunit.xml <printer>-level <log type="tap" /> or -v verbosity flag for full details when needed.
  • Known Performance: Slight overhead in massive test suites (>1k tests)—disable in CI unless post-run review is essential. Use phpunit --printer=LimeDeck\\PHPUnit\\Printer for one-off runs.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport