Skip to content

Commit 25f2e4b

Browse files
authored
Update installation and usage steps in README
1 parent a40ef66 commit 25f2e4b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ composer require --dev jackbayliss/laravel-dusk-parallel
2727
```bash
2828
composer require --dev brianium/paratest
2929
```
30+
### 2. Add the middelware into your app
31+
```php
32+
if (($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) === 'testing') {
33+
$middleware->web(prepend: SwitchDatabaseForParallelTesting::class);
34+
}
35+
```
36+
3037

31-
### 2. Start ChromeDriver instances
38+
### 3. Start ChromeDriver instances
3239

3340
You need one ChromeDriver instance per parallel process. By default, the package uses ports starting from `9515`. I recommend starting a few more instances than you think you need, as ParaTest's token assignment can be unpredictable depending on your environment:
3441
```bash
@@ -38,7 +45,7 @@ chromedriver --port=9517 &
3845
chromedriver --port=9518 &
3946
```
4047

41-
### 3. Run your tests
48+
### 4. Run your tests
4249
```bash
4350
php artisan dusk:parallel
4451
```
@@ -123,4 +130,4 @@ See [dusk-parallel-demo](https://github.com/jackbayliss/dusk-parallel-demo) for
123130

124131
## License
125132

126-
MIT
133+
MIT

0 commit comments

Comments
 (0)