Open-source project
laravel/dusk avatar
laravel/dusk

Laravel Dusk Browser Automation for Laravel Tests

Laravel Dusk provides simple end-to-end testing and browser automation.

1,944 stars333 forksPHPMIT

At a glance

What is it?
Laravel Dusk gives Laravel applications a PHP API for end-to-end browser tests, using a standalone Chromedriver by default while allowing other Selenium drivers. It fits developers who need to express browser interactions in tests, but the README provides little guidance beyond setup and driver selection.
Who is it for?
Adopt Laravel Dusk when the team wants a PHP-oriented browser automation API for Laravel end-to-end tests and can operate a compatible browser driver. Do not choose it solely because it is easy to set up, since the README does not document installation commands, environment variables, CI service configuration, or rollback procedures.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly PHP, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • laravel/dusk1,944 ★ · +0
Star history
Repository2026-10-162026-10-23
laravel/dusk1.9k1.9k

0 Stars in the last 7 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The Browser Testing Problem Laravel Dusk Targets

Laravel Dusk addresses the gap between testing Laravel request handling and exercising a web interface through a browser. Its stated purpose is end-to-end testing and browser automation, with an "expressive, easy-to-use" API. That places it in the test suite of teams that need to represent actions such as navigation and browser interaction rather than limiting coverage to HTTP responses or isolated PHP components.

The intended audience is Laravel developers, but Dusk is not limited to testing request and response code. Browser automation can represent workflows that only become meaningful in a running application, such as moving through rendered pages and interacting with their controls. The README does not list selectors, available methods, assertions, or example workflows, so the exact API surface cannot be described from the repository summary.

The project also targets developers who do not want a separate JDK and Selenium installation on their machine. By default, Dusk uses a standalone Chromedriver. This removes at least one stated dependency from the default setup, although it does not mean that browser compatibility or driver setup is free of operational constraints. The README explicitly permits another Selenium driver, making driver choice part of Dusk's design.

Dusk's Driver and Test Execution Architecture

The documented data path begins with a test that uses Dusk's PHP API to express browser automation. Dusk then communicates through a browser driver. In the default arrangement, that role is filled by standalone Chromedriver rather than a JDK and Selenium installation managed on the local machine. The repository's primary language is PHP, so the test-facing API is presented to PHP developers even though the browser side relies on ChromeDriver.

Dusk is not locked to that default. The README says users are free to use "any other Selenium driver" they choose. This makes the driver layer replaceable in principle, but the README does not explain how to configure an alternative, which Selenium client is used, or whether every Selenium driver has identical behavior. Driver compatibility therefore belongs in an adoption check rather than an assumption.

Based on the repository layout, the implementation is split between `src/`, executable-related files under `bin/`, PHPUnit configuration files, stubs, and tests. The presence of `phpunit.dusk.xml.dist` indicates a dedicated PHPUnit configuration template for Dusk tests, while `phpunit.xml.dist` separately covers the package's own unit-oriented test configuration. The contents of those files are not included here, so their exact environment settings cannot be confirmed. The npm package metadata declares `jquery` as its only dependency under `private` dependencies, although the README does not explain how that dependency participates in a Dusk test.

Installing Dusk and Beginning a Browser Test

The README does not provide installation commands, a Composer invocation, an environment file, or a first test example. It directs users to the official Laravel documentation, so those steps must be taken from `https://laravel.com/docs/dusk` rather than reconstructed from the repository summary. No command block is included here because any package flag, environment variable, driver path, or test invocation would be an invention.

A first useful session should begin with the official Dusk documentation and identify four concrete items before test code is written: the documented installation command, the required `.env` settings, the browser and driver combination, and the documented test command. The repository's `phpunit.dusk.xml.dist` is the most relevant local file to inspect for the intended PHPUnit arrangement, but its configuration should not be guessed from its filename.

The first test should be kept small. It should open the local application, assert one stable page outcome, and use selectors owned by the application rather than incidental styling. That recommendation follows from the nature of browser automation, but the README does not provide Dusk's concrete selector or assertion syntax. The reader therefore needs the official documentation for executable syntax. A team that cannot accommodate that reference gap, or that requires a documented cross-browser matrix, should not select Dusk from the README alone.

Standalone Chromedriver Versus a Selenium Driver

