Laravel Dusk is a package that provides the functionality of unit testing in the browser. It does not require JDK or Selenium. This package uses Chrome driver by default but it can be configured to use Selenium with different browser as well.
First, we get information about the installation part and then we will do one test case with login authentication. I hope this information will be useful for the projects to do unit test and perform test cases using Dusk.
1. Installation
You should have composer dependency in your project. For the installation please run this command in your Laravel project.
composer require –dev laravel/dusk