Download the PHP package konsulting/dusk-standalone without Composer
On this page you can find all versions of the php package konsulting/dusk-standalone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download konsulting/dusk-standalone
More information about konsulting/dusk-standalone
Files in konsulting/dusk-standalone
Package dusk-standalone
Short Description Standalone dusk testing, ideal for legacy projects, or remote testing.
License MIT
Informations about the package dusk-standalone
Dusk Standalone
A simple package to use Laravel Dusk with PHPUnit outside of a Laravel application for browser testing.
The package was put together to allow local and remote testing of legacy applications which do not have similar testing frameworks available. There are other options for doing so, but we like the API for Dusk.
Perhaps not everything will work as expected, since we're not integrated to Laravel. It's early days for this package, so it's open to improvement.
We also assist with another package, designed for using Laravel Dusk to test Laravel Packages, Orchestra Testbench-Dusk.
Version Compatibility
The versioning for this package aligns with major releases of Dusk.
Dusk | Dusk Standalone |
---|---|
1.x | 1.x |
2.x | 2.x |
3.x | 3.x |
4.x | 4.x |
5.x | 5.x |
6.x | 6.x |
7.x | 7.x |
Installation
We recommend using composer.
composer require konsulting/dusk-standalone
Usage
We tend to put our Browser tests in tests/Browser
. Create a new base testcase that extends the Konsulting\DuskStandalone\TestCase
.
This will allow you to add any customisations you want in your Dusk tests.
Now create a your tests:
Run your tests as part of your testsuite, or separate them out to run on their own (since browser tests can be slow).
Dusk documentation can be found here
Authentication
If you are able to add Dusk Login routes to your application, and for those to be secure, you will be able to use the standard dusk login
, loginAs
, logout
and other methods.
If that is not possible, you can leverage the 'Macroable' nature of the Browser class to add custom methods at runtime. Take care to not try to overwite an existing method on the Browser class.
For example:
Chrome Version
If you receive an error containing information about the Chrome version (e.g. Chrome version must be between 70 and 73)
Please run vendor/bin/dusk-updater update
For further information please see the Dusk Updater project
Contributing
Contributions are welcome and will be fully credited. We will accept contributions by Pull Request.
Please:
- Use the PSR-2 Coding Standard
- Add tests, if you’re not sure how, please ask.
- Document changes in behaviour, including readme.md.
Testing
We use PHPUnit
Run tests using PHPUnit: vendor/bin/phpunit
All versions of dusk-standalone with dependencies
phpunit/phpunit Version ^7.5|^8.0|^9.0
laravel/dusk Version ^7.0
konsulting/project-root Version ^1.1
orchestra/dusk-updater Version ^1.2