Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
What is Testbench Workbench?
Orchestra Testbench is focused on automated tests. With Workbench, you also get a small Laravel app inside your package repository for interactive development. Use it as a continuation ofpackage-testing when you need UI checks, route verification, and seeded integration scenarios.
Setup
Install Workbench scaffold
- Creates the
workbench/directory structure - Adds Workbench namespaces to
composer.jsonautoload-dev - Adds build scripts to
composer.jsonscripts
workbench:install prepares the workbench/ tree, autoload-dev, and related scripts in one step.composer.json includes the following:
Define your environment in testbench.yaml
Usetestbench.yaml in the package root to control providers, migrations, and build steps.
| Key | Description |
|---|---|
providers | Service providers to load in the Workbench environment |
migrations | Migration directories to run |
workbench.start | Default URL when running composer serve |
workbench.discovers | Control Laravel package auto-discovery |
workbench.build | Commands to run during the build step |
testbench.yaml:
Workbench directory structure
workbench
app
Http
Models
Providers
bootstrap
config
database
factories
migrations
seeders
public
resources
routes
storage
Core features Workbench gives you
WorkbenchServiceProvider
Create a service provider to register Workbench-specific services and wire up demo routes and views.Routes and controllers
Place development routes inworkbench/routes/web.php and workbench/routes/api.php so you can verify package behavior from a browser or HTTP client.
Migrations and seeders
Useworkbench/database/migrations and workbench/database/seeders to test your package against realistic schema and data.
Local runtime and console workflows
Run Artisan commands throughvendor/bin/testbench.
Testing with the WithWorkbench trait
Use theWithWorkbench trait to apply testbench.yaml configuration to your automated test suite.
Combine Workbench with automated tests
Use Workbench for interactive checks and keep yourtests/ directory for repeatable automated assertions.
- Automation: regression safety in
tests/ - Interactive verification: end-to-end behavior in
workbench/
Troubleshooting
Workbench fails to build
Workbench fails to build
Check
testbench.yaml syntax and provider configuration. YAML indentation errors are a common cause.Routes are not loading
Routes are not loading
Verify the route file paths and the WorkbenchServiceProvider registration. Confirm that
discovers.web is set to true in testbench.yaml.Database errors
Database errors
Check that migration paths are correct. When using SQLite, make sure the
create-sqlite-db build step is included.Related pages
Testing Laravel packages with Orchestra Testbench
Start with the package testing foundation first.
Package version compatibility management
Learn version mapping and CI matrix strategy for Laravel and Testbench.