PHPackages                             00f100/phpatr - 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. 00f100/phpatr

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

00f100/phpatr
=============

Package to your test routes API REST to use in Jenkins

0.12.0(9y ago)21891PHPPHP &gt;=5.5

Since Aug 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/00F100/phpatr)[ Packagist](https://packagist.org/packages/00f100/phpatr)[ Docs](https://github.com/00f100/phpatr)[ RSS](/packages/00f100-phpatr/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (7)Used By (0)

PHPatr - Simple Api Test REST
=============================

[](#phpatr---simple-api-test-rest)

[![Jenkins](https://camo.githubusercontent.com/e7d6cd91868be8486ce95b4570cb1e167d22cada10afa14d44a6dd55a86d759b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642532304a656e6b696e732d70617373696e672d627269676874677265656e2e737667)](https://codeclimate.com/github/00F100/phpatr) ![Travis](https://camo.githubusercontent.com/411c1f27b010067a704f94ec38b4a65dd59666f2057215254c64602a050dc669/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f3030463130302f7068706174722e7376673f6d61784167653d32353932303030) [![coverage](https://camo.githubusercontent.com/9fd9667f16f23e30d08a349bcbd491aa6ddf10606667ddb741d99db3c626e56e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f3030463130302f7068706174722e737667)](https://codecov.io/gh/00F100/phpatr) [![Code Climate](https://camo.githubusercontent.com/5355f8886aa0bba409562382963c359e83d37f10bcf85309935b49779d9128d9/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f3030463130302f7068706174722e737667)](https://codeclimate.com/github/00F100/phpatr) [![MIT](https://camo.githubusercontent.com/d92e6b9a8a5ed9cc778abb5d5dbf4515ad9e736db8c97b7413f6d0df0938a25c/68747470733a2f2f696d672e736869656c64732e696f2f6475622f6c2f766962652d642e7376673f6d61784167653d32353932303030)](https://codeclimate.com/github/00F100/phpatr)

Package to [Smoke testing](https://en.wikipedia.org/wiki/Smoke_testing_(software))

Test your API REST on Jenkins based on JSON file!

Easy configuration and secure result!

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

[](#installation)

```
$ wget https://raw.githubusercontent.com/00F100/phpatr/master/dist/phpatr.phar

```

or [Download Phar file](https://raw.githubusercontent.com/00F100/phpatr/master/dist/phpatr.phar)

Configuration
-------------

[](#configuration)

Configure the file "phpatr.json":

Example:

```
{
    "name": "Test reqres.in",
    "base": [
        {
            "name": "httpbin.org",
            "url": "http://httpbin.org",
            "query": {},
            "header": {}
        }
    ],
    "auth": [
        {
            "name": "noAuth",
            "query":{},
            "header": {},
            "data": {}
        }
    ],
    "tests": [
        {
            "name": "Test to get IP",
            "base": "httpbin.org",
            "auth": "noAuth",
            "path": "/ip",
            "method": "GET",
            "query": {},
            "header": {},
            "data": {},
            "assert": {
                "type": "json",
                "code": 200,
                "fields": [
                    {
                        "name": "origin",
                        "type": "string"
                    }
                ]
            }
        },
        {
            "name": "Test to POST data",
            "base": "httpbin.org",
            "auth": "noAuth",
            "path": "/post",
            "method": "POST",
            "query": {},
            "header": {},
            "data": {
                "posttest": "95ddcb76ded165f81607e3f050070946"
            },
            "assert": {
                "type": "json",
                "code": 200,
                "fields": [
                    {
                        "name": "form",
                        "type": "array",
                        "fields": [
                            {
                                "name": "posttest",
                                "type": "string",
                                "eq": "95ddcb76ded165f81607e3f050070946"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "name": "Test not found 404",
            "base": "httpbin.org",
            "auth": "noAuth",
            "path": "/status/404",
            "method": "GET",
            "query": {},
            "header": {},
            "data": {},
            "assert": {
                "code": 404
            }
        },
        {
            "name": "Test status teapot",
            "base": "httpbin.org",
            "auth": "noAuth",
            "path": "/status/418",
            "method": "GET",
            "query": {},
            "header": {},
            "data": {},
            "assert": {
                "code": 418
            }
        }
    ]
}
```

Usage
-----

[](#usage)

```
PHPatr version 0.7.0
   Usage:
         Test API REST:
	 php phpatr.phar --config  [--output , [--debug]]

         Generate example JSON configuration:
	 php phpatr.phar --example-config-json

         Self Update:
	 php phpatr.phar --self-update

         Help:
	 php phpatr.phar --help

	Options:
	  -d,  --debug                    			Debug the calls to API REST
	  -c,  --config                     		File of configuration in JSON to test API REST calls
	  -e,  --example-config-json         		Generate a example file JSON to configuration
	  -o,  --output                     		Output file to save log
	  -u,  --self-update                		Upgrade to the latest version version
	  -v,  --version                    		Return the installed version of this package
	  -h,  --help                      			Show this menu

```

How to:
-------

[](#how-to)

Execute test:

```
$ php phpatr.phar --config  [--output , [--debug]]

	Options:
	  -c,  --config                     File of configuration in JSON to test API REST calls
	  -o,  --output                    Output file to save log
	  -d,  --debug                     Debug the calls to API REST

```

Update:

```
$ php phpatr.phar --self-update

```

Help:

```
$ php phpatr.phar --help

```

Example "execute test" return success:

```
user@ubuntu /path/to/project> php phpatr.phar --config phpatr.json
[SLOG] Start: 2016-08-27 15:40:11
[SLOG] Config File: phpatr.json
[SLOG] Test Config: Test reqres.in
[SLOG] Run Tests!
[ OK ] Test users single vetor
[ OK ] Test users vector multilevel
[ OK ] Example error: Test users vector multilevel
[SLOG] End: 2016-08-27 15:40:12

```

Example "execute test" return error:

```
user@ubuntu /path/to/project> php phpatr.phar --config phpatr.json
[SLOG] Start: 2016-08-27 15:40:11
[SLOG] Config File: phpatr.json
[SLOG] Test Config: Test reqres.in
[SLOG] Run Tests!
[ OK ] Test users single vetor
[ OK ] Test users vector multilevel
[FAIL] Example error: Test users vector multilevel
[FLOG] The tests[]->assert->fields does not match to test
[SLOG] End: 2016-08-27 15:40:12
[FLOG] Test failed

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

6

Last Release

3557d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ff406566b9371ed5b48e1e62a5dcafd6f1de2e3066fa0922afdfe418d100b8c?d=identicon)[00F100](/maintainers/00F100)

---

Top Contributors

[![00F100](https://avatars.githubusercontent.com/u/8130040?v=4)](https://github.com/00F100 "00F100 (107 commits)")

---

Tags

apitestrest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/00f100-phpatr/health.svg)

```
[![Health](https://phpackages.com/badges/00f100-phpatr/health.svg)](https://phpackages.com/packages/00f100-phpatr)
```

###  Alternatives

[imbo/behat-api-extension

API extension for Behat

1092.6M9](/packages/imbo-behat-api-extension)[ubirak/rest-api-behat-extension

Rest Api Extension for Behat

41330.1k2](/packages/ubirak-rest-api-behat-extension)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[kielabokkie/jsonapi-behat-extension

Behat extension for testing JSON APIs

1516.6k](/packages/kielabokkie-jsonapi-behat-extension)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.0k38](/packages/dreamfactory-df-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