The default Chromedriver arrangement is Dusk's clearest practical distinction. According to the README, it does not require JDK or Selenium to be installed on the machine. A team can therefore begin with the browser driver Dusk expects instead of assembling the same stack manually.

Selenium is a real alternative at the driver layer, and the README explicitly allows Dusk to use another Selenium driver. The difference is the execution stack around browser control. Standalone Chromedriver is Dusk's documented default. A Selenium driver changes the underlying driver approach and may fit environments whose browser automation is already standardized on Selenium, although the README does not state what configuration or compatibility work that requires.

For a Laravel team, the more relevant comparison is between Dusk and running browser automation without a Laravel-specific PHP API. A separate automation framework can solve browser control, but adopting one alongside Laravel means maintaining its integration boundary with the application and its test command. Dusk packages that boundary as a Laravel-oriented API. The README does not establish that Dusk supports every browser, framework, or non-Laravel application, so those broader comparisons remain outside what can be verified.

Constraints in Browser Scope and Repository Guidance

The largest documented limitation is choice of browser driver. Dusk's default path centers on Chromedriver, and the README does not claim that all browsers are supported out of the box. Although another Selenium driver may be used, the absence of configuration details makes cross-driver portability difficult to assess. A product that depends on Safari, Firefox, or multiple browser versions should verify that requirement directly in the official documentation.

The README is also intentionally brief. It does not show an example test, describe available browser methods, document CI execution, explain screenshots or browser-console handling, or identify supported PHP, Laravel, browser, and driver versions. Those omissions are significant for a test framework because daily adoption depends on API details and environment behavior rather than its high-level purpose alone.

Repository files offer more places to inspect, including `CHANGELOG.md`, `UPGRADE.md`, `composer.json`, and the PHPUnit configuration templates. The README does not reproduce their contents. In particular, the existence of `UPGRADE.md` confirms that upgrade material exists, but it does not establish which Dusk versions have automatic configuration changes. Dusk is also unsuitable as the only solution when the requirement is API testing without rendering a web interface. Its documented mechanism is browser automation, so lower-level Laravel HTTP tests remain the relevant category for requests that do not require a browser.

Maintenance, Releases, and MIT Licensing

The repository is not archived, and its last push was on 2026-10-16. Recent releases include v8.7.2 on 2026-10-13, v8.7.1 on 2026-10-06, and v8.7.0 on 2026-09-22. Those dates and version labels support the conclusion that the `8.x` branch has recent release activity, but they do not establish long-term support policy or compatibility for every environment.

Dusk is open-source software under the MIT license. The README links the license as `LICENSE.md`. For organizations, that designation means the project is distributed under permissive MIT terms, subject to the actual license text. It does not by itself answer internal policy, dependency, browser-driver distribution, or compliance questions, so no broader legal interpretation is warranted here.

Upgrade cost cannot be quantified from the README. The repository has `UPGRADE.md` and a recent release history, but the migration notes are not included. Before moving between Dusk lines, the team should inspect that file, the release entries, and any changed test configuration in the target version. The default `8.x` branch is the concrete version context for this review.

Editorial conclusion

Adopt Laravel Dusk when the team wants a PHP-oriented browser automation API for Laravel end-to-end tests and can operate a compatible browser driver. Do not choose it solely because it is easy to set up, since the README does not document installation commands, environment variables, CI service configuration, or rollback procedures. Verify first that the official Laravel documentation covers the selected PHP, Laravel, browser, and driver versions, and inspect the installed `8.x` branch before committing the test architecture.

Frequently asked questions

Does Laravel Dusk require JDK or Selenium?

No. By default, Dusk uses a standalone Chromedriver and does not require JDK or Selenium to be installed on the machine. The README also says that another Selenium driver may be used.

Can Laravel Dusk use a Selenium driver other than Chromedriver?

Yes. The README says users are free to use any other Selenium driver they wish, although it does not document the configuration needed for alternatives.

Where can I find the Laravel Dusk installation and first-test instructions?

The README links the official documentation at `https://laravel.com/docs/dusk`. It does not include an installation command or a first browser test.

Official sources

  1. laravel/dusk on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/laravel-dusk.svg)](https://hysenlabs.com/projects/laravel-dusk)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/laravel-dusk.svg)](https://hysenlabs.com/projects/laravel-dusk)

Was this useful?