Skip to content

coders-tm/laravel-core / .agents/skills/testbench-docs

testbench-package-testing

Verified

Develops and tests Laravel packages using Orchestra Testbench. Activates when writing package tests, configuring testbench.yaml, managing migrations, defining routes/environment for tests, using Testbench Dusk for browser tests, or working with Workbench for package preview.

workbench.md

View on GitHub
---
prev: false
next: false
---

# Introduction

Workbench provides a set of configurable actions and commands to allow previewing, interacting, and serving your Laravel packages during development. 

This component is accessible via `orchestra/testbench` without any further requirements.

## Installing

You can install **Workbench** using the following command:

```bash
composer require --dev "orchestra/testbench"
```

Next, you can run the following command to scaffold your package with the recommended setup:

```bash
vendor/bin/testbench workbench:install
```

## Version Compatibility

 Laravel  | Workbench   
:---------|:-----------
 9.x      | 7.x
 10.x     | 8.x
 11.x     | 9.x
 12.x     | 10.x

## Configuration

Please refer to [Configuration](/getting-started/configuration#workbench-configuration) documentation for further details.

## Getting Started

Workbench provides helpers on top of Testbench to allow package developers to interacts and preview Laravel packages without having the need to require it in a Laravel application. 

### `serve` Command

Similar to `composer run dev` available in latest Laravel application, you can preview the configured package using the following command:

```bash
composer run serve
```
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall