PHPackages                             dzentota/regression - 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. dzentota/regression

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

dzentota/regression
===================

Regression testing framework

0.2.8(3w ago)051[1 PRs](https://github.com/dzentota/regression/pulls)mitPHPPHP &gt;=8.1

Since Dec 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dzentota/regression)[ Packagist](https://packagist.org/packages/dzentota/regression)[ RSS](/packages/dzentota-regression/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (11)Versions (28)Used By (0)

The simple PHP regression testing framework.

Building PHAR
-------------

[](#building-phar)

phar is built using [Box](https://github.com/box-project/). Once box is installed, the phar can be built using the following command from the project directory:

```
box build

```

Installation
------------

[](#installation)

### Use `phive`

[](#use-phive-httpsphario)

> phive install dzentota/regression

or add dzentota/regression to .phive/phars.xml e.g

```

```

Usage
-----

[](#usage)

> regression.phar \[options\] \[--\] &lt;base\_uri&gt;

```
Arguments:

base_uri                     The base uri of your application

Options:
-d, --tests_dir[=TESTS_DIR]  The directory where your tests are placed [default: "./tests"]
--debug                      Show detailed info about requests and responses
-h, --help                   Display help for the given command. When no command is given display help for the ./bin/regression command
-q, --quiet                  Do not output any message
-V, --version                Display this application version
--ansi|--no-ansi             Force (or disable --no-ansi) ANSI output
-n, --no-interaction         Do not ask any interactive question
-v|vv|vvv, --verbose         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```

Documentation
-------------

[](#documentation)

To write a regression test:

- create a new `class` that extends `\Regression\Scenario`
- implement `getRegressionDescription()` method that describes possible regression
- implement `run()` method that contains all the test logic

In your regression tests you should ensure that when you are sending a predefined set of `Requests`you get **expected** `Responses`

Let's create a regression test for example.com

```
