Download the PHP package bk-ty/magic-test-laravel without Composer

On this page you can find all versions of the php package bk-ty/magic-test-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magic-test-laravel

Magic Test for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Magic Test allows you to write browser tests by simply clicking around on the application being tested, all without the slowness of constantly restarting the testing environment.
It inverts the test-writing experience and avoids all the back and forth between tests, your terminal and your template files. See it in action here.
The easiest way to explain Magic Test is through a video. Check it out here.

Magic Test was originally created by Andrew Culver and Adam Pallozi for Ruby on Rails.
Laravel Magic Test was created by Mateus Guimarães.

Magic Test is still in early development, and that includes the documentation. Any questions you have that aren't already address in the documentation should be opened as issues so they can be appropriately addressed in the documentation.

Installation

You can install the package via composer:

Then, add the following line to your $middleware array under app/Http/Kernel.php:

Usage

On your Laravel Dusk tests, simply add magic() at the end of your method chain. For example:

php artisan dusk --browse

To run Magic Test, you must simply run the command php artisan magic. Behind the scenes, it is the same as running php artisan dusk, but it will maintain the browser window open.

This will leave you with two or three windows:

For the Magic Experience™️, we suggest you organize the three windows to fit your screen. That way, you can see tests being generated in real-time.

Recording Actions

Once the browser is open, Magic Test will already be capturing all of your actions. You can click around, fill inputs, checkboxes, selects and radios just like you would do manually testing an application.

Generating Assertions

Additionally, you can generate text assertions by selecting a given text and then pressing ControlShift + A. You'll see a dialog box confirming the assertion has been recorded.

Saving the new actions to the test file

To save the actions that were recorded, simply go to the Shell and type ok. You are free to close it and come back to your Magic Sessiona any time, or just keep recording more actions.
If you're satisfied with your test, you can type finish on the Shell and it'll remove the magic() call from your test, leaving you with a clean, working test.

See how it works on this video

Magic Test is still in it's early days, so you might find that the output is not exactly what you wanted. In that case, feel free to submit an issue and we'll try to improve it ASAP.

Known issues

Magic Test does not work well with Inertia.js assertions. If you're using Inertia in an integration test, please disable Magic Test by add the following code to your setUp method:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of magic-test-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
illuminate/contracts Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
laravel/dusk Version ^7.0|^8.0
nikic/php-parser Version ^4.10.3|^5.0
psy/psysh Version ^0.11|^0.12
spatie/backtrace Version ^1.1
spatie/laravel-package-tools Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bk-ty/magic-test-laravel contains the following files

Loading the files please wait ....