eldinbiz / laravel-rubberstamp
Helping You, corporate slave programmer, to make Test Report your manager will blindly sign without reading.
Fund package maintenance!
Requires
- php: ^8.3
- illuminate/support: ^12.0||^13.0
- laravel/prompts: ^0.1||^0.2||^0.3
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/agent-detector: ^2.0
- laravel/chisel: ^0.1
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- laravel/prompts: ^0.3
- orchestra/testbench: ^10.0||^11.0
- pestphp/pest: ^4.6||^5.0
- pestphp/pest-plugin-laravel: ^4.1||^5.0
- pestphp/pest-plugin-type-coverage: ^4.0||^5.0
- phpstan/extension-installer: ^1.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-22 09:32:02 UTC
README
RubberStamp
Helping Me, corporate slave programmer, to make Test Report the manager will blindly sign without reading.
Overview
I just wrote pristine Pest tests, my CI pipeline is glowing green, and my commit history is flawless. Too bad none of that matters to my managers in the corporate world.
Automated test results would happily live in Git history, a Confluence page, a Microsoft Loop workspace, or a Markdown file in my repo. But as a corporate slave developer surviving in an enterprise compliance dungeon, I am required to produce formal, printable test reports—complete with document control numbers, SOP tracking codes, and multi-tier managerial sign-off blocks that someone will inevitably print onto paper, sign by hand, place into a binder, and never see the light again.
RubberStamp is a Laravel package I vibe coded so that I never have to spend my Friday afternoon manually copy-pasting terminal output, cropping browser screenshots, and assembling test documents.
With a single Artisan command, RubberStamp runs Pest tests, flushes configuration and view caches, records audit logs, captures visual browser snapshots, and automatically compiles a print-ready, single-file HTML test report complete with sign-off blocks. Hand over the generated test report, my manager will blindly "review" and sign it, feeling like they've achieved something monumental in the project governance.
Key Features
- Print-Ready HTML Reports: Generates self-contained, print-ready corporate documentation complete with Document IDs, revision codes, execution durations, and test suite breakdowns.
- Customizable Reports: Personalize report branding with your company name, corporate logo, confidentiality classification (e.g.,
CONFIDENTIAL,INTERNAL USE ONLY), custom Document ID prefixes, and even swap in custom Blade report templates (report_view) via configuration or environment variables. - Sign-Off Matrices: Dynamically append structured sign-off sheets for Testers, Reviewers, Approvers, and Acknowledgers directly into the report.
- Browser Snapshots: Executes Pest browser tests and automatically captures visual snapshots—embedded directly as base64 images into the standalone audit report without modifying host application test classes.
- Interactive Terminal Wizard: Configure audit metadata, SOP references, and reviewer names on the fly before running tests using the
-iflag. - Self-healthcheck: Built-in diagnostic check (
--doctor) for Playwright browsers, Node dependencies, and container environments prior to doing browser tests. - Timestamped Execution Logs: Streams real-time test runs into
doctest-reports/test-log/ordoctest-reports/browser-test-log/for complete auditability. - Standalone Document Compiler: Recompile reports anytime from existing test logs without re-executing suites (
php artisan rubberstamp:document). - Clean Up Your Test Results Log: Artifact pruning with customizable retention periods and dry-run safety (
php artisan rubberstamp:prune).
Installation
Install the package via Composer:
composer require eldinbiz/laravel-rubberstamp
Configuration (Optional)
The package works completely out of the box with zero configuration. If you wish to customize output directories, retention policies, Chromium paths, or default sign-off roles, publish the configuration file:
php artisan vendor:publish --tag="rubberstamp-config"
Usage
RubberStamp Suite Overview
Run the root command for a quick summary of all available RubberStamp commands:
php artisan rubberstamp
Running Feature & Unit Tests (rubberstamp:features)
Run Pest unit and feature tests with automatic configuration/view cache clearing, timestamped execution logging, and automated corporate HTML report generation.
Main Command
php artisan rubberstamp:features [target] [options]
Arguments & Options
target(argument): Optional test file or directory path to execute. If omitted, executes all suites defined in yourphpunit.xml.- Example:
php artisan rubberstamp:features tests/Feature/OrderProcessingTest.php
- Example:
--selected-test-suite: Interactively select one or more test suites or test classes to execute using terminal checkboxes (Laravel\Prompts\multiselect).- Example:
php artisan rubberstamp:features --selected-test-suite
- Example:
--document-id=: Custom Document ID prefix for the generated corporate audit report. (Defaults toDOC-TEST-orRUBBERSTAMP_DOCUMENT_ID_PREFIX).- Example:
--document-id="UAT-ERP"
- Example:
--sop=: Associated Standard Operating Procedure (SOP) policy or RFC ticket code. (Defaults toN/AorRUBBERSTAMP_SOP).- Example:
--sop="SOP-DEV-002"
- Example:
--author=: Tester or author name. (Defaults to Git configureduser.nameorRUBBERSTAMP_AUTHOR).- Example:
--author="Jane Doe"
- Example:
--reviewed-by=: Pipe-separated list of reviewer names and roles (Name,RoleorRole).- Example:
--reviewed-by="Mr Smith,QA Engineer|Taylor,QA Lead|QA Head"
- Example:
--approved-by=: Pipe-separated list of approver names and roles (Name,RoleorRole).- Example:
--approved-by="Jane,Technical Lead|CTO"
- Example:
--acknowledged-by=: Pipe-separated list of acknowledger names and roles (Name,RoleorRole).- Example:
--acknowledged-by="Bob,Product Owner"
- Example:
-i,--interactive: Launch an interactive terminal wizard to configure audit metadata and sign-offs before test execution.- Example:
php artisan rubberstamp:features -i
- Example:
--no-doc: Run tests and stream output to log files, but skip generating the corporate HTML documentation report.- Example:
php artisan rubberstamp:features --no-doc
- Example:
--skip-clear: Skip automated pre-test cache clearing (config:clearandview:clear).- Example:
php artisan rubberstamp:features --skip-clear
- Example:
--pest-path=: Custom path to the Pest test runner binary.- Example:
--pest-path="vendor/bin/pest"
- Example:
Running Browser Tests (rubberstamp:browser)
Run Pest browser tests with Playwright environment health checks, Vite hot-reload protection, and automated visual snapshot capture embedded as base64 images into the audit report.
Note
Zero-Configuration Browser Testing:
Unlike typical browser testing setups, you do not need to add traits like CapturesBrowserSnapshots or edit tests/TestCase.php / tests/Pest.php in your host application. The rubberstamp:browser command automatically boots snapshot hooks and page trackers at runtime.
Main Command
php artisan rubberstamp:browser [target] [options]
Arguments & Options
target(argument): Optional browser test file or directory path to execute. (Defaults totests/Browser).- Example:
php artisan rubberstamp:browser tests/Browser/LoginFlowTest.php
- Example:
--selected-test-suite: Interactively select one or more browser test classes or suites to execute using terminal checkboxes.- Example:
php artisan rubberstamp:browser --selected-test-suite
- Example:
--doctor,--check: Run pre-flight Playwright environment, Node dependencies, and Chromium binary diagnostics only without running tests.- Example:
php artisan rubberstamp:browser --doctor
- Example:
--skip-health-check: Skip the pre-flight environment health check and run browser tests directly.- Example:
php artisan rubberstamp:browser --skip-health-check
- Example:
--document-id=: Custom Document ID prefix for the generated browser audit report. (Defaults toDOC-TEST-orRUBBERSTAMP_DOCUMENT_ID_PREFIX).- Example:
--document-id="UAT-BROWSER"
- Example:
--sop=: Associated Standard Operating Procedure (SOP) policy or RFC ticket code. (Defaults toN/AorRUBBERSTAMP_SOP).- Example:
--sop="SOP-UI-004"
- Example:
--author=: Tester or author name. (Defaults to Git configureduser.nameorRUBBERSTAMP_AUTHOR).- Example:
--author="Jane Doe"
- Example:
--reviewed-by=: Pipe-separated list of reviewer names and roles (Name,RoleorRole).- Example:
--reviewed-by="Mr Smith,QA Engineer|Taylor,QA Lead"
- Example:
--approved-by=: Pipe-separated list of approver names and roles (Name,RoleorRole).- Example:
--approved-by="Jane,Technical Lead|CTO"
- Example:
--acknowledged-by=: Pipe-separated list of acknowledger names and roles (Name,RoleorRole).- Example:
--acknowledged-by="Bob,Product Owner"
- Example:
-i,--interactive: Launch an interactive terminal wizard to configure audit metadata and sign-offs before test execution.- Example:
php artisan rubberstamp:browser -i
- Example:
--no-doc: Run browser tests but skip generating the corporate HTML documentation report.- Example:
php artisan rubberstamp:browser --no-doc
- Example:
--pest-path=: Custom path to the Pest test runner binary.- Example:
--pest-path="vendor/bin/pest"
- Example:
Standalone Documentation Compiler (rubberstamp:document)
Generate or re-compile corporate HTML reports from existing test logs without re-running test suites. Useful when you need to regenerate an audit report with updated SOP codes or sign-off names.
# Compile documentation for the latest test run php artisan rubberstamp:document # Compile documentation for a specific run or log file php artisan rubberstamp:document test_20260910_031304 # Interactively configure metadata and sign-offs for an existing run php artisan rubberstamp:document test_20260910_031304 -i # Customize metadata directly via options php artisan rubberstamp:document test_20260910_031304 \ --document-id="AUDIT-2026" \ --sop="SOP-AUDIT-001" \ --approved-by="Compliance Lead"
Pruning Test Artifacts & Logs (rubberstamp:prune)
Purge obsolete test execution logs, generated corporate HTML reports, and browser visual snapshots to reclaim disk space:
# Prune artifacts older than the default retention period (7 days) php artisan rubberstamp:prune # Dry run: preview candidate items and reclaimed disk space without deleting php artisan rubberstamp:prune --dry-run # Prune artifacts older than 48 hours php artisan rubberstamp:prune --hours=48 --force # Retain only the latest 10 test runs and prune older ones php artisan rubberstamp:prune --keep=10 --force # Prune only specific artifact types ('reports', 'logs', 'snapshots') php artisan rubberstamp:prune --type=snapshots --force # Prune all test artifacts (prompts two-step confirmation unless --force is used) php artisan rubberstamp:prune -a php artisan rubberstamp:prune --all --force
Available Pruning Options
-a,--all: Prune all test artifacts regardless of age (prompts two-step confirmation).- Example:
php artisan rubberstamp:prune -a
- Example:
--hours=: Prune artifacts older than specified hours.- Example:
--hours=24
- Example:
--days=: Prune artifacts older than specified days.- Example:
--days=14
- Example:
--keep=: Keep the latest N test runs and prune older ones.- Example:
--keep=5
- Example:
--type=: Limit pruning to a specific type (all,reports,logs,snapshots).- Example:
--type=reports
- Example:
--dry-run: Simulate pruning and display matching files without deleting.- Example:
--dry-run
- Example:
--force: Force deletion without confirmation prompt.- Example:
--force
- Example:
Customizing the Report View
You can customize or replace the default report template.
To publish the default Blade template into your application's resources/views/vendor/rubberstamp:
php artisan vendor:publish --tag="rubberstamp-views"
Or configure your own custom Blade view in config/rubberstamp.php:
'report_view' => 'reports.corporate',
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Thank you for considering contributing to RubberStamp! Please review our contributing guide to get started.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
RubberStamp is open-sourced software licensed under the MIT license.