What is Orchestra Testbench?
Orchestra Testbench is a Laravel testing helper designed for package development. By extendingOrchestra\Testbench\TestCase, you can test your package in isolation while still booting a Laravel application context.
Laravel’s package documentation also recommends Testbench for package testing workflows. See Laravel Package Development.
Setup
Writing your first tests
Start by testing package bootstrap behavior: provider registration, facade calls, and configuration values.Filesystem and database testing
For database tests, configure SQLite in-memory indefineEnvironment() and load your package migrations.
Testing across Laravel versions
Testbench major versions align with Laravel major versions. Check the official Version Compatibility table for updates.| Laravel | Testbench |
|---|---|
| 12.x | 10.x |
| 13.x | 11.x |
Summary
Testbench gives you a reliable, app-like test environment for package development without creating a full Laravel app manually. By covering providers, config, facades, and database behavior, you reduce regressions before release.Related pages
Laravel package development
Review package implementation fundamentals centered on service providers.
Package version compatibility management
Learn versioning strategy and CI matrix design for Laravel and Testbench.