Download the PHP package wackystudio/laravel-test-watcher without Composer

On this page you can find all versions of the php package wackystudio/laravel-test-watcher. 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 laravel-test-watcher

Run specific tests methods when your test or source code changes

Latest Version on Packagist Build Status Total Downloads

When looking at our testing workflow, we realized how often we were triggering our tests, especially single test cases or groups of test cases. Using an IDE like PHPStorm this is done quickly with a keyboard shortcut, but in other IDEs, or editors, this is not always as easy. Therefore we have built Laravel Test Watcher.

Instead of running your entire test suite or having to group your tests, Laravel Test Watcher can watch test cases you annotate with a @watch annotation.

You start the watcher through the tests:watch artisan command. As soon as you save a test file with a @watch annotation on a test case, Laravel Test Watcher automatically notice that you have added the annotation and run the test case for every change in your source code.

When you are finished testing the test case, you can tell Laravel Test Watcher to stop watching the test case by removing the @watch annotation again; it is as easy as that.

No need to jump between your IDE/editor and the terminal, adding or removing @watch annotations in your code is enough, and Laravel Test Watcher takes care of the rest.

Installation

You can install the package via composer:

Usage

To watch a test in a test class, use the @watch annotation like this:

If you are not using a @test annotation but are adding test to your test methods name, you can watch the test case like this:

To watch tests and source file for changes, run the test watcher through Laravel Artisan like this:

NOTICE: For database testing we recommend that you create a .env.testing environment file with details for a dedicated testing database. If you don't do this, Laravel Test Watcher will test against the database given in the .env file, which we do not recommend.

Configuration

By default Laravel Test Watcher watches all files in the app routes and tests folders, meaning that any changes to a file in these directories, makes Laravel Test Watcher run all the watched test cases.

If you want to configure which directories Laravel Test Watcher should watch, you can do this by publishing the configuration file through the vendor:publish artisan command like this:

publish the configuration file for Laravel Test Watcher only or select the config tag to publish configuration files, for all packages in your Laravel Application.

Limitations

Even though Laravel Test Watcher can watch as many tests as you like, it is not the intention that you should use it on every single test case in your test suite but instead, use it on the tests for the current feature you are implementing.

Since it is not possible to tell PHPUnit to run multiple single test cases so all test cases can be tested in a single PHPUnit session, each test case is running in its own PHPUnit session, which makes the execution of the tests a bit slower.

If you need to run all your tests, we recommend you run a good old:

This will run through all of your tests in your test suite much faster.

When starting Laravel Test Watcher through the artisan command, it bootstraps the entire Laravel application and loads the environment variables defined in the .env file. This gives us some issues since PHPUnit does not override the loaded environment variables when running tests which make each test run with the environment variables already loaded, instead of the testing environment variables it should be using. To mitigate this, Laravel Test Watcher requires a .env.testing file where all your environment variables for your testing setup is defined. This is then used to override the environment variables when Laravel Test Watcher has been instantiated. Unfortunately, this means that you cannot use the environment variables you have defined in your phpunit.xml file.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of laravel-test-watcher with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^7.3|^7.4
illuminate/support Version 5.8.*|6.*|7.*|8.*
league/climate Version ^3.5
react/event-loop Version ^1.1
spatie/laravel-collection-macros Version ^6.0|^7.0.3
symfony/console Version ^4.2|5.*
symfony/finder Version ^4.2|5.*
symfony/process Version ^4.2|5.*
wyrihaximus/react-child-process-promise Version ^2.0
yosymfony/resource-watcher Version ^2.0
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 wackystudio/laravel-test-watcher contains the following files

Loading the files please wait ....