testo/data
Testo Data provider plugin: parameterize one test into many dataset-driven runs. Supports inline tuples, named datasets, cartesian product (cross), zipped iteration, and unions across multiple sources. Install via composer require --dev testo/data.
create(), assertDatabaseHas()) with Testo’s data providers via custom wrappers, enabling hybrid test suites.testo/data + Testo’s HTTP plugin.assertDatabaseHas() in Testo tests for declarative assertions.Adopt if:
testo/data for complex parameterized tests while keeping PHPUnit/Pest for simpler cases.Look elsewhere if:
@dataProvider or Pest’s with() suffice.For Executives: "This plugin lets QA automate 10x more test scenarios—like validating every user role/permission combo—without writing repetitive code. By standardizing data-driven tests, we’ll catch critical bugs earlier, reduce manual QA effort, and accelerate releases. It’s a low-risk investment: we can pilot it in non-critical areas first."
For Engineering:
"Testo/Data replaces PHPUnit’s clunky @dataProvider with Cartesian products, named datasets, and unions, cutting test setup time by 50%. It’s a lightweight, framework-native solution that plays well with Laravel if we wrap its helpers. Perfect for teams migrating from PHPUnit or scaling test coverage for complex workflows (e.g., payments, auth).
Example:
Data::cartesian([
['role' => 'admin', 'action' => 'delete'],
['role' => 'user', 'action' => 'edit'],
])->it('should $action as $role', function ($role, $action) {
$user = User::factory()->create(['role' => $role]);
// Test Laravel-specific permissions...
});
```*
*No new dependencies—just cleaner, more expressive tests."*
**For QA/Devs**:
*"Say goodbye to copy-pasted test cases. With `testo/data`, you define **one test** and let it run against **dozens of inputs** (e.g., empty strings, nulls, edge cases). It’s like PHPUnit’s `@dataProvider` but **smarter**—supports combinations, unions, and even Laravel’s factories if we build a bridge. Try it on your flakiest test suite first!"*
How can I help you explore Laravel packages today?