|
53 | 53 | <a name="introduction"></a> |
54 | 54 | ## Introduction |
55 | 55 |
|
| 56 | +> [!WARNING] |
| 57 | +> [Pest 4](https://pestphp.com/) now includes automated browser testing which offers significant performance and usability improvements compared to Laravel Dusk. For new projects, we recommend using Pest for browser testing. |
| 58 | +
|
56 | 59 | [Laravel Dusk](https://github.com/laravel/dusk) provides an expressive, easy-to-use browser automation and testing API. By default, Dusk does not require you to install JDK or Selenium on your local computer. Instead, Dusk uses a standalone [ChromeDriver](https://sites.google.com/chromium.org/driver) installation. However, you are free to utilize any other Selenium compatible driver you wish. |
57 | 60 |
|
58 | 61 | <a name="installation"></a> |
@@ -163,7 +166,7 @@ The `DatabaseMigrations` trait will run your database migrations before each tes |
163 | 166 | use Illuminate\Foundation\Testing\DatabaseMigrations; |
164 | 167 | use Laravel\Dusk\Browser; |
165 | 168 |
|
166 | | -uses(DatabaseMigrations::class); |
| 169 | +pest()->use(DatabaseMigrations::class); |
167 | 170 |
|
168 | 171 | // |
169 | 172 | ``` |
@@ -199,7 +202,7 @@ The `DatabaseTruncation` trait will migrate your database on the first test in o |
199 | 202 | use Illuminate\Foundation\Testing\DatabaseTruncation; |
200 | 203 | use Laravel\Dusk\Browser; |
201 | 204 |
|
202 | | -uses(DatabaseTruncation::class); |
| 205 | +pest()->use(DatabaseTruncation::class); |
203 | 206 |
|
204 | 207 | // |
205 | 208 | ``` |
@@ -357,7 +360,7 @@ use App\Models\User; |
357 | 360 | use Illuminate\Foundation\Testing\DatabaseMigrations; |
358 | 361 | use Laravel\Dusk\Browser; |
359 | 362 |
|
360 | | -uses(DatabaseMigrations::class); |
| 363 | +pest()->use(DatabaseMigrations::class); |
361 | 364 |
|
362 | 365 | test('basic example', function () { |
363 | 366 | $user = User::factory()->create([ |
@@ -2474,7 +2477,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations; |
2474 | 2477 | use Laravel\Dusk\Browser; |
2475 | 2478 | use Tests\Browser\Components\DatePicker; |
2476 | 2479 |
|
2477 | | -uses(DatabaseMigrations::class); |
| 2480 | +pest()->use(DatabaseMigrations::class); |
2478 | 2481 |
|
2479 | 2482 | test('basic example', function () { |
2480 | 2483 | $this->browse(function (Browser $browser) { |
|
0 commit comments