Download the PHP package yegortokmakov/phprtest without Composer
On this page you can find all versions of the php package yegortokmakov/phprtest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yegortokmakov/phprtest
More information about yegortokmakov/phprtest
Files in yegortokmakov/phprtest
Package phprtest
Short Description Simple resources usage tests for PHP applications
License MIT
Informations about the package phprtest
PHPRTest
PHPRTest is a simple resources usage tests for modern PHP applications. In a fashion of PHPUnit, it allows developers to keep track of memory consumption and execution time of critical parts of software. PHPRTest allows to set up soft and hard limits for each test suite and is easy to integrate with your favorite CI solution.
Usage
Here is a basic test of Symfony console application. In this test we run import
command
and assert that execution time is less than 0.05 seconds, soft memory usage limit is 6 MB and hard memory
usage limit is 10 MB.
Running this test will produce similar results:
To extract some part of the code from measurements (e.g. initialization of data), you can use @provider annotation:
To run same test multiple times, you can use @repeat annotation:
Installation
PHPRTest is available on Packagist (yegortokmakov/phprtest) and as such installable via Composer.
Or simply add a dependency on yegortokmakov/phprtest to your project's composer.json file if you use Composer to manage the dependencies of your project. Here is a minimal example of a composer.json file that just defines a development-time dependency on PHPRTest:
Todo
- Limits for etalon test
- CPU usage
- Memory gain
- Calculate average of runs
- Statistic of results: warninng if they are bad
- Time weights for mock calls
Author
Yegor Tokmakov - [email protected]
See also the list of contributors who participated in this project.
License
PHPRTest is licensed under the MIT License - see the LICENSE file for details
All versions of phprtest with dependencies
symfony/console Version ~2.5
symfony/finder Version ~2.2
mindplay/annotations Version 1.2.0
phpunit/phpunit-mock-objects Version ~2.3