PHPackages                             tysontruong/dusk-secure - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. tysontruong/dusk-secure

ActiveLibrary[Testing &amp; Quality](/categories/testing)

tysontruong/dusk-secure
=======================

A more secure Laravel Dusk that provides simple end-to-end testing and browser automation without exposing routes or authentication.

v1.1.1(8y ago)01MITPHPPHP &gt;=5.6.4

Since Jul 31Pushed 6y agoCompare

[ Source](https://github.com/tysontruong/dusk)[ Packagist](https://packagist.org/packages/tysontruong/dusk-secure)[ RSS](/packages/tysontruong-dusk-secure/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/697dc62203b022b30cbeba17df9473f514c5825473e4e66887316cdb834dd31a/687474703a2f2f692e696d6775722e636f6d2f376871695659702e706e67)](https://camo.githubusercontent.com/697dc62203b022b30cbeba17df9473f514c5825473e4e66887316cdb834dd31a/687474703a2f2f692e696d6775722e636f6d2f376871695659702e706e67)

[![Total Downloads](https://camo.githubusercontent.com/d1249e0183c849abc1dc4ae62897b7b4d85ccb3c565b2662b61a16dc816bc4d7/68747470733a2f2f706f7365722e707567782e6f72672f747261766f6c74726f6e2f6475736b2d7365637572652f642f746f74616c2e737667)](https://packagist.org/packages/travoltron/dusk-secure)[![Latest Stable Version](https://camo.githubusercontent.com/fea72187f8c2dde06d36a75bc7c4d6cf95c1df7b9d3a624245095481bd84a82d/68747470733a2f2f706f7365722e707567782e6f72672f747261766f6c74726f6e2f6475736b2d7365637572652f762f737461626c652e737667)](https://packagist.org/packages/travoltron/dusk-secure)[![License](https://camo.githubusercontent.com/e7b53aa26847602ea70bc36bf76574a668c47801383b5653c668252fedbbb836/68747470733a2f2f706f7365722e707567782e6f72672f747261766f6c74726f6e2f6475736b2d7365637572652f6c6963656e73652e737667)](https://packagist.org/packages/travoltron/dusk-secure)

What?
-----

[](#what)

Laravel Dusk is an incredibly simple to use browser automation and testing tool. However, it was made with testing in mind, and as such, was never really meant for the production environment limelight.

Not anymore. I've gone ahead and ripped out all the parts that expose routes, or interact with your users.

Why?
----

[](#why)

So we can scrape the web with an amazingly expressive API in a framework we all know and love! All the methods you know and love -- minus the ones on interacting with or acting as users -- are there. See the official docs below for more details.

Caveats and gotchas
-------------------

[](#caveats-and-gotchas)

When using this tool as a scraper, you're typically limited to making dusk tests, and then triggering them via `php artisan dusk`.

You can automate this process and apply them to a command bus *you can schedule!*

Here's how:

Make your dusk test as you have before. Then, make a new command, making sure to give it a unique signature.

In the handle method, simply new up the class of the test you just created, initialize it and run it:

```
/**
 * Execute the console command.
 *
 * @return mixed
 */
public function handle()
{
    $event = new \Tests\Browser\Test;
    $event->prepare();
    $event->testExample();
}
```

Do whatever you had planned with the data you're scraping *inside the test itself* and you're golden.

When you make a test for dusk, make sure you include `$browser->quit();` to ensure that the browser cleans up after itself. Do this after you've processed the data you've scraped.

What's next?
------------

[](#whats-next)

I'll make a `2.0` branch in the coming days to keep pace with the official package. It brings headless operation which will really help with some serious scraping.

Just kidding! Version 1.1.0 upgrades the binary and allows for headless operation.

To run your scraping headless, check out `DuskTestCase.php`, make sure to add ChromeOptions to your use statements, and set the `$options` variable and pass it through to the RemoteWebDriver like pictured below.

```
use Facebook\WebDriver\Chrome\ChromeOptions;

/**
 * Create the RemoteWebDriver instance.
 *
 * @return \Facebook\WebDriver\Remote\RemoteWebDriver
 */
protected function driver()
{
    $options = (new ChromeOptions)->addArguments(['--headless']);

    return RemoteWebDriver::create(
        'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
            ChromeOptions::CAPABILITY, $options
        )
    );
}
```

If anyone wants to help kick in a PR.

Official Documentation
----------------------

[](#official-documentation)

Documentation for Dusk can be found on the [Laravel website](https://laravel.com/docs/master/dusk).

License
-------

[](#license)

Dusk-Secure is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

3161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da33ce3ad3b455d147b7a0b6450ac011d08fa4c404a2b328d446995cd4e83d3b?d=identicon)[Vagabondtq](/maintainers/Vagabondtq)

---

Top Contributors

[![travoltron](https://avatars.githubusercontent.com/u/2647090?v=4)](https://github.com/travoltron "travoltron (14 commits)")[![truongthaison](https://avatars.githubusercontent.com/u/7956129?v=4)](https://github.com/truongthaison "truongthaison (2 commits)")[![cuatao](https://avatars.githubusercontent.com/u/32835902?v=4)](https://github.com/cuatao "cuatao (1 commits)")[![kasperhartwich](https://avatars.githubusercontent.com/u/616231?v=4)](https://github.com/kasperhartwich "kasperhartwich (1 commits)")

---

Tags

testinglaravelwebdriver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tysontruong-dusk-secure/health.svg)

```
[![Health](https://phpackages.com/badges/tysontruong-dusk-secure/health.svg)](https://phpackages.com/packages/tysontruong-dusk-secure)
```

###  Alternatives

[laravel/dusk

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

1.9k36.7M255](/packages/laravel-dusk)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M224](/packages/laravel-horizon)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M368](/packages/laravel-zero-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
