2017 © Pedro Peláez
 

tool envtesting

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

image

wikidi/envtesting

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  • Thursday, August 4, 2016
  • by devel.cz
  • Repository
  • 11 Watchers
  • 12 Stars
  • 2,004 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 10 Versions
  • 2 % Grown

The README.md

Envtesting

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output., (*2)

HTML output example, (*3)

How to use

  1. copy Envtesting.php and folder envtests
  2. create index.php and require Envtesting.php
  3. add some test to Suite
  4. return output as html/csv/txt

Envtesting advantages

Envtesting provide multiple way how to test something. You can test:, (*4)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->addTest('APC', 'envtests/library/Apc.php', 'apc'); // by file
echo $suite;

or using singelton instance of Suite, (*5)

<?php
require_once __DIR__ . '/Envtesting.php';
Suite::instance()->addTest('APC', 'envtests/library/Apc.php', 'apc'); // by file
echo Suite::instance();

Using anonymous function:, (*6)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->addTest('SOMETHING', function() {
    if (true === false) throw new \envtesting\Error('True === false');
    }, 'boolean');

Using regular callback:, (*7)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->addTest('callback', array($test, 'perform_test'), 'callback');

Using static callback string:, (*8)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->addTest('callback', '\we\can\call\Something::static', 'call');

Test using object with __invoke:, (*9)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->addTest('memcache', new \envtests\services\memcache\Connection('127.0.0.1', 11211), 'service');

Tests can be grouped into group:, (*10)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->group->addTest('memcache', new \envtests\services\memcache\Connection('127.0.0.1', 11211), 'service');
$suite->group2->addTest('memcache', new \envtests\services\memcache\Connection('127.0.0.1', 11211), 'service');

You can shuffle groups of shuffle tests inside groups:, (*11)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
$suite->group->addTest('memcache', new \envtests\services\memcache\Connection('127.0.0.1', 11211), 'service');
$suite->group->addTest('memcache', new \envtests\services\memcache\Connection('127.0.0.1', 11211), 'service');
$suite->group2->addTest('memcache', new \envtests\services\memcache\Connection('127.0.0.1', 11211), 'service');
$suite->shuffle(); // mix only groups
$suite->shuffle(true); // deep shuffle mix groups and tests inside group

Envtesting can render CSV, HTML or text output:, (*12)

<?php
require_once __DIR__ . '/Envtesting.php';
$suite = new \envtesting\Suite('my great envtest');
echo $suite;            // generate TXT output
$suite->render('csv');  // render CSV output
$suite->render('html'); // render HTML output

Visit more examples in: https://github.com/wikidi/envtesting/tree/master/example, (*13)

Requirments

  • PHP 5.3 +

Update

npm intall         # install all NPM deps
composer install   # install Apigen

# reelase
grunt release      # update api docs, minify and release minor version

# or one by one
grunt minify       # minify (shrink) PHP file
grunt doc          # generate Apigen docs
grunt bump         # release minor version

# or release major version

grunt bump:major   # release major version

  • PHP 5.3 +

Media

  • https://www.zdrojak.cz/clanky/envtesting-overujeme-nastaveni-prostredi/

Meta

Author: wikidi.cz & Roman Ožana, (*14)

For the license terms see LICENSE.TXT files., (*15)

The Versions

04/08 2016

dev-master

9999999-dev http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

04/08 2016

v2.0.9

2.0.9.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

30/06 2016

v2.0.8

2.0.8.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

17/09 2014

v2.0.7

2.0.7.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

14/05 2014

v2.0.6

2.0.6.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

20/12 2013

v2.0.5

2.0.5.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

26/08 2013

v2.0.4

2.0.4.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

test envtesting

26/08 2013

v2.0.3

2.0.3.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

 

test envtesting

01/07 2013

1.0.2

1.0.2.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

test envtesting

01/07 2013

1.0.1

1.0.1.0 http://www.wikidi.com/

Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

test envtesting