Download the PHP package alorel/phpunit-auto-rerun without Composer

On this page you can find all versions of the php package alorel/phpunit-auto-rerun. 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 phpunit-auto-rerun

Average time to resolve an issue Percentage of issues still open Build Status codecov Dependency Status Reference Status HHVM Status

Latest Stable Version Total Downloads License


Allows failed PHPUnit tests to automatically rerun.

Use cases

Anywhere where there is an external dependency which you don't have full control of, e.g. when developing an SDK for some API, which might apply rate limiting or experience brief downtime.

Requirements

Installation

Usage

You can integrate retry functionality in your tests in one of two ways: using class inheritance or using traits.

In many situations, you can simply extend your test cases from PHPUnit_Retriable_TestCase, which itself extends the original PHPUnit_Framework_TestCase. Here, all you need to do is replace the class in your test cases:

would become

In situations where your test cases have complex inheritance already, you can just use a trait in the test cases that need retry functionality:

Modifying existing test cases/reverting back

The PHPUnit_Retriable_TestCase class was intentionally left in the global namespace to resemble the original PHPUnit_Framework_TestCase as much as possible. Most IDEs will generate/suggest a test case template to contain

so you can safely do a tests-wide search-and-replace operation in either direction.

Configuration

Configuration is performed via annotations, same way you'd configure expected exceptions, @befores and so on:

Both these values default to 0.

Configuration can be performed by annotating both the class and the test method - class annotations are applied to all methods and are overriden by method annotations, for example, consider the following snippet:

FAQ *

Q: Will this work with @dataProvider annotations? A: Yes - the test will continue retrying with the same data provider value and continue to the next one when the test succeeds. This applies to both array data providers and generators/iterators.


Q: Why do I end up with a higher number of assertions than before? A: Even when a test fails it still increments the number of assertions made - it was not immediately obvious how to change this and I don't see it as an important feature, therefore I didn't bother implementing it.


Q: Can I set the configuration parameters via CLI/phpunit.xml? A: No and it does not appear to be possible without editing the original PHPUnit code.


* I wrote put these together before release, no one's asked them. Apologies for the ruse. :disappointed:


All versions of phpunit-auto-rerun with dependencies

PHP Build Version
Package Version
Requires phpdocumentor/reflection-docblock Version ^3.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 alorel/phpunit-auto-rerun contains the following files

Loading the files please wait ....