Introduction The explained the process of creating unit and feature tests, and showed you how to automate them with Buddy. With this guide, you’ll learn how to run tests by using Dusk. previous article E2E Laravel Laravel Dusk is simply one of the kind of browser tests introduced in Laravel in v5.4. The tests use the ChromeDriver by default, but you can also configure them to use Selenium in a different browser. Test project If you have no idea how to add the tests, we’ll guide you through the process using the example of a simple calculator. In , you can see how to create a calculator like that. this guide At the beginning, make sure to fork and clone the project github.com/buddy-works/laravel-first-steps Then, you can check the application immediately by running: $ laravel-first-steps$ composer install$ php artisan serve NOTE: If you have any trouble, check if you installed . all required things Install Dusk If you want to install Dusk, just follow the steps: Install Laravel Dusk and add it to the project’s dependency: $ composer require laravel/dusk Register DuskServiceProvider. Open and add the namespace: app\Providers\AppServiceProvider.php use Laravel\Dusk\DuskServiceProvider; Register the provider in the method by adding: register if ($this->app->environment('local', 'testing')) { $this->app->register(DuskServiceProvider::class); } The entire file should look like this: AppServiceProvider <?php namespace App\Providers; use Illuminate\Support\ServiceProvider;use Laravel\Dusk\DuskServiceProvider; class AppServiceProvider extends ServiceProvider{ /** * Bootstrap any application services. * * @return void */ public function boot() { // } /** * Register any application services. * * @return void */ public function register() { if ($this->app->environment('local', 'testing')) { $this->app->register(DuskServiceProvider::class); } }} Lastly, install Dusk by executing $ php artisan dusk:install Writing first Dusk test At first, the exemplary test should be removed or it will return errors: $ rm tests/Browser/ExampleTest.php Once done, make sure to add our first test by executing the command. Then… artisan Want to learn more? . Follow the full article here